private void ShowInfo(int wid, int sid) { myhouse.BLL.ManageService bll = new myhouse.BLL.ManageService(); myhouse.Model.Manage model = bll.GetModel(wid, sid); this.lblwid.Text = model.wid.ToString(); this.lblsid.Text = model.sid.ToString(); }
protected void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (!PageValidate.IsNumber(txtwid.Text)) { strErr += "wid格式错误!\\n"; } if (!PageValidate.IsNumber(txtsid.Text)) { strErr += "sid格式错误!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } int wid = int.Parse(this.txtwid.Text); int sid = int.Parse(this.txtsid.Text); myhouse.Model.Manage model = new myhouse.Model.Manage(); model.wid = wid; model.sid = sid; myhouse.BLL.ManageService bll = new myhouse.BLL.ManageService(); bll.Add(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx"); }
public void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (strErr != "") { MessageBox.Show(this, strErr); return; } int wid = int.Parse(this.lblwid.Text); int sid = int.Parse(this.lblsid.Text); myhouse.Model.Manage model = new myhouse.Model.Manage(); model.wid = wid; model.sid = sid; myhouse.BLL.ManageService bll = new myhouse.BLL.ManageService(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx"); }