private void doPost() { int typeid = int.Parse(ViewState["pid"].ToString()); light.BLL.leftmenu bll = new light.BLL.leftmenu(); light.Model.leftmenu model =bll.GetModel(typeid); model.c_description = Request["c_description"]; model.k_description = Request["k_description"]; model.e_description = Request["e_description"]; bll.Update(model); light.Common.WebMessageBox.ShowMessageBoxRedirect("修改成功!", "menuedit.aspx?pid=" + ViewState["pid"].ToString(), Page); }
private void doPost() { string cname = Request["cname"]; light.BLL.leftmenu bll = new light.BLL.leftmenu(); if (!bll.Exists(cname)) { model = bll.GetModel(int.Parse(ViewState["pid"].ToString())); model.cnname = cname; bll.Update(model); WebMessageBox.ShowMessageBox("修改成功", this); } else { WebMessageBox.ShowMessageBox("该菜单名已经存在", this); } }