UpdateInstanceAcl.aspx.cs
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:2k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Collections;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Web;
  7. using System.Web.SessionState;
  8. using System.Web.UI;
  9. using System.Web.UI.WebControls;
  10. using System.Web.UI.HtmlControls;
  11. namespace OThinker.H3.Portal
  12. {
  13. /// <summary>
  14. /// Summary description for UpdateCaseACL.
  15. /// </summary>
  16. public partial class UpdateCaseACL : PortalPage
  17. {
  18. #region 参数
  19.         private string AclID
  20. {
  21. get
  22. {
  23. if(this.Request.QueryString[Param_AclID] == null || this.Request.QueryString[Param_AclID] == "")
  24. {
  25. // ERROR,这里应该导到错误页面上
  26.                     return OThinker.H3.Acl.Acl.NullObjectID;
  27. }
  28. else
  29. {
  30. return this.Request.QueryString[Param_AclID];
  31. }
  32. }
  33. }
  34. #endregion
  35. protected void Page_Load(object sender, System.EventArgs e)
  36. {
  37. if(!this.IsPostBack)
  38. {
  39. this.lblUserAlias.Text = OThinker.H3.Server.Engine.Organization.GetFullName(this.CurrentAcl.UserID);
  40. this.chkAdministrator.Checked = this.CurrentAcl.Administrator;
  41. this.chkView.Checked = this.CurrentAcl.View;
  42. }
  43. }
  44.         private OThinker.H3.Acl.InstanceAcl CurrentAcl
  45. {
  46. get
  47. {
  48. if(this.Session[OThinker.H3.WorkSheet.Sessions.GetInstanceACL(this.AclID)] == null)
  49. {
  50.                     this.Session[OThinker.H3.WorkSheet.Sessions.GetInstanceACL(this.AclID)] = OThinker.H3.Server.Engine.InstanceAclManager.GetAcl(this.AclID);
  51. }
  52.                 return (OThinker.H3.Acl.InstanceAcl)this.Session[OThinker.H3.WorkSheet.Sessions.GetInstanceACL(this.AclID)];
  53. }
  54. }
  55. #region Web Form Designer generated code
  56. override protected void OnInit(EventArgs e)
  57. {
  58. //
  59. // CODEGEN: This call is required by the ASP.NET Web Form Designer.
  60. //
  61. InitializeComponent();
  62. base.OnInit(e);
  63. }
  64. /// <summary>
  65. /// Required method for Designer support - do not modify
  66. /// the contents of this method with the code editor.
  67. /// </summary>
  68. private void InitializeComponent()
  69. {    
  70. }
  71. #endregion
  72. protected void btnOk_Click(object sender, System.EventArgs e)
  73. {
  74.             OThinker.H3.Server.Engine.InstanceAclManager.Update(new OThinker.H3.Acl.InstanceAcl[] { this.CurrentAcl });
  75. }
  76. protected void btnCancel_Click(object sender, System.EventArgs e)
  77. {
  78. this.Response.Redirect(
  79.                 PageName_InstanceAcl + "?" + 
  80. Param_InstanceId + "=" + this.CurrentAcl.InstanceId);
  81. }
  82. }
  83. }