if application.MessageBox('是否保存?','提示',MB_YesNo+MB_iconquestion)=idyes then
begin
adoquery1.Post;
这样就把一条记录保存进入数据库了,可我点击提示框的NO的时候,这些内容还停留在dbedit1,dbedit2等等上面该如何办?
if application.MessageBox('是否保存?','提示',MB_YesNo+MB_iconquestion)=idyes then begin adoquery1.Post; 这样就把一条记录保存进入数据库了,可我点击提示框的NO的时候,这些内容还停留在dbedit1,dbedit2等等上面该如何办? 我想点击提示框的NO时候,在dbeidt1...显示第一条记录,也就是回到窗体刚打开的情况。能办到吗?
if application.MessageBox('是否保存?','提示',MB_YesNo+MB_iconquestion)=idyes then
begin
adoquery1.Post;
end
else
begin
adoquery1.cancel;
adoquery1.prior;
end;