unit UserPage_u;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls, Vcl.Grids,
  Vcl.Samples.Calendar, Vcl.Menus;

type
  TfrmUserPage = class(TForm)
    caleUser: TCalendar;
    RichEdit1: TRichEdit;
    MainMenu1: TMainMenu;
    Logout1: TMenuItem;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure ComboBox1Change(Sender: TObject);
    procedure Logout1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    var
    closed : Boolean;
  end;

var
  frmUserPage: TfrmUserPage;

implementation

{$R *.dfm}

uses Business_u;

procedure TfrmUserPage.Button1Click(Sender: TObject);
begin
  closed:=True;

end;

procedure TfrmUserPage.ComboBox1Change(Sender: TObject);
begin
//  if ComboBox1.Text = 'LogOut' then
  //  closed:= True;
end;

procedure TfrmUserPage.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Application.Terminate;
end;

procedure TfrmUserPage.FormCreate(Sender: TObject);
begin
closed:=False;
end;

procedure TfrmUserPage.Logout1Click(Sender: TObject);
begin
  frmBusiness.show;
  frmUserPage.Free;
end;

end.
