unit Unit1;

interface

uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, DBTables, Menus, jpeg, ExtCtrls;

type
  TForm1 = class(TForm)
    MainMenu1: TMainMenu;
    N1: TMenuItem;
    N2: TMenuItem;
    N3: TMenuItem;
    Database1: TDatabase;
    N4: TMenuItem;
    N5: TMenuItem;
    N6: TMenuItem;
    N7: TMenuItem;
    N8: TMenuItem;
    N9: TMenuItem;
    N10: TMenuItem;
    N11: TMenuItem;
    N12: TMenuItem;
    N13: TMenuItem;
    N14: TMenuItem;
    N15: TMenuItem;
    N16: TMenuItem;
    N17: TMenuItem;
    N18: TMenuItem;
    N19: TMenuItem;
    Image1: TImage;
    procedure N2Click(Sender: TObject);
    procedure N3Click(Sender: TObject);
    procedure N5Click(Sender: TObject);
    procedure N6Click(Sender: TObject);
    procedure N7Click(Sender: TObject);
    procedure N8Click(Sender: TObject);
    procedure N9Click(Sender: TObject);
    procedure N11Click(Sender: TObject);
    procedure N19Click(Sender: TObject);
    procedure N17Click(Sender: TObject);
    procedure N12Click(Sender: TObject);
    procedure N13Click(Sender: TObject);
    procedure N15Click(Sender: TObject);
    procedure N16Click(Sender: TObject);
    procedure N18Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation
uses Unit2, Unit3, Unit4, Unit8, Unit9, Unit10, Unit7, Unit12, Unit11,
  Unit13, Unit14, Unit15, Unit16;

{$R *.dfm}

procedure TForm1.N2Click(Sender: TObject);
begin
   form2.ShowModal;
if not DataBase1.Connected then
if Form2.showmodal()=mrOK then
with database1 do
begin
Params.Clear();
Params.Add('USER NAME='+Form2.Edit1.Text);
Params.Add('DATABASE NAME='+Form2.Edit2.Text);
Params.Add('PASSWORD='+Form2.Edit3.Text);
Connected:=True;  
  end;
end;

procedure TForm1.N3Click(Sender: TObject);
begin
if  DataBase1.Connected then
with database1 do
Connected:=False;
end;

procedure TForm1.N5Click(Sender: TObject);
begin
  Form3.ShowModal;
end;

procedure TForm1.N6Click(Sender: TObject);
begin
  Form4.ShowModal;
end;

procedure TForm1.N7Click(Sender: TObject);
begin
  Form8.ShowModal;
end;

procedure TForm1.N8Click(Sender: TObject);
begin
   Form9.ShowModal;
end;

procedure TForm1.N9Click(Sender: TObject);
begin
   Form10.ShowModal;
end;

procedure TForm1.N11Click(Sender: TObject);
begin
   Form7.ShowModal;
end;

procedure TForm1.N19Click(Sender: TObject);
begin
 Close;
end;

procedure TForm1.N17Click(Sender: TObject);
begin
  Form12.ShowModal;
end;

procedure TForm1.N12Click(Sender: TObject);
begin
 Form11.ShowModal;
end;

procedure TForm1.N13Click(Sender: TObject);
begin
  Form13.ShowModal;
end;

procedure TForm1.N15Click(Sender: TObject);
begin
  Form14.ShowModal;
end;

procedure TForm1.N16Click(Sender: TObject);
begin
  Form15.ShowModal;
end;

procedure TForm1.N18Click(Sender: TObject);
begin
  Form16.ShowModal;
end;

end.
