• popmenu的例子


    var
    r_id :string;
    begin
    if Qry.FieldByName('code1').AsString<>'' then
    begin
        if (Application.MessageBox('确认删除?', '提示', MB_YESNO+mb_iconinformation)=IDYES) then
        begin
          r_id:=Qry.fieldByName('id').AsString;
          del_ado.Connection.BeginTrans;
          try
            with del_ado do
            begin
              del_ado.Close;
              del_ado.SQL.Clear();
              del_ado.SQL.Add('delete from u_qianyue where r_id='''+r_id+'''');
              del_ado.ExecSQL;

              del_ado.SQL.Clear();
              //删除完u_qianyue表中的记录后,更新u_report表中的签约日期和过户日期为空
              del_ado.SQL.Add('update u_report set bargain_date = null,register_date = null where id='''+r_id+'''');
              del_ado.ExecSQL;
              showmessage('删除成功!');
              del_ado.Connection.CommitTrans;
              btnQueryClick(self);
            end;
          except
            on E: Exception do
            begin
            del_ado.Connection.RollbackTrans; //如有异常,事务回滚
            ShowMessage(E.Message);
            end
          end;
         { try
            del_ado.Connection.BeginTrans;//.begainTrans;   //BeginTransComplete
            //on Error Goto ErrNum
            del_ado.Close;
            del_ado.SQL.Clear();
            del_ado.SQL.Add('delete from u_qianyue where r_id='''+r_id+'''');
            del_ado.ExecSQL;

            del_ado.SQL.Clear();
            //删除完u_qianyue表中的记录后,更新u_report表中的签约日期和过户日期为空
            del_ado.SQL.Add('update u_report set bargain_date = null,register_date = null where id='''+r_id+'''');
            del_ado.ExecSQL;
            showmessage('删除成功!');
            del_ado.Connection.CommitTrans;
            btnQueryClick(self);
          except
            del_ado.Connection.RollBackTrans;
          end; }
        end;
    end;
    end;

  • 相关阅读:
    select server 于青林
    server client 于青林
    嵌入式系统移植三部曲 于青林
    server-client之间的通信 刘峰
    select注释执行过程 刘峰
    嵌入式系统移植三部曲 刘峰
    select server 李敏敏
    服务器与客户端 李敏敏
    嵌入式移植三步曲 郑明莉
    嵌入式系统移植三步曲 翟长伟
  • 原文地址:https://www.cnblogs.com/martian6125/p/9631450.html
Copyright © 2020-2023  润新知