示例#1
0
 private void ShowInfo(int ID)
 {
     zs.BLL.Sys_Function   bll   = new zs.BLL.Sys_Function();
     zs.Model.Sys_Function model = bll.GetModel(ID);
     this.lblID.Text                  = model.ID.ToString();
     this.lblFunctionName.Text        = model.FunctionName;
     this.lblFunctionDescription.Text = model.FunctionDescription;
     this.lblType.Text                = model.Type;
     this.lblAssembly.Text            = model.Assembly;
     this.lblValidateDate.Text        = model.ValidateDate.ToString();
 }
示例#2
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtFunctionName.Text.Trim().Length == 0)
            {
                strErr += "FunctionName不能为空!\\n";
            }
            if (this.txtFunctionDescription.Text.Trim().Length == 0)
            {
                strErr += "FunctionDescription不能为空!\\n";
            }
            if (this.txtType.Text.Trim().Length == 0)
            {
                strErr += "Type不能为空!\\n";
            }
            if (this.txtAssembly.Text.Trim().Length == 0)
            {
                strErr += "Assembly不能为空!\\n";
            }
            if (!PageValidate.IsDateTime(txtValidateDate.Text))
            {
                strErr += "ValidateDate格式错误!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int      ID                  = int.Parse(this.lblID.Text);
            string   FunctionName        = this.txtFunctionName.Text;
            string   FunctionDescription = this.txtFunctionDescription.Text;
            string   Type                = this.txtType.Text;
            string   Assembly            = this.txtAssembly.Text;
            DateTime ValidateDate        = DateTime.Parse(this.txtValidateDate.Text);


            zs.Model.Sys_Function model = new zs.Model.Sys_Function();
            model.ID                  = ID;
            model.FunctionName        = FunctionName;
            model.FunctionDescription = FunctionDescription;
            model.Type                = Type;
            model.Assembly            = Assembly;
            model.ValidateDate        = ValidateDate;

            zs.BLL.Sys_Function bll = new zs.BLL.Sys_Function();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }