UpdateSystemAcl.aspx.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:2k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Collections;
- using System.Configuration;
- using System.Data;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.HtmlControls;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- namespace OThinker.H3.Portal
- {
- public partial class UpdateSystemAcl : PortalPage
- {
- private OThinker.H3.Acl.SystemAcl _Acl = null;
- private OThinker.H3.Acl.SystemAcl Acl
- {
- get
- {
- if (this._Acl == null)
- {
- string aclId = this.Request.QueryString[Param_AclID];
- this._Acl = OThinker.H3.Server.Engine.SystemAclManager.GetSystemAcl(aclId);
- }
- return this._Acl;
- }
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!this.IsPostBack)
- {
- // 验证是否具有管理员权限
- if (!this.UserValidator.ValidateAdministrator())
- {
- this.NotifyMessage(LackOfAuth);
- }
- if (this.Acl == null)
- {
- this.NotifyMessage("权限控制单元不存在");
- }
- this.lblUser.Text = OThinker.H3.Server.Engine.Organization.GetFullName(this.Acl.UserID);
- this.chkAdministrator.Checked = this.Acl.Administrator;
- this.chkPublishWorkflow.Checked = this.Acl.PublishWorkflow;
- this.chkViewReport.Checked = this.Acl.ViewReport;
- }
- }
- protected void btnOk_Click(object sender, EventArgs e)
- {
- this.Acl.Administrator = this.chkAdministrator.Checked;
- this.Acl.PublishWorkflow = this.chkPublishWorkflow.Checked;
- this.Acl.ViewReport = this.chkViewReport.Checked;
- this.Acl.LastModifyTime = System.DateTime.Now;
- this.Acl.ModifyBy = this.UserValidator.UserID;
- OThinker.H3.Server.Engine.SystemAclManager.Update(new OThinker.H3.Acl.SystemAcl[] { this.Acl });
- this.NotifyMessage("更新成功");
- }
- }
- }