341 |
|
|
342 |
|
procedure TForm1.EmployeesBeforeOpen(DataSet: TDataSet); |
343 |
|
begin |
344 |
< |
if BeforeDate.Date > 0 then |
344 |
> |
if BeforeDate.Date <> NullDate then |
345 |
|
(DataSet as TIBParserDataSet).Parser.Add2WhereClause('HIRE_DATE < :BeforeDate'); |
346 |
< |
if AfterDate.Date > 0 then |
346 |
> |
if AfterDate.Date <> NullDate then |
347 |
|
(DataSet as TIBParserDataSet).Parser.Add2WhereClause('HIRE_DATE > :AfterDate'); |
348 |
|
|
349 |
|
case SalaryRange.ItemIndex of |
358 |
|
|
359 |
|
|
360 |
|
{Parameter value must be set after all SQL changes have been made} |
361 |
< |
if BeforeDate.Date > 0 then |
361 |
> |
if BeforeDate.Date <> NullDate then |
362 |
|
(DataSet as TIBParserDataSet).ParamByName('BeforeDate').AsDateTime := BeforeDate.Date; |
363 |
< |
if AfterDate.Date > 0 then |
363 |
> |
if AfterDate.Date <> NullDate then |
364 |
|
(DataSet as TIBParserDataSet).ParamByName('AfterDate').AsDateTime := AfterDate.Date; |
365 |
|
|
366 |
|
end; |