Контрольная работа: Разработка программного комплекса
Edit2.Text := '';
ComboBox2.ItemIndex := 0;
Edit3.Text := '';
DateTimePicker1.Date := Now;
end;
procedure TForm3.Button1Click(Sender: TObject);
begin
Worker.FIO := Edit1.Text;
Worker.StartWork := DateTimePicker2.Date;
Worker.Edication := ComboBox1.Text;
Worker.Spec := Edit2.Text;
Worker.sex := ComboBox2.ItemIndex;
Worker.Armi := Edit3.Text;
Worker.BirthDay := DateTimePicker1.Date;
ModalResult := mrOK;
end;
procedure TForm3.Button2Click(Sender: TObject);
begin
ModalResult := mrCancel;
end;
procedure TForm3.FormShow(Sender: TObject);
begin
if not editRecord then
ClearFields
else
begin
Edit1.Text := Worker.FIO;
DateTimePicker2.Date := Worker.StartWork;
ComboBox1.Text := Worker.Edication;