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;

posted @ 2015-04-11 12:31  delphi中间件  阅读(1788)  评论(0编辑  收藏  举报