Разработка программного обеспечения для Отделения Реанимации и Интенсивной Терапии новорожденных МГБ N1 г. Сургута

Информация - Компьютеры, программирование

Другие материалы по предмету Компьютеры, программирование

?дуль Администратор программы ОРИТН в порядке

 

Main.pas

 

unit Main;

 

interface

 

uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

ExtCtrls, ComCtrls, StdCtrls, Buttons, ToolWin, Grids, DBGrids, DBCtrls;

 

type

TFrmMain = class(TForm)

Panel1: TPanel;

ToolBar1: TToolBar;

BitBtn1: TBitBtn;

PageControl1: TPageControl;

TabSheet1: TTabSheet;

TabSheet2: TTabSheet;

TabSheet3: TTabSheet;

TabSheet4: TTabSheet;

TabSheet5: TTabSheet;

TabSheet6: TTabSheet;

TabSheet7: TTabSheet;

TabSheet8: TTabSheet;

TabSheet9: TTabSheet;

Panel2: TPanel;

DBGrid1: TDBGrid;

PageControl2: TPageControl;

TabSheet10: TTabSheet;

TabSheet11: TTabSheet;

TabSheet12: TTabSheet;

TabSheet13: TTabSheet;

DBMemo1: TDBMemo;

DBMemo2: TDBMemo;

DBMemo3: TDBMemo;

DBMemo4: TDBMemo;

DBGrid2: TDBGrid;

Panel3: TPanel;

DBNavigator1: TDBNavigator;

Panel4: TPanel;

DBNavigator2: TDBNavigator;

Panel5: TPanel;

Panel6: TPanel;

Panel7: TPanel;

Panel8: TPanel;

Panel9: TPanel;

Panel10: TPanel;

Panel11: TPanel;

Panel12: TPanel;

EditDS: TEdit;

BitBtn2: TBitBtn;

BtnSAVE: TBitBtn;

Panel13: TPanel;

DBNavigator3: TDBNavigator;

DBGrid3: TDBGrid;

BitBtn3: TBitBtn;

Panel14: TPanel;

Panel15: TPanel;

DBNavigator4: TDBNavigator;

DBGrid4: TDBGrid;

BitBtn4: TBitBtn;

BitBtn5: TBitBtn;

BtnSAVEENTER: TBitBtn;

EditENTER: TEdit;

Panel16: TPanel;

BitBtn6: TBitBtn;

BitBtn7: TBitBtn;

BtnSAVEENTER2: TBitBtn;

EditENTER2: TEdit;

Panel17: TPanel;

DBNavigator5: TDBNavigator;

DBGrid5: TDBGrid;

Panel18: TPanel;

BitBtn8: TBitBtn;

BitBtn9: TBitBtn;

BtnSAVEPERSONAL: TBitBtn;

Panel19: TPanel;

DBNavigator6: TDBNavigator;

EditPERSONAL: TEdit;

DBGrid6: TDBGrid;

Panel20: TPanel;

BitBtn10: TBitBtn;

BitBtn11: TBitBtn;

BtnSAVEPTYPE: TBitBtn;

EditPTYPE: TEdit;

Panel21: TPanel;

DBNavigator7: TDBNavigator;

DBGrid7: TDBGrid;

Panel22: TPanel;

BitBtn12: TBitBtn;

BitBtn13: TBitBtn;

BtnSAVESTREET: TBitBtn;

EditSTREET: TEdit;

Panel23: TPanel;

DBNavigator8: TDBNavigator;

DBGrid8: TDBGrid;

Panel24: TPanel;

BitBtn14: TBitBtn;

BitBtn15: TBitBtn;

BtnSAVEVILLAGE: TBitBtn;

EditVILLAGE: TEdit;

Panel25: TPanel;

DBNavigator9: TDBNavigator;

DBGrid9: TDBGrid;

procedure EditDSChange(Sender: TObject);

procedure BitBtn2Click(Sender: TObject);

procedure BtnSAVEClick(Sender: TObject);

procedure EditDSClick(Sender: TObject);

procedure BitBtn4Click(Sender: TObject);

procedure BitBtn3Click(Sender: TObject);

procedure BitBtn5Click(Sender: TObject);

procedure BtnSAVEENTERClick(Sender: TObject);

procedure EditENTERChange(Sender: TObject);

procedure EditENTERClick(Sender: TObject);

procedure BitBtn6Click(Sender: TObject);

procedure BitBtn7Click(Sender: TObject);

procedure BtnSAVEENTER2Click(Sender: TObject);

procedure EditENTER2Change(Sender: TObject);

procedure EditENTER2Click(Sender: TObject);

procedure BitBtn8Click(Sender: TObject);

procedure BitBtn9Click(Sender: TObject);

procedure BtnSAVEPERSONALClick(Sender: TObject);

procedure EditPERSONALChange(Sender: TObject);

