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

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

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

min.TblVILLAGE.Insert;

DMAdmin.TblVILLAGECODE.Value := DMAdmin.TblVILLAGE.RecordCount + 1;

DMAdmin.TblVILLAGETITLE.Value := EditVILLAGE.Text;

DMAdmin.TblVILLAGE.Post;

DMAdmin.TblVILLAGE.Refresh;

EditVILLAGE.Text := ;

EditVILLAGE.Enabled := False;

BtnSAVEVILLAGE.Enabled := False;

end;

 

procedure TFrmMain.EditVILLAGEChange(Sender: TObject);

begin

With DMAdmin do

begin

TblVILLAGE.Locate(TITLE, EditVILLAGE.Text, [loPartialKey]);

EditVILLAGE.Text)and"> if (TblVILLAGETITLE.Value <> EditVILLAGE.Text) and

)"> (EditVILLAGE.Text <> )

then

BtnSAVEVILLAGE.Enabled := True

else

BtnSAVEVILLAGE.Enabled := False;

TblVILLAGE.Locate(TITLE, EditVILLAGE.Text, [loPartialKey]);

end;

end;

 

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

begin

With DMAdmin do

begin

TblVILLAGE.Locate(TITLE, EditVILLAGE.Text, [loPartialKey]);

EditVILLAGE.Text)and"> if (TblVILLAGETITLE.Value <> EditVILLAGE.Text) and

)"> (EditVILLAGE.Text <> )

then

BtnSAVEVILLAGE.Enabled := True

else

BtnSAVEVILLAGE.Enabled := False;

TblVILLAGE.Locate(TITLE, EditVILLAGE.Text, [loPartialKey]);

end;

end;

 

end.

 

AdminDM.pas

unit AdminDM;

 

interface

 

uses

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

Db, DBTables;

 

type

TDMAdmin = class(TDataModule)

TblDATA: TTable;

DatSrcDATA: TDataSource;

TblYEARS: TTable;

DatSrcYEARS: TDataSource;

TblDATAYEARNUM: TFloatField;

TblDATANN: TFloatField;

TblDATAHISTORYNUM: TFloatField;

TblDATAFIO: TStringField;

TblDATABORNDATE: TDateField;

TblDATABORNTIMEH: TSmallintField;

TblDATABORNTIMEM: TSmallintField;

TblDATAENTERDATE: TDateField;

TblDATAENTERTIMEH: TSmallintField;

TblDATAENTERTIMEM: TSmallintField;

TblDATASEX: TSmallintField;

TblDATABODYMASS: TFloatField;

TblDATABODYLENGHT: TFloatField;

TblDATAAPGAR: TStringField;

TblDATADN: TSmallintField;

TblDATAENTER: TFloatField;

TblDATAENTER2: TSmallintField;

TblDATAENTERDS: TMemoField;

TblDATADS: TFloatField;

TblDATADSNOTE: TMemoField;

TblDATASTATUS: TFloatField;

TblDATASTATUSDATE: TDateField;

TblDATASTATUSTIME: TStringField;

TblDATASTATUSNOTE: TMemoField;

TblDATAADDRESS: TFloatField;

TblDATAVILLAGE: TFloatField;

TblDATASTREET: TFloatField;

TblDATAHOME: TStringField;

TblDATAFLAT: TStringField;

TblDATAPHONE: TStringField;

TblDATANOTE: TMemoField;

TblDATAOPERATION: TFloatField;

TblDATAYEARs: TIntegerField;

TblDATABORNTIMEs: TStringField;

TblDATAENTERTIMEs: TStringField;

TblDATASEXs: TStringField;

TblDATADNs: TStringField;

TblENTER: TTable;

DatSrcENTER: TDataSource;

TblENTER2: TTable;

DatSrcENTER2: TDataSource;

TblDATAENTERs: TStringField;

TblDATAENTER2s: TStringField;

TblDS: TTable;

DatSrcDS: TDataSource;

TblDATADSs: TStringField;

TblDATASTATUSs: TStringField;

TblDATAADDRESSs: TStringField;

TblSTREET: TTable;

DatSrcSTREET: TDataSource;

TblVILLAGE: TTable;

DatSrcVILLAGE: TDataSource;

TblDATASTREETs: TStringField;

TblDATAVILLAGEs: TStringField;

TblDATA2: TTable;

DatSrcDATA2: TDataSource;

TblDATA2NN: TFloatField;

TblDATA2NEUROL1: TSmallintField;

TblDATA2NEUROL2: TSmallintField;

TblDATA2NEUROL3: TSmallintField;

TblDATA2NEUROL4: TSmallintField;

