protected void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (this.txtinnerName.Text.Trim().Length == 0) { strErr += "innerName不能为空!\\n"; } if (this.txtcatName.Text.Trim().Length == 0) { strErr += "catName不能为空!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } string innerName = this.txtinnerName.Text; string catName = this.txtcatName.Text; hm.Model.sysItemCategory model = new hm.Model.sysItemCategory(); model.innerName = innerName; model.catName = catName; hm.BLL.sysItemCategory bll = new hm.BLL.sysItemCategory(); bll.Add(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx"); }
private void ShowInfo(int sicId) { hm.BLL.sysItemCategory bll = new hm.BLL.sysItemCategory(); hm.Model.sysItemCategory model = bll.GetModel(sicId); this.lblsicId.Text = model.sicId.ToString(); this.txtinnerName.Text = model.innerName; this.txtcatName.Text = model.catName; }