unit MainModule;

interface

uses
  uniGUIMainModule, SysUtils, Classes, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf,
  FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.VCLUI.Wait,
  FireDAC.Phys.MySQLDef, FireDAC.Comp.Client, FireDAC.Phys.MySQL, Data.DB,uDBConnection;

type
  TUniMainModule = class(TUniGUIMainModule)
    procedure UniGUIMainModuleCreate(Sender: TObject);
  private

    FDBConnection:TDBConnection;

    { Private declarations }
  public
    { Public declarations }

   property DBConnection:TDBConnection read FDBConnection write FDBConnection;

  end;

function UniMainModule: TUniMainModule;

const
   COUNTRY_RUSSIA='RUSSIA';
   COUNTRY_UKRAINE='UKRAINE';
   COUNTRY_KAZAKHSTAN='KAZAKHSTAN';

implementation

{$R *.dfm}

uses
  UniGUIVars, ServerModule, uniGUIApplication;

function UniMainModule: TUniMainModule;
begin
  Result := TUniMainModule(UniApplication.UniMainModule)
end;





procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject);
begin

FDBConnection:=TDBConnection.Create(UniApplication);
FDBConnection.Connect2;

end;

initialization
  RegisterMainModuleClass(TUniMainModule);
end.
