unit u_code_zy_cust; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, dxExEdtr, BusinessSkinForm, dxTL, dxDBCtrl, dxDBGrid, dxCntner, bsSkinCtrls, ExtCtrls, StdCtrls, DB, ADODB, Grids, Wwdbigrd, Wwdbgrid, wwdblook; type Tfrm_code_zy_cust = class(TForm) Panel1: TPanel; bsSkinButton1: TbsSkinButton; bsSkinButton2: TbsSkinButton; bsSkinButton4: TbsSkinButton; bsSkinButton3: TbsSkinButton; bsSkinButton5: TbsSkinButton; bsBusinessSkinForm1: TbsBusinessSkinForm; bsSkinPanel1: TbsSkinPanel; bsSkinSpeedButton1: TbsSkinSpeedButton; t_code_zy_client: TADOQuery; t_code_zy_client1: TDataSource; wwDBGrid1: TwwDBGrid; wwDBLookupCombo11: TwwDBLookupCombo; Label3: TLabel; Edit3: TEdit; procedure FormShow(Sender: TObject); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure bsSkinButton5Click(Sender: TObject); procedure bsSkinButton3Click(Sender: TObject); procedure bsSkinButton2Click(Sender: TObject); procedure bsSkinButton4Click(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); procedure bsSkinSpeedButton1Click(Sender: TObject); procedure Edit1KeyPress(Sender: TObject; var Key: Char); procedure t_code_zy_clientNewRecord(DataSet: TDataSet); private { Private declarations } public { Public declarations } end; var frm_code_zy_cust: Tfrm_code_zy_cust; implementation uses u_data_share, my_sys_function, u_main; {$R *.dfm} procedure Tfrm_code_zy_cust.FormShow(Sender: TObject); begin t_code_zy_client.open; end; procedure Tfrm_code_zy_cust.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin CanClose:=frm_close_query(t_code_zy_client); t_code_zy_client.close; end; procedure Tfrm_code_zy_cust.bsSkinButton5Click(Sender: TObject); begin close; end; procedure Tfrm_code_zy_cust.bsSkinButton3Click(Sender: TObject); begin table_cancel(t_code_zy_client); end; procedure Tfrm_code_zy_cust.bsSkinButton2Click(Sender: TObject); begin table_post(t_code_zy_client); end; procedure Tfrm_code_zy_cust.bsSkinButton4Click(Sender: TObject); begin table_delete(t_code_zy_client); end; procedure Tfrm_code_zy_cust.bsSkinButton1Click(Sender: TObject); begin t_code_zy_client.Insert; end; procedure Tfrm_code_zy_cust.bsSkinSpeedButton1Click(Sender: TObject); begin with t_code_zy_client do begin Close;sql.Clear; sql.Add('select * from t_code_zy_client where 1=1 '); if edit3.text<>'' then SQL.Add(' and 客户简称 like ''%'+edit3.text+'%'''); open; end; end; procedure Tfrm_code_zy_cust.Edit1KeyPress(Sender: TObject; var Key: Char); begin if Key=#13 then bsSkinSpeedButton1.OnClick(Sender); end; procedure Tfrm_code_zy_cust.t_code_zy_clientNewRecord(DataSet: TDataSet); begin t_code_zy_client.FieldByName('录入人').AsString:=employee; t_code_zy_client.FieldByName('录入日期').AsDateTime:=date; end; end.