招投标软件代码,很有应用价值,请大家参考下哦,不明白的地方给我留言

源代码在线查看: unit_zhongbiaoqd.pas

软件大小: 511 K
上传用户: l2335800
关键词: 投标 价值 软件代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				unit Unit_zhongbiaoqd;
				
				
				interface
				
				uses
				  unit_parentform,Dialogs,forms,SysUtils,DB, ADODB;
				
				type
				  TFrm_zhongbiaoqd = class(TFrm_ParentForm)
				    procedure FormCreate(Sender: TObject);
				    procedure Com_xmnameChange(sender:Tobject);
				    procedure Com_zhaoBiaoChange(Sender:Tobject);
				    procedure Com_GclxnameChange(Sender: TObject);
				    procedure BitBtn2Click(Sender: TObject);
				    procedure LoadSource;
				
				  end;
				
				var
				  Frm_zhongbiaoqd:TFrm_zhongbiaoqd;
				
				implementation
				
				uses
				  unit_public,SystemObject,DataModule,DataAccessCommonShell;
				
				procedure TFrm_zhongbiaoqd.LoadSource;
				var
				  adoquery:tadoquery;
				  str:string;
				  i:Integer;
				
				begin
				  if cell1.OpenFile(SPATH+'report\shigong\pingbiao\zbdw.cll','')1 then
				  begin
				    showmessage('文件打开错误');
				    exit;
				  end;
				  cell1.ShowTopLabel(0, 0);  //不显示列标
				  adoquery:=tadoquery.Create(nil);
				  try
				    adoquery.Close;
				    adoquery.Connection:=datamodule1.ADOMainConn;
				    adoquery.SQL.Text:='select  bd_name,dw_name,pb_pingbiaoj,pb_suanshubj from ( select b.dw_id,a.bd_isbn,a.bd_name,a.bd_bianhao,'
				      +' b.pb_pingbiaoj,pb_suanshubj from bid_biaoduan_xinxi a left join (select dw_id,pb_pingbiaoj,bd_isbn,pb_suanshubj from bid_pingbiao where '
				      +' pb_zhongbiao=1) b on a.bd_isbn=b.bd_isbn where a.xmgczb_id in  (select xmgczb_id from bid_xmgczb '
				      +' where xm_isbn='''+trim(xmbdgc.XM_ISBn)+''' and gclx_id='+xmbdgc.gCLX_ID
				      +' and zblx_id='''+xmbdgc.BDLX_ID+''') ) a left join bid_danwei_xinxi b '
				      +' on a.dw_id=b.dw_Id order by bd_bianhao ';
				
				
				    adoquery.Open;
				    //得到行数
				    if adoquery.RecordCount				    begin
				      cell1.DeleteRow(6,43-adoquery.RecordCount,0);
				    end
				    else if adoquery.RecordCount>43 then
				    begin
				      cell1.InsertRow(49,adoquery.RecordCount-43,0);
				    end;
				    adoquery.First;
				    for i:=0 to adoquery.RecordCount-1 do
				    begin
				      cell1.SetCellString(1,i+6,0,adoquery.fieldbyname('bd_name').AsString);
				      cell1.SetCellString(2,i+6,0,adoquery.fieldbyname('dw_name').AsString);
				      if com_zhaobiao.Text='施工' then
				         cell1.SetCellString(3,i+6,0,adoquery.fieldbyname('pb_pingbiaoj').AsString);
				      if com_zhaobiao.Text='监理' then
				         cell1.SetCellString(3,i+6,0,adoquery.fieldbyname('pb_suanshubj').AsString);
				      adoquery.next;
				    end;
				  finally
				    freeandnil(adoquery);
				  end;
				end;
				
				procedure TFrm_zhongbiaoqd.FormCreate(Sender: TObject);
				begin
				  inherited;
				  GetItems(com_xmname,com_zhaobiao,com_gclxname,1);
				  panel2.Caption:='中标确定';
				  caption:='中标确定';
				  LoadSource;
				end;
				
				procedure TFrm_zhongbiaoqd.Com_xmnameChange(sender:Tobject);
				begin
				  inherited;
				  LoadSource;
				end;
				
				procedure TFrm_zhongbiaoqd.Com_zhaoBiaoChange(Sender:Tobject);
				begin
				  inherited;
				  LoadSource;
				end;
				
				procedure TFrm_zhongbiaoqd.Com_GclxnameChange(Sender: TObject);
				begin
				  inherited;
				  LoadSource;
				end;
				
				procedure TFrm_zhongbiaoqd.BitBtn2Click(Sender: TObject);
				begin
				  inherited;
				  if bopen=true then exit;
				  cell1.SaveFile(GetFilePath+'zbdw.cll',1);
				end;
				
				end.
							

相关资源