You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
2.9 KiB
Plaintext

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 <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> 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('¼<><C2BC><EFBFBD><EFBFBD>').AsString:=employee;
t_code_zy_client.FieldByName('¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=date;
end;
end.