u_set_date.pas

来自「企业安防管理系统」· PAS 代码 · 共 419 行 · 第 1/2 页

PAS
419
字号
     end;

     if ch7.Checked then
     begin
       bb:=bb+' sj71='+quotedstr(timetostr(dtp71.Time))+', sj72='+quotedstr(timetostr(dtp72.Time))+',';
     end
  else
     begin
       bb:=bb+' sj71='+quotedstr('')+', sj72='+quotedstr('')+',';
     end;
   if ch8.Checked then
     begin
       bb:=bb+' sj81='+quotedstr(timetostr(dtp81.Time))+', sj82='+quotedstr(timetostr(dtp82.Time))+',';
     end
    else
     begin
       bb:=bb+' sj81='+quotedstr('')+', sj82='+quotedstr('')+',';
     end;

    data.G_Con.Open();
  //1//////////////////////////////
    if chk1.Checked then
      begin
        AA:='';
        AA:=BB+'sy='+quotedstr('1')+'where name_id='+quotedstr('01');
      end
    else
      begin
        AA:='';
       cc:='update sp_sjb set ';
        cc:=cc+' sj11='+quotedstr('')+', sj12='+quotedstr('')+',';
        cc:=cc+' sj21='+quotedstr('')+', sj22='+quotedstr('')+',';
        cc:=cc+' sj31='+quotedstr('')+', sj32='+quotedstr('')+',';
        cc:=cc+' sj41='+quotedstr('')+', sj42='+quotedstr('')+',';
        cc:=cc+' sj51='+quotedstr('')+', sj52='+quotedstr('')+',';
        cc:=cc+' sj61='+quotedstr('')+', sj62='+quotedstr('')+',';
        cc:=cc+' sj71='+quotedstr('')+', sj72='+quotedstr('')+',';
        cc:=cc+' sj81='+quotedstr('')+', sj82='+quotedstr('')+',';
        AA:=cc+'sy='+quotedstr('0')+'where name_id='+quotedstr('01');
      end;
        data.G_Rst.SQL.Clear;
        data.G_Rst.SQL.Add(AA);
        data.G_Rst.ExecSQL;
  //2/////////////////////////
   if chk2.Checked then
      begin
        AA:='';
        AA:=BB+'sy='+quotedstr('1')+'where name_id='+quotedstr('02');
      end
    else
      begin
        AA:='';
        cc:='update sp_sjb set ';
        cc:=cc+' sj11='+quotedstr('')+', sj12='+quotedstr('')+',';
        cc:=cc+' sj21='+quotedstr('')+', sj22='+quotedstr('')+',';
        cc:=cc+' sj31='+quotedstr('')+', sj32='+quotedstr('')+',';
        cc:=cc+' sj41='+quotedstr('')+', sj42='+quotedstr('')+',';
        cc:=cc+' sj51='+quotedstr('')+', sj52='+quotedstr('')+',';
        cc:=cc+' sj61='+quotedstr('')+', sj62='+quotedstr('')+',';
        cc:=cc+' sj71='+quotedstr('')+', sj72='+quotedstr('')+',';
        cc:=cc+' sj81='+quotedstr('')+', sj82='+quotedstr('')+',';
        AA:=cc+'sy='+quotedstr('0')+'where name_id='+quotedstr('02');
      end;
        data.G_Rst.SQL.Clear;
        data.G_Rst.SQL.Add(AA);
        data.G_Rst.ExecSQL;
    if chk3.Checked then
      begin
        AA:='';
        AA:=BB+'sy='+quotedstr('1')+'where name_id='+quotedstr('03');
      end
    else
      begin
        AA:='';
        cc:='update sp_sjb set ';
        cc:=cc+' sj11='+quotedstr('')+', sj12='+quotedstr('')+',';
        cc:=cc+' sj21='+quotedstr('')+', sj22='+quotedstr('')+',';
        cc:=cc+' sj31='+quotedstr('')+', sj32='+quotedstr('')+',';
        cc:=cc+' sj41='+quotedstr('')+', sj42='+quotedstr('')+',';
        cc:=cc+' sj51='+quotedstr('')+', sj52='+quotedstr('')+',';
        cc:=cc+' sj61='+quotedstr('')+', sj62='+quotedstr('')+',';
        cc:=cc+' sj71='+quotedstr('')+', sj72='+quotedstr('')+',';
        cc:=cc+' sj81='+quotedstr('')+', sj82='+quotedstr('')+',';
        AA:=cc+'sy='+quotedstr('0')+'where name_id='+quotedstr('03');
      end ;
        data.G_Rst.SQL.Clear;
        data.G_Rst.SQL.Add(AA);
        data.G_Rst.ExecSQL;

    if chk4.Checked then
      begin
        AA:='';
        AA:=BB+'sy='+quotedstr('1')+'where name_id='+quotedstr('04');
      end
    else
      begin
        AA:='';
        cc:='update sp_sjb set ';
        cc:=cc+' sj11='+quotedstr('')+', sj12='+quotedstr('')+',';
        cc:=cc+' sj21='+quotedstr('')+', sj22='+quotedstr('')+',';
        cc:=cc+' sj31='+quotedstr('')+', sj32='+quotedstr('')+',';
        cc:=cc+' sj41='+quotedstr('')+', sj42='+quotedstr('')+',';
        cc:=cc+' sj51='+quotedstr('')+', sj52='+quotedstr('')+',';
        cc:=cc+' sj61='+quotedstr('')+', sj62='+quotedstr('')+',';
        cc:=cc+' sj71='+quotedstr('')+', sj72='+quotedstr('')+',';
        cc:=cc+' sj81='+quotedstr('')+', sj82='+quotedstr('')+',';
        AA:=cc+'sy='+quotedstr('0')+'where name_id='+quotedstr('04');
      end;
        data.G_Rst.SQL.Clear;
        data.G_Rst.SQL.Add(AA);
        data.G_Rst.ExecSQL;

    if chk5.Checked then
      begin
        AA:='';
        AA:=BB+'sy='+quotedstr('1')+'where name_id='+quotedstr('05');
      end
    else
      begin
        AA:='';
       cc:='update sp_sjb set ';
        cc:=cc+' sj11='+quotedstr('')+', sj12='+quotedstr('')+',';
        cc:=cc+' sj21='+quotedstr('')+', sj22='+quotedstr('')+',';
        cc:=cc+' sj31='+quotedstr('')+', sj32='+quotedstr('')+',';
        cc:=cc+' sj41='+quotedstr('')+', sj42='+quotedstr('')+',';
        cc:=cc+' sj51='+quotedstr('')+', sj52='+quotedstr('')+',';
        cc:=cc+' sj61='+quotedstr('')+', sj62='+quotedstr('')+',';
        cc:=cc+' sj71='+quotedstr('')+', sj72='+quotedstr('')+',';
        cc:=cc+' sj81='+quotedstr('')+', sj82='+quotedstr('')+',';
        AA:=cc+'sy='+quotedstr('0')+'where name_id='+quotedstr('05');
      end;
        data.G_Rst.SQL.Clear;
        data.G_Rst.SQL.Add(AA);
        data.G_Rst.ExecSQL;

    if chk6.Checked then
      begin
        AA:='';
        AA:=BB+'sy='+quotedstr('1')+'where name_id='+quotedstr('06');
      end
    else
      begin
        AA:='';
        cc:='update sp_sjb set ';
        cc:=cc+' sj11='+quotedstr('')+', sj12='+quotedstr('')+',';
        cc:=cc+' sj21='+quotedstr('')+', sj22='+quotedstr('')+',';
        cc:=cc+' sj31='+quotedstr('')+', sj32='+quotedstr('')+',';
        cc:=cc+' sj41='+quotedstr('')+', sj42='+quotedstr('')+',';
        cc:=cc+' sj51='+quotedstr('')+', sj52='+quotedstr('')+',';
        cc:=cc+' sj61='+quotedstr('')+', sj62='+quotedstr('')+',';
        cc:=cc+' sj71='+quotedstr('')+', sj72='+quotedstr('')+',';
        cc:=cc+' sj81='+quotedstr('')+', sj82='+quotedstr('')+',';
        AA:=cc+'sy='+quotedstr('0')+'where name_id='+quotedstr('06');
      end;
        data.G_Rst.SQL.Clear;
        data.G_Rst.SQL.Add(AA);
        data.G_Rst.ExecSQL;

   if chk7.Checked then
      begin
        AA:='';
        AA:=BB+'sy='+quotedstr('1')+'where name_id='+quotedstr('07');
      end
    else
      begin
        AA:='';
        cc:='update sp_sjb set ';
        cc:=cc+' sj11='+quotedstr('')+', sj12='+quotedstr('')+',';
        cc:=cc+' sj21='+quotedstr('')+', sj22='+quotedstr('')+',';
        cc:=cc+' sj31='+quotedstr('')+', sj32='+quotedstr('')+',';
        cc:=cc+' sj41='+quotedstr('')+', sj42='+quotedstr('')+',';
        cc:=cc+' sj51='+quotedstr('')+', sj52='+quotedstr('')+',';
        cc:=cc+' sj61='+quotedstr('')+', sj62='+quotedstr('')+',';
        cc:=cc+' sj71='+quotedstr('')+', sj72='+quotedstr('')+',';
        cc:=cc+' sj81='+quotedstr('')+', sj82='+quotedstr('')+',';
        AA:=cc+'sy='+quotedstr('0')+'where name_id='+quotedstr('07');
      end;
        data.G_Rst.SQL.Clear;
        data.G_Rst.SQL.Add(AA);
        data.G_Rst.ExecSQL;

   if chk8.Checked then
      begin
        AA:='';
        AA:=BB+'sy='+quotedstr('1')+'where name_id='+quotedstr('08');
      end
    else
      begin
        AA:='';
        cc:='update sp_sjb set ';
        cc:=cc+' sj11='+quotedstr('')+', sj12='+quotedstr('')+',';
        cc:=cc+' sj21='+quotedstr('')+', sj22='+quotedstr('')+',';
        cc:=cc+' sj31='+quotedstr('')+', sj32='+quotedstr('')+',';
        cc:=cc+' sj41='+quotedstr('')+', sj42='+quotedstr('')+',';
        cc:=cc+' sj51='+quotedstr('')+', sj52='+quotedstr('')+',';
        cc:=cc+' sj61='+quotedstr('')+', sj62='+quotedstr('')+',';
        cc:=cc+' sj71='+quotedstr('')+', sj72='+quotedstr('')+',';
        cc:=cc+' sj81='+quotedstr('')+', sj82='+quotedstr('')+',';
        AA:=cc+'sy='+quotedstr('0')+'where name_id='+quotedstr('08');
      end;
        data.G_Rst.SQL.Clear;
        data.G_Rst.SQL.Add(AA);
        data.G_Rst.ExecSQL;
    data.G_Con.Close;
   application.MessageBox('保存成功!','明日科技有限公司');
end;

end.

⌨️ 快捷键说明

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