|
|
unit u_code_fee_project_cargomainfest;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, wwdbedit, Wwdotdot, Wwdbcomb, Mask, DBCtrls, StdCtrls, wwdblook,
|
|
|
Grids, Wwdbigrd, Wwdbgrid, bsSkinCtrls, ExtCtrls, DB, ADODB, DBGrids,
|
|
|
DBGridEh;
|
|
|
|
|
|
type
|
|
|
Tfrm_project_fee_cargomainfest = class(TForm)
|
|
|
Panel2: TPanel;
|
|
|
Panel4: TPanel;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
wwDBLookupCombo2: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo1: TwwDBLookupCombo;
|
|
|
DBEdit1: TDBEdit;
|
|
|
Panel1: TPanel;
|
|
|
Panel3: TPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
wwDBGrid1: TwwDBGrid;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
t_ch_project_fee: TADOQuery;
|
|
|
t_ch_project: TADOQuery;
|
|
|
t_ch_project1: TDataSource;
|
|
|
t_ch_project_fee1: TDataSource;
|
|
|
Panel5: TPanel;
|
|
|
Panel6: TPanel;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
DBEdit2: TDBEdit;
|
|
|
Label1: TLabel;
|
|
|
Label2: TLabel;
|
|
|
DBMemo1: TDBMemo;
|
|
|
Label4: TLabel;
|
|
|
Memo1: TMemo;
|
|
|
Label3: TLabel;
|
|
|
wwDBLookupCombo4: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo5: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo6: TwwDBLookupCombo;
|
|
|
DBGridEh1: TDBGridEh;
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure t_ch_projectAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_ch_projectBeforePost(DataSet: TDataSet);
|
|
|
procedure t_ch_project_feeAfterInsert(DataSet: TDataSet);
|
|
|
procedure t_ch_project_feeBeforeInsert(DataSet: TDataSet);
|
|
|
procedure t_ch_project_fee_detailBeforeInsert(DataSet: TDataSet);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_project_fee_cargomainfest: Tfrm_project_fee_cargomainfest;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_data_share, u_main, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_project.insert;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_ch_project);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_ch_project);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_ch_project);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_project_fee.insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_ch_project_fee);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_ch_project_fee);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.bsSkinButton8Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_ch_project_fee);
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
if t_ch_project.State in [dsedit,dsinsert] then
|
|
|
t_ch_project.Post;
|
|
|
if t_ch_project_fee.State in [dsedit,dsinsert] then
|
|
|
t_ch_project_fee.Post;
|
|
|
|
|
|
frm_project_fee_cargomainfest.Hide;
|
|
|
frm_project_fee_cargomainfest.ManualFloat(frm_project_fee_cargomainfest.BoundsRect );
|
|
|
frm_main.freeTabs('frm_project_fee_cargomainfest');
|
|
|
action:=cafree;
|
|
|
frm_project_fee_cargomainfest:=nil;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
t_ch_project.close;
|
|
|
t_ch_project.SQL.clear;
|
|
|
t_ch_project.sql.add('select * from t_ch_project_cargomainfest ');
|
|
|
t_ch_project.SQL.Add(' where 1=1 order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
t_ch_project.open;
|
|
|
t_ch_project_fee.open;
|
|
|
|
|
|
frm_data_share.t_code_fee.requery;
|
|
|
frm_data_share.t_crm_client_daili.requery;
|
|
|
frm_data_share.t_code_currency.requery;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.t_ch_projectAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_ch_project['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
t_ch_project['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.t_ch_projectBeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
table_before_post(t_ch_project,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_ch_project,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.t_ch_project_feeAfterInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
t_ch_project_fee['<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>']:='Ĭ<><C4AC>';
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.t_ch_project_feeBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if t_ch_project.State in [dsedit,dsinsert] then
|
|
|
t_ch_project.Post;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_project_fee_cargomainfest.t_ch_project_fee_detailBeforeInsert(
|
|
|
DataSet: TDataSet);
|
|
|
begin
|
|
|
if t_ch_project_fee.State in [dsedit,dsinsert] then
|
|
|
t_ch_project_fee.Post;
|
|
|
end;
|
|
|
|
|
|
end.
|