TblDATA2NEUROL5: TSmallintField;

TblDATA2NEUROL6: TSmallintField;

TblDATA2NEUROL7: TSmallintField;

TblDATA2NEUROL8: TSmallintField;

TblDATA2NEUROL9: TSmallintField;

TblDATA2NEUROL10: TSmallintField;

TblDATA2EXT1: TSmallintField;

TblDATA2EXT2: TSmallintField;

TblDATA2EXT3: TSmallintField;

TblDATA2EXT4: TSmallintField;

TblDATA2EXT5: TSmallintField;

TblDATA2EXT6: TSmallintField;

TblDATA2EXT7: TSmallintField;

TblDATA2EXT8: TSmallintField;

TblDATA2EXT9: TSmallintField;

TblDATA2EXT10: TSmallintField;

TblDATA2EXT11: TSmallintField;

TblDATA2NAMEs: TStringField;

TblENTERTITLE: TStringField;

TblENTERCODE: TSmallintField;

TblENTER2ENTERID: TSmallintField;

TblENTER2TITLE: TStringField;

TblENTER2CODE: TSmallintField;

TblDSTITLE: TStringField;

TblDSCODE: TFloatField;

TblSTREETTITLE: TStringField;

TblSTREETCODE: TFloatField;

TblVILLAGETITLE: TStringField;

TblVILLAGECODE: TFloatField;

TblENTER2ENTERs: TStringField;

TblENTERA: TTable;

DatSrcENTERA: TDataSource;

TblENTER2A: TTable;

DatSrcENTER2A: TDataSource;

TblENTER2AENTERID: TSmallintField;

TblENTER2ATITLE: TStringField;

TblENTER2ACODE: TSmallintField;

TblENTERATITLE: TStringField;

TblENTERACODE: TSmallintField;

TblENTER2AENTERs: TStringField;

TblPERSONAL: TTable;

DatSrcPERSONAL: TDataSource;

TblPTYPE: TTable;

DatSrcPTYPE: TDataSource;

TblPERSONALID: TSmallintField;

TblPERSONALFIO: TStringField;

TblPERSONALNAME1: TStringField;

TblPERSONALNAME2: TStringField;

TblPERSONALTYPE: TSmallintField;

TblPERSONALISACTIVE: TSmallintField;

TblPERSONALPSW: TStringField;

TblPTYPECODE: TSmallintField;

TblPTYPETITLE: TStringField;

TblPERSONALPTYPEs: TStringField;

procedure DMAdminCreate(Sender: TObject);

procedure TblDATACalcFields(DataSet: TDataSet);

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

DMAdmin: TDMAdmin;

 

implementation

 

{$R *.DFM}

 

procedure TDMAdmin.DMAdminCreate(Sender: TObject);

begin

TblDATA.Open;

TblDATA2.Open;

TblYEARS.Open;

TblENTER.Open;

TblENTER2.Open;

TblDS.Open;

TblSTREET.Open;

TblVILLAGE.Open;

TblENTERA.Open;

TblENTER2A.Open;

TblPERSONAL.Open;

TblPTYPE.Open;

end;

 

procedure TDMAdmin.TblDATACalcFields(DataSet: TDataSet);

begin

TblDATABORNTIMEs.Value := IntToStr(TblDATABORNTIMEH.Value) +

: +

IntToStr(TblDATABORNTIMEM.Value);

TblDATAENTERTIMEs.Value := IntToStr(TblDATAENTERTIMEH.Value) +

: +

IntToStr(TblDATAENTERTIMEM.Value);

 

Case TblDATASEX.AsInteger of

0:

TblDATASexs.Value := МУЖ;

1:

TblDATASexs.Value := ЖЕН;

else

TblDATASexs.Value := ???;

end; { Case }

 

Case TblDATADN.AsInteger of

0:

TblDATADNs.Value := ДОН;

1:

TblDATADNs.Value := НЕД;

else

TblDATADNs.Value := ???;

end; { Case }

 

Case TblDATASTATUS.AsInteger of

0:

TblDATASTATUSs.Value := БЕЗ ИЗМЕНЕНИЙ;

1:

TblDATASTATUSs.Value := ПЕРЕВЕДЕН;

2:

TblDATASTATUSs.Value := УМЕР;

else

TblDATASTATUSs.Value := ???;

end; { Case }

 

Case TblDATAADDRESS.AsInteger of

0:

TblDATAADDRESSs.Value := СУРГУТ;

1:

TblDATAADDRESSs.Value := РАЙОН;

else

TblDATAADDRESSs.Value := ???;

end; { Case }

 

end;

 

end.