——此文章摘自《Delphi 数据库开发经典案例解析》定价¥特价¥购买>> //取消操作 procedure TmaterialsBitBtnClick(Sender: TObject); begin datasourceDataSetCancel; //在浏览状态下显示的是类别的名称 dbcomboboxVisible:=false; dbcomboboxVisible:=true; //将插入删除修改和移动按钮打开 bitbtnEnabled:=true; bitbtnEnabled:=true; bitbtnEnabled:=true; bitbtnEnabled:=true; bitbtnEnabled:=true; bitbtnEnabled:=true; bitbtnEnabled:=true; bitbtnEnabled:=false; bitbtnEnabled:=false; //不允许修改文本框中的内容 dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; dbeditReadOnly:=true; end; //提交对数据表所作的修改 procedure TmaterialsBitBtnClick(Sender: TObject); begin if applicationMessageBox(确定执行对数据所作的操作?确定MB_OKCANCEL)=IDOK then datasourceDataSetPost else abort; //在浏览状态下显示的是类别的名称 [] [] [] [] [] [] [] [] |