Ejemplo n.º 1
0
 protected void Imagebutton1_Click(object sender, ImageClickEventArgs e)
 {
     if (string.IsNullOrEmpty(this.hidCValue.Value))
     {
         this.PrintfError("没有选择要修改的纪录!");
         this.txtExp.Text     = "";
         this.txtValue.Text   = "";
         this.hidCValue.Value = "";
         return;
     }
     if (string.IsNullOrEmpty(this.txtValue.Text) || string.IsNullOrEmpty(this.txtExp.Text))
     {
         this.PrintfError("参数值和参数名不能为空!");
         return;
     }
     try
     {
         SysParam parm = new SysParam(this.hidCValue.Value, this.txtValue.Text, this.txtExp.Text);
         parm.Update();
         this.txtExp.Text     = "";
         this.txtValue.Text   = "";
         this.hidCValue.Value = "";
         BindSysParam();
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }