📄 usergrouppermissions.aspx.cs
字号:
namespace PowerEasy.WebSite.Admin.User
{
using PowerEasy.Common;
using PowerEasy.Controls;
using PowerEasy.Enumerations;
using PowerEasy.Model.UserManage;
using PowerEasy.UserManage;
using PowerEasy.Web.UI;
using PowerEasy.WebSite.Controls;
using System;
using System.Web.UI.WebControls;
public class UserGroupPermissions : AdminPage
{
protected Button BtnCancel;
protected Button BtnField;
protected Button BtnSetNode;
protected Button BtnSpecial;
protected Button BtnSubmit;
private int groupId;
protected HiddenField HdnAction;
protected HiddenField HdnGroupId;
protected HiddenField HdnGroupName;
protected Label LblDescription;
protected Label LblGropType;
protected Label LblGroupName;
protected Label LblTitle;
protected ExtendedSiteMapPath SmpNavigator;
protected PowerEasy.WebSite.Controls.UserIndividuation UserIndividuation;
protected void ButtonCancel_Click(object sender, EventArgs e)
{
BasePage.ResponseRedirect("UserGroupManage.aspx", true);
}
protected void ButtonSubmit_Click(object sender, EventArgs e)
{
UserGroupsInfo userGroupById = UserGroups.GetUserGroupById(DataConverter.CLng(this.HdnGroupId.Value));
userGroupById.GroupSetting = new Serialize<UserPurviewInfo>().SerializeField(this.UserIndividuation.PurviewInfo);
switch (UserGroups.Update(userGroupById))
{
case DataActionState.Successed:
AdminPage.WriteSuccessMsg("<li>设置" + userGroupById.GroupName + "会员组权限成功!</li>", "UserGroupManage.aspx");
return;
case DataActionState.Exist:
break;
case DataActionState.Unknown:
AdminPage.WriteErrMsg("<li>设置" + userGroupById.GroupName + "会员组权限失败!</li>", "UserGroupManage.aspx");
break;
default:
return;
}
}
protected void Page_Load(object sender, EventArgs e)
{
this.groupId = BasePage.RequestInt32("GroupID");
this.HdnGroupId.Value = BasePage.RequestString("GroupID");
if (!this.Page.IsPostBack)
{
UserGroupsInfo userGroupById = UserGroups.GetUserGroupById(this.groupId);
this.LblGroupName.Text = userGroupById.GroupName;
this.LblDescription.Text = userGroupById.Description;
this.HdnGroupName.Value = userGroupById.GroupName;
this.LblGropType.Text = BasePage.EnumToHtml<GroupType>(userGroupById.GroupType);
if (!string.IsNullOrEmpty(userGroupById.GroupSetting))
{
this.UserIndividuation.PurviewInfo = UserGroups.GetGroupSetting(userGroupById.GroupSetting);
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -