wzp
2021-09-01 4f4e2784b9616265c4c213db0724b44405630994
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
using Common;
using System;
using System.Web;
using System.Web.UI;
 
public class PageBase<T> : Page where T : ISessionObject
{
  public PageContext<T> AppContext;
 
  public override void ProcessRequest(HttpContext context)
  {
    this.AppContext = new PageContext<T>(context);
    if (!this.AppContext.IsValid)
      context.Response.Redirect("/error.aspx", true);
    base.ProcessRequest(context);
  }
 
  public bool HasRight(string functionID)
  {
    return this.AppContext.HasRight(functionID);
  }
 
  public void CheckRight(string functionID, FailedOperation failedOperation)
  {
    try
    {
      this.AppContext.CheckRight(functionID, failedOperation);
    }
    catch (Exception ex)
    {
      this.Response.Write(ex.Message);
      this.Response.End();
    }
  }
}