
EditNumberOrder.T ext:='';
DTPOrder.DateTime:=Trunc(Date());
end else begin
DTPDate.DateTime:=IBQQualificationsDates.AsDateTime;
EditDecision.Text:=Trim(IBQQualificationsDecision.AsString);
EditCategory.Text:=Trim(IBQQualificationsCategory.AsString);
EditCategoryShort.Text:=Trim(IBQQualificationsCategoryShort.AsString);
EditNumberProtocol.Text:=Trim(IBQQualificationsNumberProtocol.AsString);
DTPProtocol.DateTime:=IBQQualificationsDateProtocol.AsDateTime;
EditNumberOrder.Text:=Trim(IBQQualificationsNumberOrder.AsString);
DTPOrder.DateTime:=IBQQualificationsDateOrder.AsDateTime;
end;
DTPDate.SetFocus;
end;
procedure TFEditQualifications.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
FEditEmployers.Enabled:=True;
end;
procedure TFEditQualifications.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var RecSave:LongInt;
begin
with DM do
case key of
13: begin
if QualificationAdd then begin
IBQID.SQL.Clear;
IBQID.SQL.Append('select Gen_ID(ID_Qualifications,0) from Qualifications');
IBQID.Open;
RecSave:=IBQIDGen_ID.AsInteger+1;
IBQID.Close;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Insert into Qualifications (Employers,');
IBQExecSQL.SQL.Append('Dates,');
IBQExecSQL.SQL.Append('Decision,');
IBQExecSQL.SQL.Append('Category,');
IBQExecSQL.SQL.Append('CategoryShort,');
IBQExecSQL.SQL.Append('NumberProtocol,');
IBQExecSQL SQL.Append('DateProtocol,');
IBQExecSQL.SQL.Append('NumberOrder,');
IBQExecSQL.SQL.Append('DateOrder)');
IBQExecSQL.SQL.Append('Values
('+IntToStr(IB QEmpl oyersID.AsInteger)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPDate.Date)+char(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditDecision.Text)+char(39)+',');
IB QExecSQL .SQL.Append(chr(39)+Trim(EditC ategory .T ext)+char(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditCategoryShort.Text)+char(39)+',');