1 var sl:TStrings;
2 begin
3 CommitDataSet;
4 sl:=TStringList.Create;
5 with dsrBill.DataSet do try
6 if FieldByName('SERVICETYPE').AsInteger=0 then sl.Add('服务方式为空!');
7 if Trim(FieldByName('Attn').AsString)='' then sl.Add('联系人为空!');
8 if sl.Count>0 then begin
9 //Result:=False;
10 ShowMessage(sl.Text);
11 exit;
12 end;
13 finally
14 sl.free;
15 end