unit_zishenpf.pas

来自「招投标软件代码,很有应用价值,请大家参考下哦,不明白的地方给我留言」· PAS 代码 · 共 1,255 行 · 第 1/5 页

PAS
1,255
字号
                        +trim(cell1.getcellstring(2,ioldrow,iNewSheet))+''''+'and 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+ ');'

        end;
       // if (com_project.Text='综合评分') or (com_project.ItemIndex=3)   then
      //  begin
          {if  (trim(cell1.GetCellString(3,ioldrow,iNewSheet))='') then
          begin
            datamodule1.adomainconn.rollbacktrans;
            freeandnil(adoquery);
            exit;
          end;
          ssql:=' update bid_wenjian2 set wj2_duanshu='+trim(cell1.GetCellString(3,ioldrow,iNewSheet))
                   +' where wj2_leixing=1 and dw_id in (select dw_id from bid_danwei_xinxi '
                   +' where dw_name='''+trim(cell1.GetCellString(2,ioldrow,iNewSheet))+''')  ';  }
      //  end;
        adoquery.SQL.Text:=ssql;
        adoquery.ExecSQL;
        datamodule1.ADOMainConn.CommitTrans;
      except
        datamodule1.ADOMainConn.RollbackTrans;
      end;
    finally
      freeandnil(adoquery);
    end;
  end;
  if com_zhaobiao.Text='监理' then
  begin



  end;
end;


procedure tfrm_zishenpf.GetData(ASQL:String;Atotal,istart,icol:Integer);
var i,j:Integer;
    iPage,iRow:Integer;
    adoquery : Tadoquery;
{  procedure setSheet(ARecordcount:Integer);   //需要加的页数
  var
   jj,ii,ll,iirow:Integer;
  begin
    jj:=aRecordCount div Atotal;
    iirow:=aRecordCount mod Atotal;
    if jj>0 then
    begin
      if  (iirow=0) then
      begin
        cell1.InsertSheet(1, jj-1);
        ll:=jj-1;
      end;
      if iirow>0 then
      begin
        cell1.InsertSheet(1,jj);
        ll:=jj;
      end;
      cell1.ShowSideLabel(0, 0); //不显示行标
      cell1.ShowTopLabel(0, 0);  //不显示列标
      try
        cell1.SetCellString(1,1,0,xmbdgc.XM_NAME);
      except
      end;
      for ii:=1 to ll do
      begin
        cell1.CopySheet(ii , 0);
        cell1.SetSheetLabel(ii,'第'+inttostr(ii+1)+'页');
      end;
    end;
  end; }
begin
  adoquery:=tadoquery.Create(nil);
  try
    adoquery.Close;
    adoquery.Connection:=DataModule1.ADOMainConn;
    if com_leibie.ItemIndex>=0 then
      adoquery.SQL.Text:=asql
    else exit;
    adoquery.open;
    if strtoint(getleibie(com_leibie.text))>0 then
    cell1.SetCellString(1,4,0,com_leibie.text)
    else
       cell1.SetCellString(1,4,0,' ');
    cell1.DeleteSheet(1,cell1.GetCurSheet);
    //setsheet(adoquery.RecordCount);
    setCellSheet(cell1,adoquery.RecordCount,atotal);
    adoquery.First;
    if adoquery.RecordCount=0 then exit;
    for i:=0 to adoquery.RecordCount-1 do
    begin
      iPage:=i div Atotal;
      irow:=i mod Atotal;
      cell1.SetCellDouble(1,irow+istart,ipage,adoquery.fieldbyname('dwbm_id').AsInteger);
      cell1.SetCellString(2,irow+istart,ipage,adoquery.fieldbyname('dw_name').AsString);
      if icol=21 then
      begin
        cell1.SetCellString(21,irow+istart,ipage,'√');
        if adoquery.fieldbyname('FHX_GDTIME').AsString='×' then
        begin
          cell1.SetCellString(3,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('FHX_GDTIME').AsString='-' then
           cell1.SetCellString(3,irow+istart,ipage,'-')
        else
           cell1.SetCellString(3,irow+istart,ipage,'√');
        if adoquery.fieldbyname('FHX_WZX').AsString='×' then
        begin
          cell1.SetCellString(4,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('FHX_WZX').AsString='-' then
           cell1.SetCellString(4,irow+istart,ipage,'-')
        else
           cell1.SetCellString(4,irow+istart,ipage,'√');
        if adoquery.fieldbyname('FHX_QSQK').AsString='×' then
        begin
          cell1.SetCellString(5,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('FHX_QSQK').AsString='-' then
           cell1.SetCellString(5,irow+istart,ipage,'-')
        else
           cell1.SetCellString(5,irow+istart,ipage,'√');
        if adoquery.fieldbyname('FHX_ZZZS').AsString='×' then
        begin
          cell1.SetCellString(6,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('FHX_ZZZS').AsString='-' then
           cell1.SetCellString(6,irow+istart,ipage,'-')
        else
           cell1.SetCellString(6,irow+istart,ipage,'√');
        if adoquery.fieldbyname('FHX_QYZZ').AsString='×' then
        begin
          cell1.SetCellString(7,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('FHX_QYZZ').AsString='-' then
           cell1.SetCellString(7,irow+istart,ipage,'-')
        else
           cell1.SetCellString(7,irow+istart,ipage,'√');
        if adoquery.fieldbyname('FHX_FRWTS').AsString='×' then
        begin
          cell1.SetCellString(8,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else  if adoquery.fieldbyname('FHX_FRWTS').AsString='-' then
           cell1.SetCellString(8,irow+istart,ipage,'-')
        else
           cell1.SetCellString(8,irow+istart,ipage,'√');
        if adoquery.fieldbyname('fhx_tb1').AsString='×' then
        begin
          cell1.SetCellString(9,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('fhx_tb1').AsString='-' then
           cell1.SetCellString(9,irow+istart,ipage,'-')
        else
           cell1.SetCellString(9,irow+istart,ipage,'√');
        if adoquery.fieldbyname('fhx_tb2').AsString='×' then
        begin
          cell1.SetCellString(10,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('fhx_tb2').AsString='-' then
           cell1.SetCellString(10,irow+istart,ipage,'-')
        else
           cell1.SetCellString(10,irow+istart,ipage,'√');
        if adoquery.fieldbyname('fhx_tb3').AsString='×' then
        begin
          cell1.SetCellString(11,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else  if adoquery.fieldbyname('fhx_tb3').AsString='-' then
           cell1.SetCellString(11,irow+istart,ipage,'-')
        else
           cell1.SetCellString(11,irow+istart,ipage,'√');
        if adoquery.fieldbyname('fhx_tb4').AsString='×' then
        begin
          cell1.SetCellString(12,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else  if adoquery.fieldbyname('fhx_tb4').AsString='-' then
           cell1.SetCellString(12,irow+istart,ipage,'-')
        else
           cell1.SetCellString(12,irow+istart,ipage,'√');
        if adoquery.fieldbyname('fhx_tb5').AsString='×' then
        begin
          cell1.SetCellString(13,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('fhx_tb5').AsString='-' then
           cell1.SetCellString(13,irow+istart,ipage,'-')
        else
           cell1.SetCellString(13,irow+istart,ipage,'√');
        if adoquery.fieldbyname('fhx_tb6').AsString='×' then
        begin
          cell1.SetCellString(14,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else  if adoquery.fieldbyname('fhx_tb6').AsString='-' then
           cell1.SetCellString(14,irow+istart,ipage,'-')
        else
           cell1.SetCellString(14,irow+istart,ipage,'√');
        if adoquery.fieldbyname('fhx_tb7').AsString='×' then
        begin
          cell1.SetCellString(15,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('fhx_tb7').AsString='-' then
           cell1.SetCellString(15,irow+istart,ipage,'-')
        else
           cell1.SetCellString(15,irow+istart,ipage,'√');
        if adoquery.fieldbyname('fhx_tb8').AsString='×' then
        begin
          cell1.SetCellString(16,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('fhx_tb8').AsString='-' then
           cell1.SetCellString(16,irow+istart,ipage,'-')
        else
           cell1.SetCellString(16,irow+istart,ipage,'√');
        if adoquery.fieldbyname('fhx_tb9').AsString='×' then
        begin
          cell1.SetCellString(17,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('fhx_tb7').AsString='-' then
           cell1.SetCellString(17,irow+istart,ipage,'-')
        else
           cell1.SetCellString(17,irow+istart,ipage,'√');
        if adoquery.fieldbyname('fhx_tb10').AsString='×' then
        begin
          cell1.SetCellString(18,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('fhx_tb10').AsString='-' then
           cell1.SetCellString(18,irow+istart,ipage,'-')
        else
           cell1.SetCellString(18,irow+istart,ipage,'√');
        if adoquery.fieldbyname('fhx_qzx').AsString='×' then
        begin
          cell1.SetCellString(19,irow+istart,ipage,'×');
          cell1.SetCellString(21,irow+istart,ipage,'×');
        end
        else if adoquery.fieldbyname('fhx_qzx').AsString='-' then
           cell1.SetCellString(19,irow+istart,ipage,'-')
        else
           cell1.SetCellString(19,irow+istart,ipage,'√');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?