unit u_code_goods; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, dxExEdtr, BusinessSkinForm, dxDBTLCl, dxGrClms, dxDBGrid, dxTL, dxDBCtrl, dxCntner, bsSkinCtrls, StdCtrls, Mask, DBCtrls, ExtCtrls; type Tfrm_code_goods = class(TForm) dxDBGrid1: TdxDBGrid; bsBusinessSkinForm1: TbsBusinessSkinForm; dxDBGrid1Column1: TdxDBGridMaskColumn; dxDBGrid1Column2: TdxDBGridMaskColumn; DBEdit1: TDBEdit; Label1: TLabel; Label2: TLabel; DBEdit2: TDBEdit; DBMemo1: TDBMemo; Label3: TLabel; DBEdit3: TDBEdit; Label4: TLabel; Panel1: TPanel; bsSkinButton1: TbsSkinButton; bsSkinButton2: TbsSkinButton; bsSkinButton4: TbsSkinButton; bsSkinButton3: TbsSkinButton; bsSkinButton5: TbsSkinButton; Label5: TLabel; DBMemo2: TDBMemo; Label6: TLabel; DBEdit4: TDBEdit; Label7: TLabel; DBEdit5: TDBEdit; Label8: TLabel; DBEdit6: TDBEdit; Label9: TLabel; DBEdit7: TDBEdit; Label10: TLabel; DBEdit8: TDBEdit; procedure bsSkinButton5Click(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); procedure bsSkinButton2Click(Sender: TObject); procedure bsSkinButton4Click(Sender: TObject); procedure bsSkinButton3Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure FormKeyPress(Sender: TObject; var Key: Char); private { Private declarations } public { Public declarations } end; var frm_code_goods: Tfrm_code_goods; implementation uses u_data_share, my_sys_function; {$R *.dfm} procedure Tfrm_code_goods.bsSkinButton5Click(Sender: TObject); begin close; end; procedure Tfrm_code_goods.bsSkinButton1Click(Sender: TObject); begin frm_data_share.t_code_goods.Insert; end; procedure Tfrm_code_goods.bsSkinButton2Click(Sender: TObject); begin table_post(frm_data_share.t_code_goods); end; procedure Tfrm_code_goods.bsSkinButton4Click(Sender: TObject); begin table_delete(frm_data_share.t_code_goods); end; procedure Tfrm_code_goods.bsSkinButton3Click(Sender: TObject); begin table_cancel(frm_data_share.t_code_goods); end; procedure Tfrm_code_goods.FormShow(Sender: TObject); begin frm_data_share.t_code_goods.requery; end; procedure Tfrm_code_goods.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin CanClose:=frm_close_query(frm_data_share.t_code_goods); end; procedure Tfrm_code_goods.FormKeyPress(Sender: TObject; var Key: Char); begin if key=#13 then begin if not(activecontrol is Tdbmemo) and not(activecontrol is Tdxdbgrid)then begin Perform(WM_NEXTDLGCTL,0,0); key:=#0; end; end; end; end.