
IBQExecSQL.SQL.Append('DateFrom,');
IBQExecSQL.SQL.Append('DateTo,');
IBQExecSQL.SQL.Append('Pedagogs,');
IBQExecSQL.SQL.Append('Unceasing)');
IBQExecSQL.SQL.Append('Values ('+IntToStr(IBQEmployersID.AsInteger)+',');
IBQExecSQL.SQL.Append(IntToStr(IBQJobTitlesID.AsInteger)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPOrder.Date)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+Trim(EditOrder.Text)+chr(39)+',');
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPBegin.Date)+chr(39)+',');
if CBDateEnd.Checked=False then DTPEnd.DateTime:=0;
IBQExecSQL.SQL.Append(chr(39)+DateToStr(DTPEnd.Date)+chr(39)+',');
if CBPedagogs.Checked then IBQExecSQL.SQL.Append('1,')
else IBQExecSQL.SQL.Append('0,');
if CBUnceasing.Checked then IBQExecSQL.SQL.Append('1)')
else IBQExecSQL.SQL.Append('0)');
end else begin
RecSave:=IB QMoti onEmpl oyersID. AsInteger;
IBQExecSQL.SQL.Clear;
IBQExecSQL.SQL.Append('Update MotionEmployers');
IBQExecSQL.SQL.Append('Set JobTitle='+IntToStr(IBQJobTitlesID.AsInteger)+',');
IBQExecSQL.SQL.Append('DateOrder='+chr(39)+DateToStr(DTPOrder.Date)+chr(39)+',');
IBQExecSQL.SQL.Append('OrderNumber='+chr(39)+Trim(EditOrder.Text)+chr(39)+',');
IBQExecSQL.SQL.Append('DateFrom='+chr(39)+DateToStr(DTPBegin.Date)+chr(39)+',');
if CBDateEnd.Checked=False then DTPEnd.DateTime:=0;
IBQExecSQL.SQL.Append('DateTo='+chr(39)+DateToStr(DTPEnd.Date)+chr(39)+',');
if CBPedagogs.Checked then IBQExecSQL.SQL.Append('Pedagogs=1,')
else IBQExecSQL.SQL.Append('Pedagogs=0,');
if CBUnceasing.Checked then IBQExecSQL.SQL.Append('Unceasing=1')
else IBQExecSQL.SQL.Append('Unceasing=0');
IBQExecSQL.SQL.Append('where ID='+IntToStr(RecSave));
end;
IB QExec S QL ExecSQL;
IBQMotionEmployers.Close;
IB QMoti onEmpl oy ers.Open;
IBQMotionEmployers.Locate('ID',RecSave,[loCaseInsensitive]);
if IBQMotionEmployers.RecNo<IBQMotionEmployers.RecordCount then
IBQJobTitles.Locate('ID',RecSaveJobTitle,[loCaseInsensitive]);
FEditMotions.Close;
end;
27: FEditMotions.Close;
end;
end;
procedure TFEditMotions.CBDateEndClick(Sender: TObject);
begin
if CBDateEnd.Checked then DTPEnd.Visible:=True