procedure EditPERSONALKeyPress(Sender: TObject; var Key: Char);

procedure BitBtn10Click(Sender: TObject);

procedure BitBtn11Click(Sender: TObject);

procedure BtnSAVEPTYPEClick(Sender: TObject);

procedure EditPTYPEChange(Sender: TObject);

procedure EditPTYPEKeyPress(Sender: TObject; var Key: Char);

procedure BitBtn12Click(Sender: TObject);

procedure BitBtn13Click(Sender: TObject);

procedure BtnSAVESTREETClick(Sender: TObject);

procedure EditSTREETChange(Sender: TObject);

procedure EditSTREETKeyPress(Sender: TObject; var Key: Char);

procedure BitBtn14Click(Sender: TObject);

procedure BitBtn15Click(Sender: TObject);

procedure BtnSAVEVILLAGEClick(Sender: TObject);

procedure EditVILLAGEChange(Sender: TObject);

procedure EditVILLAGEKeyPress(Sender: TObject; var Key: Char);

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

FrmMain: TFrmMain;

 

implementation

 

uses AdminDM, DB;

 

{$R *.DFM}

 

procedure TFrmMain.EditDSChange(Sender: TObject);

begin

With DMAdmin do

begin

TblDS.Locate(TITLE, EditDS.Text, [loPartialKey]);

EditDS.Text)and"> if (TblDSTITLE.Value <> EditDS.Text) and

)"> (EditDS.Text <> )

then

BtnSAVE.Enabled := True

else

BtnSAVE.Enabled := False;

TblDS.Locate(TITLE, EditDS.Text, [loPartialKey]);

end;

end;

 

procedure TFrmMain.BitBtn2Click(Sender: TObject);

begin

EditDS.Enabled := True;

EditDS.SetFocus;

end;

 

procedure TFrmMain.BtnSAVEClick(Sender: TObject);

begin

DMAdmin.TblDS.Insert;

DMAdmin.TblDSCODE.Value := DMAdmin.TblDS.RecordCount;

DMAdmin.TblDSTITLE.Value := EditDS.Text;

DMAdmin.TblDS.Post;

DMAdmin.TblDS.Refresh;

EditDS.Text := ;

EditDS.Enabled := False;

BtnSAVE.Enabled := False;

end;

 

procedure TFrmMain.EditDSClick(Sender: TObject);

begin

With DMAdmin do

begin

TblDS.Locate(TITLE, EditDS.Text, [loPartialKey]);

EditDS.Text)and"> if (TblDSTITLE.Value <> EditDS.Text) and

)"> (EditDS.Text <> )

then

BtnSAVE.Enabled := True

else

BtnSAVE.Enabled := False;

TblDS.Locate(TITLE, EditDS.Text, [loPartialKey]);

end;

end;

 

procedure TFrmMain.BitBtn4Click(Sender: TObject);

begin

EditENTER.Enabled := True;

EditENTER.SetFocus;

end;

 

procedure TFrmMain.BitBtn3Click(Sender: TObject);

begin

EditDS.Text := ;

EditDS.Enabled := False;

BtnSAVE.Enabled := False;

end;

 

procedure TFrmMain.BitBtn5Click(Sender: TObject);

begin

EditENTER.Text := ;

EditENTER.Enabled := False;

BtnSAVEENTER.Enabled := False;

end;

 

procedure TFrmMain.BtnSAVEENTERClick(Sender: TObject);

begin

DMAdmin.TblENTERA.Insert;

DMAdmin.TblENTERACODE.Value := DMAdmin.TblENTERA.RecordCount;

DMAdmin.TblENTERATITLE.Value := EditENTER.Text;

DMAdmin.TblENTERA.Post;

DMAdmin.TblENTERA.Refresh;

EditENTER.Text := ;

EditENTER.Enabled := False;

BtnSAVEENTER.Enabled := False;

end;

 

procedure TFrmMain.EditENTERChange(Sender: TObject);

begin

With DMAdmin do

begin

TblENTERA.Locate(TITLE, EditENTER.Text, [loPartialKey]);

EditENTER.Text)and"> if (TblENTERATITLE.Value <> EditENTER.Text) and

)"> (EditENTER.Text <> )

then

BtnSAVEENTER.Enabled := True

else

BtnSAVEENTER.Enabled := False;

TblENTERA.Locate(TITLE, EditENTER.Text, [loPartialKey]);

end;

end;

 

procedure TFrmMain.EditENTERClick(Sender: TObject);

begin

With DMAdmin do

begin

TblENTERA.Locate(TITLE, EditENTER.Text, [loPartialKey]);

EditENTER.Text)and"> if (TblENTERTITLE.Value <> EditENTER.Text) and

)"> (EditENTER.Text <> )

then

BtnSAVEENTER.Enabled := True

else

BtnSAVEENTER.Enabled := False;

TblENTERA.Locate(TITLE, EditENTER.Text, [loPartialKey]);