T
terry_zhou82
Unregistered / Unconfirmed
GUEST, unregistred user!
我的通过程序比较2个DATATIMEPICKER间的日期差距,如果小于4,就出现警告语句,但是为使么会连续出现2次SHOWMESSAGE,让我点击2次呢? 具体代码如下:
function TForm1.Day: byte
begin
result := DaysBetween(Datetimepicker1.Date, datetimepicker2.Date)
end
procedure TForm1.DateTimePicker2Change(Sender: TObject)
begin
if day<4 then
showmessage('此票业务没有超期费产生哦!请重新选择日期')
end
function TForm1.Day: byte;
begin
result := DaysBetween(Datetimepicker1.Date, datetimepicker2.Date);
end;
procedure TForm1.DateTimePicker2Change(Sender: TObject);
begin
if day<4 then
showmessage('此票业务没有超期费产生哦!请重新选择日期');
end;
function TForm1.Day: byte
begin
result := DaysBetween(Datetimepicker1.Date, datetimepicker2.Date)
end
procedure TForm1.DateTimePicker2Change(Sender: TObject)
begin
if day<4 then
showmessage('此票业务没有超期费产生哦!请重新选择日期')
end
function TForm1.Day: byte;
begin
result := DaysBetween(Datetimepicker1.Date, datetimepicker2.Date);
end;
procedure TForm1.DateTimePicker2Change(Sender: TObject);
begin
if day<4 then
showmessage('此票业务没有超期费产生哦!请重新选择日期');
end;