/****** Object: Table [dbo].[Products] Script Date: 2003-12-26 12:44:00 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Products]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Products]
GO
//编辑
if (Sender as TBitBtn).Name='btn_Edit' then
begin
ds_DataSource.DataSet.Edit();
pg_Page.ActivePageIndex:=0;
cb_NameCN.SelectAll();
cb_NameCN.SetFocus();
end;
procedure TfrmProducts.aq_ADOQueryAfterEdit(DataSet: TDataSet);
begin
ed_OperatorEx.Field.Value:=g_sOperator;
ed_ModifyDate.Field.Value:=Now();
end;
代码在那边也有:
if (Sender as TBitBtn).Name='btn_Post' then
begin
//检查数据是否完整
if not CheckField() then exit;
if ed_Long.Text='' then ed_Long.Field.Value:=0;
if ed_Width.Text='' then ed_Width.Field.Value:=0;
if ed_Height.Text='' then ed_Height.Field.Value:=0;
if ed_PackingLong.Text='' then ed_PackingLong.Field.Value:=0;
if ed_PackingWidth.Text='' then ed_PackingWidth.Field.Value:=0;
if ed_PackingHeight.Text='' then ed_PackingHeight.Field.Value:=0;
if ed_PackingVol.Text='' then ed_PackingVol.Field.Value:=0;
if ed_PackingOuterBoxQuantity.Text='' then ed_PackingOuterBoxQuantity.Field.Value:=0;
if ed_PackingInnerBoxCount.Text='' then ed_PackingInnerBoxCount.Field.Value:=0;
if ed_GrossWeight.Text='' then ed_GrossWeight.Field.Value:=0;
if ed_NetWeight.Text='' then ed_NetWeight.Field.Value:=0;