Beispiel #1
0
 private void ShowInfo(int ParamID)
 {
     WebDemo.BLL.WebDemo.Params   bll   = new WebDemo.BLL.WebDemo.Params();
     WebDemo.Model.WebDemo.Params model = bll.GetModel(ParamID);
     this.lblParamID.Text    = model.ParamID.ToString();
     this.txtParamName.Text  = model.ParamName;
     this.txtParamValue.Text = model.ParamValue;
     this.txtRemark.Text     = model.Remark;
     this.chkIsShow.Checked  = model.IsShow;
     this.chkIsEdit.Checked  = model.IsEdit;
 }
Beispiel #2
0
 private void ShowInfo(int ParamID)
 {
     WebDemo.BLL.WebDemo.Params   bll   = new WebDemo.BLL.WebDemo.Params();
     WebDemo.Model.WebDemo.Params model = bll.GetModel(ParamID);
     this.lblParamID.Text    = model.ParamID.ToString();
     this.lblParamName.Text  = model.ParamName;
     this.lblParamValue.Text = model.ParamValue;
     this.lblRemark.Text     = model.Remark;
     this.lblIsShow.Text     = model.IsShow?"是":"否";
     this.lblIsEdit.Text     = model.IsEdit?"是":"否";
 }
Beispiel #3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsNumber(txtParamID.Text))
            {
                strErr += "ParamID格式错误!\\n";
            }
            if (this.txtParamName.Text.Trim().Length == 0)
            {
                strErr += "ParamName不能为空!\\n";
            }
            if (this.txtParamValue.Text.Trim().Length == 0)
            {
                strErr += "ParamValue不能为空!\\n";
            }
            if (this.txtRemark.Text.Trim().Length == 0)
            {
                strErr += "备注不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int    ParamID    = int.Parse(this.txtParamID.Text);
            string ParamName  = this.txtParamName.Text;
            string ParamValue = this.txtParamValue.Text;
            string Remark     = this.txtRemark.Text;
            bool   IsShow     = this.chkIsShow.Checked;
            bool   IsEdit     = this.chkIsEdit.Checked;

            WebDemo.Model.WebDemo.Params model = new WebDemo.Model.WebDemo.Params();
            model.ParamID    = ParamID;
            model.ParamName  = ParamName;
            model.ParamValue = ParamValue;
            model.Remark     = Remark;
            model.IsShow     = IsShow;
            model.IsEdit     = IsEdit;

            WebDemo.BLL.WebDemo.Params bll = new WebDemo.BLL.WebDemo.Params();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }