Home > Back-end >  Delete the prompt dialog box problem
Delete the prompt dialog box problem

Time:05-08

IF MessageBox (Handle, 'delete? ', 'warning', MB_OKCANCEL + MB_ICONWARNING)=IDOK Then
The begin
The Main. ADOQuery1. Delete;
end;

I want to achieve is:

ADOQuery01. FieldByName (' SourceName). AsString; Capturing the//, li si, where is this code in the
Click delete the tip: delete bill?

IF MessageBox (Handle, 'delete? + ADOQuery01. FieldByName (" StudentName "). The AsString; ', 'warning', MB_OKCANCEL + MB_ICONWARNING)=IDOK Then
The begin
The Main. ADOQuery1. Delete;
end;

CodePudding user response:

The function DeleteClick (aQuery, bQuery: TADOQuery) : Boolean;
The begin
Result:=False;
If aQuery. Eof then Exit;
If aQuery. Bof then Exit;
If aQuery. RecordCount<1 then the Exit;

If bQuery. Locate (" StudentName ", 'bill', []) then
If Application. MessageBox (' delete bill? ', 'warning', MB_ICONQUESTION + MB_OKCANCEL)=IDOK then
AQuery. Delete;
end;

CodePudding user response:

 
If MessageBox (Handle, PChar (Format (' delete % s? ', [ADOQuery01 FieldByName (" StudentName "). AsString]), 'warning', MB_OKCANCEL + MB_ICONWARNING)=IDOK then
  • Related