⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 global.pas

📁 Crlab公司用来连接MySQL数据库的控件
💻 PAS
字号:
unit Global;

interface

uses
  System.Collections, System.ComponentModel,
  System.Web, System.Web.SessionState, System.Data;

type
  TGlobal = class(System.Web.HttpApplication)
  {$REGION 'Designer Managed Code'}
  strict private
    procedure InitializeComponent;
  {$ENDREGION}
  strict protected
    procedure Application_Start(sender: System.Object; e: EventArgs);
    procedure Session_Start(sender: System.Object; e: EventArgs);
    procedure Application_BeginRequest(sender: System.Object; e: EventArgs);
    procedure Application_EndRequest(sender: System.Object; e: EventArgs);
    procedure Application_AuthenticateRequest(sender: System.Object; e: EventArgs);
    procedure Application_Error(sender: System.Object; e: EventArgs);
    procedure Session_End(sender: System.Object; e: EventArgs);
    procedure Application_End(sender: System.Object; e: EventArgs);
  private
    { Private Declarations }
  public
    constructor Create;
  end;

implementation

{$REGION 'Designer Managed Code'}
/// <summary>
/// Required method for Designer support -- do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure TGlobal.InitializeComponent;
begin

end;
{$ENDREGION}

constructor TGlobal.Create;
begin
  inherited;
  //
  // Required for Designer support
  //
  InitializeComponent;
  //
  // TODO: Add any constructor code after InitializeComponent call
  //
end;

procedure TGlobal.Application_Start(sender: System.Object; e: EventArgs);
begin

end;

procedure TGlobal.Session_Start(sender: System.Object; e: EventArgs);
var
  dataSet : System.Data.DataSet;
begin
  dataSet := System.Data.DataSet.Create();
  HttpContext.Current.Session.Add('dataset', dataSet);
end;

procedure TGlobal.Application_BeginRequest(sender: System.Object; e: EventArgs);
begin

end;

procedure TGlobal.Application_EndRequest(sender: System.Object; e: EventArgs);
begin

end;

procedure TGlobal.Application_AuthenticateRequest(sender: System.Object; e: EventArgs);
begin

end;

procedure TGlobal.Application_Error(sender: System.Object; e: EventArgs);
begin

end;

procedure TGlobal.Session_End(sender: System.Object; e: EventArgs);
begin
//  HttpContext.Current.Session.Clear();
end;

procedure TGlobal.Application_End(sender: System.Object; e: EventArgs);
begin

end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -