public void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (this.txtDescription.Text.Trim().Length == 0) { strErr += "Description不能为空!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } int RoleID = int.Parse(this.lblRoleID.Text); string Description = this.txtDescription.Text; KDMYsoft.Model.Nhiber.Accounts_Roles model = new KDMYsoft.Model.Nhiber.Accounts_Roles(); model.RoleID = RoleID; model.Description = Description; KDMYsoft.BLL.Nhiber.Accounts_Roles bll = new KDMYsoft.BLL.Nhiber.Accounts_Roles(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx"); }
private void ShowInfo(int RoleID) { KDMYsoft.BLL.Nhiber.Accounts_Roles bll = new KDMYsoft.BLL.Nhiber.Accounts_Roles(); KDMYsoft.Model.Nhiber.Accounts_Roles model = bll.GetModel(RoleID); this.lblRoleID.Text = model.RoleID.ToString(); this.txtDescription.Text = model.Description; }
protected void btnSave_Click(object sender, EventArgs e) { string strErr=""; if(this.txtDescription.Text.Trim().Length==0) { strErr+="Description不能为空!\\n"; } if(strErr!="") { MessageBox.Show(this,strErr); return; } string Description=this.txtDescription.Text; KDMYsoft.Model.Nhiber.Accounts_Roles model=new KDMYsoft.Model.Nhiber.Accounts_Roles(); model.Description=Description; KDMYsoft.BLL.Nhiber.Accounts_Roles bll=new KDMYsoft.BLL.Nhiber.Accounts_Roles(); bll.Add(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","add.aspx"); }
protected void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (this.txtDescription.Text.Trim().Length == 0) { strErr += "Description不能为空!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } string Description = this.txtDescription.Text; KDMYsoft.Model.Nhiber.Accounts_Roles model = new KDMYsoft.Model.Nhiber.Accounts_Roles(); model.Description = Description; KDMYsoft.BLL.Nhiber.Accounts_Roles bll = new KDMYsoft.BLL.Nhiber.Accounts_Roles(); bll.Add(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx"); }
public void btnSave_Click(object sender, EventArgs e) { string strErr=""; if(this.txtDescription.Text.Trim().Length==0) { strErr+="Description不能为空!\\n"; } if(strErr!="") { MessageBox.Show(this,strErr); return; } int RoleID=int.Parse(this.lblRoleID.Text); string Description=this.txtDescription.Text; KDMYsoft.Model.Nhiber.Accounts_Roles model=new KDMYsoft.Model.Nhiber.Accounts_Roles(); model.RoleID=RoleID; model.Description=Description; KDMYsoft.BLL.Nhiber.Accounts_Roles bll=new KDMYsoft.BLL.Nhiber.Accounts_Roles(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx"); }