Exemplo n.º 1
0
 protected void BtnOver_Click(object sender, EventArgs e)
 {
     if (this.txtDate.Text.Trim() == "" && this.HidFlag.Value == "0")
     {
         this.JS.Text = "alert('请选择日期!');";
     }
     else
     {
         int  state = Convert.ToInt32(this.HdnState.Value);
         Guid code  = new Guid(this.hdnID.Value);
         if (this.HidFlag.Value == "0")
         {
             state = 7;
         }
         else
         {
             state = 4;
         }
         PMAction.SwitchState(code, state);
         if (this.HidFlag.Value == "0")
         {
             PMAction.SwitchStateRemark(code, this.txtDate.Text.ToString() + ":设置为竣工; ");
         }
         else
         {
             PMAction.SwitchStateRemark(code, "");
         }
     }
     this.GridBind(this.ViewState["SQLWHERE"].ToString());
 }