Example #1
0
 protected void ImgCZDJbtn_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         string CKDH = this.txtCKDH.Text.Trim();
         if (string.IsNullOrEmpty(CKDH))
         {
             this.PrintfError("请选择要重置的单据");
             return;
         }
         int status = QTCKQuery.GetStatus(CKDH);
         if (status > 1)
         {
             this.PrintfError("该单据已经执行完成,不能重置");
             return;
         }
         if (status == 0)
         {
             this.PrintfError("不用重置");
             return;
         }
         string result = QTCKQuery.CZDJ(CKDH);
         if (result != "success")
         {
             this.PrintfError("重置过程出现异常,请重试");
             return;
         }
         this.txtStatus.Text = "新建";
     }
     catch
     {
         this.PrintfError("重置过程出现异常,请重试");
         return;
     }
 }