justify"> Додаток А
Код програми
unit Unit1;
unit uAddDolj ;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, DBCtrls, StdCtrls, Buttons;=class (TForm): TLabel ;: TLabel ;: TLabel ;: TEdit;:TEdit ;: TDBLookupComboBox ;: TBitBtn ;: TBitBtn ;: TBitBtn; BitBtn1Click (Sender: TObject); BitBtn3Click (Sender: TObject); Edit2KeyPress (Sender: TObject; var Key: Char);
{Private declarations}
{Public declarations} ;: TfAddDolj; Udm;
{$ R * .dfm} TfAddDolj.BitBtn1Click (Sender: TObject);.ADOTable1Dolj.Insert;.ADOTable1Dolj.FieldValues[laquo;Должностьraquo;]:=fAddDolj.Edit1.Text;.ADOTable1Dolj.FieldValues[laquo;Окладraquo;]:=fAddDolj.Edit2.Text;.ADOTable1Dolj.FieldValues[laquo;Подразделениеraquo;]:=fAddDolj.DBLookUpComboBox1.Text;.ADOTable1Dolj.Post;;TfAddDolj.BitBtn3Click(Sender: TObject) ;. Clear; Edit2.Clear ;; TfAddDolj.Edit2KeyPress (Sender: TObject; var Key: Char); (not (Key in [ 0 .. 9 , # 8])) then key:=chr (0); ;. unit uAddSotr ;, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ,, ExtCtrls, Menus, ComCtrls, StdCtrls, Buttons, Mask, DBCtrls;=class (TForm): TLabel ;: TLabel ;: TLabel ;: TLabel;:TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TLabel ;: TBitBtn ;: TBitBtn ;: TEdit ;: TEdit ;: TEdit ;: TEdit ;: TEdit ;: TEdit ;: TEdit ;: TEdit ;: TEdit ;: TEdit ;: TEdit ;: TEdit ;: TMainMenu ;: TMenuItem ;: TBevel ;: TDBLookupComboBox ;: TDBEdit ;: TLabel ;: TLabel ;: TMaskEdit ;: TEdit ;: TLabel ;: TMaskEdit ;: TLabel ;: TEdit ;: TLabel ;: TLabel ;: TDBLookupComboBox ;: TEdit ;: TEdit ;: TLabel ;: TMaskEdit ;: TMonthCalendar; BitBtn1Click (Sender: TObject); FormActivate ( Sender: TObject); BitBtn2Click (Sender: TObject); Edit8KeyPress (Sender: TObject; var Key: Char);
{Private declarations}
{Public declarations} ;: TfAddSotr; Udm, Umain;
{$ R * .dfm} TfAddSotr.BitBtn1Click (Sender: TObject); (DateTimeToStr (now));
//---- додавання сотрудников.ADOTable1Sotr.Insert;.ADOTable1Sotr.FieldByName(laquo;Фамилияraquo;).AsString:=fAddSotr.Edit1.Text;.ADOTable1Sotr.FieldByName(laquo;Имяraquo;).AsString:=fAddSotr.Edit2.Text;.ADOTable1Sotr.FieldByName(laquo;Отчествоraquo;).AsString:=fAddSotr.Edit3.Text;.ADOTable1Sotr.FieldByName(laquo;КодДолжностиraquo;).AsInteger:=dm.ADOTable1Dolj.FieldByName(laquo;КодДолжraquo;).AsVariant;.ADOTable1Sotr.FieldByName(laquo;КодПодразделенияraquo;).AsString:=dm.ADOTable1podr.FieldByName(laquo;КодПодраздraquo;).AsVariant;.ADOTable1Sotr.FieldByName(laquo;СтажВДолжностиraquo;).AsVariant:=StrToInt(fAddSotr.Edit4.Text);.ADOTable1Sotr.FieldByName(laquo;ОбщийСтажraquo;).AsVariant:=StrToInt(fAddSotr.Edit5.Text);.ADOTable1Sotr.FieldByName(laquo;ПриказОПриемеНаРаботуraquo;).AsString:=fAddSotr.Edit6.Text;.ADOTable1Sotr.FieldByName(laquo;Приемraquo;).AsString:=fAddSotr.MaskEdit1.Text;.ADOTable1Sotr.FieldByName(laquo;СрокКонтрактаraquo;).AsVariant:=StrToInt(fAddSotr.Edit7.Text);.ADOTable1Sotr.FieldByName(laquo;Окончаниеraquo;).AsString:=fAddSotr.MaskEdit2.Text;.ADOTable1Sotr.FieldByName(laquo;КоличествоДетейraquo;).AsVariant:=StrToInt(fAddSotr.Edit8.Text);.ADOTable1Sotr.FieldByName(laquo;УсловияСотрудничестваraquo;).AsString:=fAddSotr.Edit9.Text;.ADOTable1Sotr.FieldByName(laquo;ОсобыеОтметкиraquo;).AsString:=fAddSotr.Edit10.Text;
//dm.ADOTable1Sotr.FieldByName(laquo;Возрастraquo;).AsVariant:=StrToInt(fAddSotr.Edit18.Text);
//dm.ADOTable1Sotr.FieldByName(laquo;Возрастraquo;).AsVariant:=(dm.ADOTable1Lich.FieldByName(laquo;ДатаРожденияraquo;).AsDateTime)-now;.ADOTable1Sotr.Post;.ADOTable1Obr.Insert;.ADOTable1Obr.FieldByName(laquo;КодСотрудникаraquo;).AsVariant:=dm.ADOTable1Sotr.FieldByName(laquo;КодСотрудникаraquo;).AsVariant;.ADOTable1Obr.FieldByName(laquo;УровеньОбразованияraquo;).AsString:=fAddSotr.DBLookupComboBox1.Text;.ADOTable1Obr.FieldByName(laquo;УчебноеЗаведениеraquo;).AsString:=fAddSotr.Edit11.Text;.ADOTable1Obr.FieldByName(laquo;ДатаОкончанияraquo;).AsString:=fAddSotr.Edit12.Text;.ADOTable1Obr.FieldByName(laquo;СпециальностьПоДипломуraquo;).AsString:=fAddSotr.Edit13.Text;.ADOTable1Obr.Post;.ADOTable1Lich.Insert;.ADOTable1Lich.FieldByName(laquo;КодСотрудникаraquo;).AsVariant:=dm.ADOTable1Sotr.FieldByName(laquo;КодСотрудникаraquo;).AsVariant;.ADOTable1Lich.FieldByName(laquo;ДатаРожденияraquo;).AsDateTime:=StrToDateTime(fAddSotr.MaskEdit3.Text);.ADOTable1Lich.FieldByName(laquo;Адресraquo;).AsString:=fAddSotr.Edit14.Text;.ADOTable1Lich.FieldByName(laquo;ДомашнийТелефонraquo;).AsString:=fAddSotr.Edit15.Text;.ADOTable1Lich.FieldByName(laquo;МобильныйТелефонraquo;).AsString:=fAddSotr.Edit16.Text;.ADOTable1Lich.Post;;TfAddSotr.FormActivate(Sender: TObject) ;. Date:=Now;