protected void btnSave_Click(object sender, EventArgs e) { ZentCloud.BLLPermission.Model.MenuInfo menu = new BLLPermission.Model.MenuInfo(); switch (this.ViewState["op"].ToString()) { case "add": menu.MenuID = long.Parse(menuBll.GetGUID(Common.TransacType.MenuAdd)); //menu.NodeName = this.txtNodeName.Text; //menu.Url = this.txtUrl.Text.ToLower(); //menu.PreID = this.wucPreMenu.SelectValue; //menu.MenuSort = int.Parse(this.txtMenuSort.Text); //menu.ICOCSS = this.txtICOCSS.Text; menu = this.GetControlData(menu); if (menuBll.Add(menu)) { Common.WebMessageBox.ShowAndRedirect(this, "添加成功!", Request.RawUrl); } else { Common.WebMessageBox.Show(this, "添加失败!"); } break; case "update": menu = menuBll.Get <ZentCloud.BLLPermission.Model.MenuInfo>(string.Format(" MenuID = {0} ", this.ViewState["MenuID"].ToString())); menu = this.GetControlData(menu); if (menuBll.Update(menu)) { Common.WebMessageBox.ShowAndRedirect(this, "更改成功!", Request.RawUrl); } else { Common.WebMessageBox.Show(this, "更改失败!"); } break; default: break; } }
protected void btnSave_Click(object sender, EventArgs e) { string GroupName = this.txtGroupName.Text; string GroupDescription = this.txtGroupDescription.Text; ZentCloud.BLLPermission.Model.PermissionGroupInfo model = new ZentCloud.BLLPermission.Model.PermissionGroupInfo(); model.GroupID = long.Parse(menuBll.GetGUID(Common.TransacType.PermissionGroupAdd)); model.GroupName = GroupName; model.GroupDescription = GroupDescription; model.PreID = 0; if (menuBll.Add(model)) { Common.WebMessageBox.ShowAndRedirect(this, "添加成功!", Request.RawUrl); } else { Common.WebMessageBox.Show(this, "添加失败!"); } }
protected void btnSave_Click(object sender, EventArgs e) { string Url = this.txtUrl.Text; string PermissionName = this.txtPermissionName.Text; string PermissionDescription = this.txtPermissionDescription.Text; ZentCloud.BLLPermission.Model.PermissionInfo model = new BLLPermission.Model.PermissionInfo(); model.PermissionID = long.Parse(menuBll.GetGUID(Common.TransacType.PermissionAdd)); model.Url = Url; model.MenuID = this.wucMenu.SelectValue; model.PermissionName = PermissionName; model.PermissionDescription = PermissionDescription; if (menuBll.Add(model)) { Common.WebMessageBox.ShowAndRedirect(this, "添加成功!", Request.RawUrl); } else { Common.WebMessageBox.Show(this, "添加失败!"); } }