unit u_op_project; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, BusinessSkinForm, DB, ADODB, bsSkinCtrls, ExtCtrls, Grids, Wwdbigrd, Wwdbgrid, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb, wwdblook, RxMemDS, DBCtrls; type Tfrm_op_project = class(TForm) t_ch_project: TADOQuery; t_ch_project1: TDataSource; Panel1: TPanel; Panel2: TPanel; Panel3: TPanel; wwDBGrid1: TwwDBGrid; bsSkinButton1: TbsSkinButton; bsSkinButton2: TbsSkinButton; bsSkinButton4: TbsSkinButton; bsSkinButton3: TbsSkinButton; bsSkinButton14: TbsSkinButton; DBMemo3: TDBMemo; DBMemo4: TDBMemo; DBMemo5: TDBMemo; Label23: TLabel; Label24: TLabel; Label29: TLabel; Button1: TButton; procedure FormShow(Sender: TObject); procedure Panel3Resize(Sender: TObject); procedure bsSkinButton9Click(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); procedure bsSkinButton2Click(Sender: TObject); procedure bsSkinButton4Click(Sender: TObject); procedure bsSkinButton3Click(Sender: TObject); procedure t_ch_projectAfterInsert(DataSet: TDataSet); procedure t_ch_projectBeforePost(DataSet: TDataSet); procedure t_ch_projectPostError(DataSet: TDataSet; E: EDatabaseError; var Action: TDataAction); procedure Button1Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); private procedure t_ch_feecurrcharge(Sender: TField); { Private declarations } public { Public declarations } end; var frm_op_project: Tfrm_op_project; implementation uses u_main, u_data_share, my_sys_function; {$R *.dfm} procedure Tfrm_op_project.FormShow(Sender: TObject); begin { t_ch_project.SQL.clear; t_ch_project.sql.add('select * from t_ch_project '); t_ch_project.SQL.Add(' where '+open_data('8005','录入人','no','no','no','no') +'order by 方案名称'); t_ch_project.open; } end; procedure Tfrm_op_project.Panel3Resize(Sender: TObject); var i:integer; begin i:=round(Panel3.width/5); bsSkinButton1.width:=i; bsSkinButton14.width:=i; bsSkinButton2.width:=i; bsSkinButton4.width:=i; end; procedure Tfrm_op_project.bsSkinButton9Click(Sender: TObject); begin close; end; procedure Tfrm_op_project.bsSkinButton1Click(Sender: TObject); begin t_ch_project.insert; end; procedure Tfrm_op_project.t_ch_feecurrcharge(Sender: TField); begin end; procedure Tfrm_op_project.bsSkinButton2Click(Sender: TObject); begin table_post(t_ch_project); end; procedure Tfrm_op_project.bsSkinButton4Click(Sender: TObject); begin table_delete(t_ch_project); end; procedure Tfrm_op_project.bsSkinButton3Click(Sender: TObject); begin table_cancel(t_ch_project); end; procedure Tfrm_op_project.t_ch_projectAfterInsert(DataSet: TDataSet); begin t_ch_project['录入人']:=employee; t_ch_project['录入日期']:=date; end; procedure Tfrm_op_project.t_ch_projectBeforePost(DataSet: TDataSet); begin table_before_post(t_ch_project,'方案名称'); table_before_post(t_ch_project,'费用类型'); table_before_post(t_ch_project,'业务种类'); end; procedure Tfrm_op_project.t_ch_projectPostError(DataSet: TDataSet; E: EDatabaseError; var Action: TDataAction); begin table_post_error_primary('方案名称',E); table_post_error_primary('方案代码',E); end; procedure Tfrm_op_project.Button1Click(Sender: TObject); begin frm_op_project.Close; end; procedure Tfrm_op_project.FormClose(Sender: TObject; var Action: TCloseAction); begin frm_op_project.free; frm_op_project:=nil; end; end.