
VK_F2: AddFormation;
VK_F4: EditFormation;
VK_F8: DeleteFormation;
end;
end;
procedure AddQualification;
begin
with DM do begin
EditQualifications.QualificationAdd:=True;
FEditEmployers.Enabled:=False;
FEditQualifications.Show;
end;
end;
procedure EditQualification;
begin
with DM do
if IBQQualifications.RecordCount>0 then begin
EditQualifications.QualificationAdd:=False;
FEditEmployers.Enabled:=False;
FEditQualifications.Show;
end else Application.MessageBox('HeT данных для
редактирования...','Message' ,MB_OK);
end;
procedure DeleteQualification;
var RecSave:LongInt;
begin
with DM do
if IBQQualifications.RecordCount>0 then begin
if Application.MessageBox(Pchar('Удалить аттестацию от:
'+DateToStr(IBQQualificationsDates.AsDateTime)+'?'),M,ID_OK)=ID_OK then begin
if IBQQualifications.RecordCount>1 then RecSave:=IBQQualifications.RecNo-1;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Delete from Qualifications');
IBQExecSQL.SQL.Append('where ID='+IntToStr(IBQQualificationsID.AsInteger));
IBQExecSQL.ExecSQL;
IBQQualifications.Close;
IBQQualifications.Open;
IBQQualifications.RecNo:=RecSave;
end;
end else Application.MessageBox('Нет данных для удаления','Сообщение',MB_OK);
end;
procedure TFEditEmployers.DBGQualificationKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
begin
case key of
VK_F2: AddQualification;
VK_F4: EditQualification;
VK_F8: DeleteQualification;