private void ShowInfo(int CategoryID) { KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories bll=new KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories(); KDMYsoft.Model.Nhiber.Accounts_PermissionCategories model=bll.GetModel(CategoryID); this.lblCategoryID.Text=model.CategoryID.ToString(); this.lblDescription.Text=model.Description; }
private void ShowInfo(int CategoryID) { KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories bll = new KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories(); KDMYsoft.Model.Nhiber.Accounts_PermissionCategories model = bll.GetModel(CategoryID); this.lblCategoryID.Text = model.CategoryID.ToString(); this.lblDescription.Text = model.Description; }
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 CategoryID = int.Parse(this.lblCategoryID.Text); string Description = this.txtDescription.Text; KDMYsoft.Model.Nhiber.Accounts_PermissionCategories model = new KDMYsoft.Model.Nhiber.Accounts_PermissionCategories(); model.CategoryID = CategoryID; model.Description = Description; KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories bll = new KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.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_PermissionCategories model=new KDMYsoft.Model.Nhiber.Accounts_PermissionCategories(); model.Description=Description; KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories bll=new KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories(); 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_PermissionCategories model = new KDMYsoft.Model.Nhiber.Accounts_PermissionCategories(); model.Description = Description; KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories bll = new KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories(); 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 CategoryID=int.Parse(this.lblCategoryID.Text); string Description=this.txtDescription.Text; KDMYsoft.Model.Nhiber.Accounts_PermissionCategories model=new KDMYsoft.Model.Nhiber.Accounts_PermissionCategories(); model.CategoryID=CategoryID; model.Description=Description; KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories bll=new KDMYsoft.BLL.Nhiber.Accounts_PermissionCategories(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx"); }