Exemple #1
0
 protected void ImgQXWCbtn_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         string CKDH = this.txtCKDH.Text.Trim();
         string CK   = this.drpFHCK.SelectedValue;
         if (string.IsNullOrEmpty(CKDH))
         {
             this.PrintfError("请选择要重置的单据");
             return;
         }
         int status = QTCKQuery.GetStatus(CKDH);
         if (status < 2)
         {
             this.PrintfError("不用取消");
             return;
         }
         if (status == 2)
         {
             int result = QTCKQuery.QXWC(CKDH, CK, this.CUSER.UserID);
             if (result == 1)
             {
                 this.txtStatus.Text = "正在执行";
             }
         }
     }
     catch
     {
         this.PrintfError("取消完成过程出现错误,请重试");
         return;
     }
 }
Exemple #2
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;
     }
 }
Exemple #3
0
 protected void ImgModifybtn_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         string CKDH = this.txtCKDH.Text.Trim();
         string CK   = this.drpFHCK.SelectedValue;
         if (string.IsNullOrEmpty(CKDH))
         {
             this.PrintfError("请选择要修改的单据");
             return;
         }
         int status = QTCKQuery.GetStatus(CKDH);
         if (status > 0)
         {
             this.PrintfError("该单据已经执行,不能修改");
             return;
         }
         this.hidZT.Value = "Modify";
         ChangeStatus();
         DataSet ds = QTCKQuery.GetItem(CKDH);
         Session["QTCKITEM"] = null;
         Session["QTCKITEM"] = ds;
         this.frameItem.Attributes["src"] = "QTCKD_item.aspx?FHCK=" + CK;
     }
     catch
     {
         this.PrintfError("数据访问错误");
         return;
     }
 }
Exemple #4
0
 protected void ImgDeleteCKD_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 > 0)
         {
             this.PrintfError("该单据已经执行,不能删除");
             return;
         }
         string result = QTCKQuery.DeleteCKD(CKDH);
         if (result != "success")
         {
             this.PrintfError("删除过程中发生异常");
             return;
         }
         txtCKDH.Text     = "";
         this.hidZT.Value = "";
         ReturnStatus();
         this.drpFHCK.SelectedIndex       = -1;
         this.txtCPH.Text                 = "";
         this.drpCKLX.Text                = "";
         this.txtNCDJ.Text                = "";
         this.txtFYRQ.Text                = "";
         this.txtMDD.Text                 = "";
         this.drpCYS.SelectedIndex        = -1;
         this.drpSHDW.Text                = "";
         this.txtStatus.Text              = "";
         this.txtZDR.Text                 = "";
         this.txtZDRQ.Text                = "";
         Session["QTCKITEM"]              = null;
         this.frameItem.Attributes["src"] = "QTCKD_item.aspx";
     }
     catch
     {
         this.PrintfError("删除过程出现错误,请重试");
         return;
     }
 }