828
社区成员
发帖
与我相关
我的任务
分享
//这是保存时调用的函数
function Tfrmabc.DoSave: Integer;
begin
if BzWorkStatus=wsBrowse then //BzWorkStatus即为内存表的状态
begin
ShowMessage('浏览状态无法保存记录!');
exit;
end;
SetBzWorkStatus; //此事件判断一下如果状态为dsEdit或dsInsert时,保存最后一条记录
{代码大致为 if (Components[i] as TMemTableEh).State in [dsEdit, dsInsert] then
(Components[i] as TMemTableEh).Post;}
//后面就是一个检查字段不能为空,否则退出
sResult := CheckFieldValidity(cftNull,dataset,字段1,字段2,字段3);
if sResult<>'' then
begin
BzMessageBox('提示:','['+sResult+'] 不得为空!',DM_INFO);
exit;
end;
//最后就是一个xml的提交到后台数据库保存的过程 protocol事件
//代码略。。。
Protocol;