unigui MessageDlg方法调用例子

procedure TfrmEmployee.btnDeleteClick(Sender: TObject);
var
aBool: Boolean;
begin
inherited;
MessageDlg('是否删除?', mtConfirmation, mbYesNo,
procedure(Res: Integer)
begin
aBool :=Res = mrYes;
if aBool then
begin
ClientDataSet1.Delete;
if untDll.SaveData('bas_employee', ClientDataSet1.Delta) then
begin
ClientDataSet1.MergeChangeLog;
ShowMessage('删除成功');
end
else
ShowMessage('删除失败');
end;
end);
end;

你可能感兴趣的:(unigui MessageDlg方法调用例子)