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.

169 lines
4.7 KiB
Plaintext

11 months ago
unit u_code_card;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, Grids, Wwdbigrd, Wwdbgrid, bsSkinCtrls,
ComCtrls, bsSkinTabs, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
dxDBTLCl, dxGrClms;
type
Tfrm_code_card = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinGroupBox1: TbsSkinGroupBox;
bsSkinGroupBox2: TbsSkinGroupBox;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column1: TdxDBGridMaskColumn;
dxDBGrid2Column2: TdxDBGridMaskColumn;
dxDBGrid2Column3: TdxDBGridDateColumn;
bsSkinPanel3: TbsSkinPanel;
bsSkinPanel4: TbsSkinPanel;
bsSkinButton10: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
dxDBGrid3: TdxDBGrid;
dxDBGrid3Column1: TdxDBGridMaskColumn;
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 bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinPanel2Resize(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_code_card: Tfrm_code_card;
implementation
uses u_data_share, my_sys_function, u_main;
{$R *.dfm}
procedure Tfrm_code_card.FormShow(Sender: TObject);
begin
frm_data_share.t_code_card.requery;
frm_data_share.t_code_card_project.requery;
frm_data_share.t_code_card_project_de.requery;
end;
procedure Tfrm_code_card.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(frm_data_share.t_code_card);
CanClose:=frm_close_query(frm_data_share.t_code_card_project);
CanClose:=frm_close_query(frm_data_share.t_code_card_project_de);
end;
procedure Tfrm_code_card.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_code_card.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(frm_data_share.t_code_card);
end;
procedure Tfrm_code_card.bsSkinButton2Click(Sender: TObject);
begin
table_post(frm_data_share.t_code_card);
end;
procedure Tfrm_code_card.bsSkinButton4Click(Sender: TObject);
begin
table_delete(frm_data_share.t_code_card);
end;
procedure Tfrm_code_card.bsSkinButton1Click(Sender: TObject);
begin
frm_data_share.t_code_card.Insert;
end;
procedure Tfrm_code_card.bsSkinButton6Click(Sender: TObject);
begin
frm_data_share.t_code_card_project.Insert;
end;
procedure Tfrm_code_card.bsSkinButton7Click(Sender: TObject);
begin
table_post(frm_data_share.t_code_card_project);
end;
procedure Tfrm_code_card.bsSkinButton8Click(Sender: TObject);
begin
table_delete(frm_data_share.t_code_card_project);
end;
procedure Tfrm_code_card.bsSkinButton9Click(Sender: TObject);
begin
table_cancel(frm_data_share.t_code_card_project);
end;
procedure Tfrm_code_card.bsSkinButton11Click(Sender: TObject);
begin
table_delete(frm_data_share.t_code_card_project_de);
end;
procedure Tfrm_code_card.bsSkinButton10Click(Sender: TObject);
begin
if frm_data_share.t_code_card_project.IsEmpty then
exit;
if frm_data_share.t_code_card.IsEmpty then
exit;
frm_data_share.t_code_card_project_de.insert;
frm_data_share.t_code_card_project_de['<27><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>']:=frm_data_share.t_code_card['<27><>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>'];
frm_data_share.t_code_card_project_de.post;
end;
procedure Tfrm_code_card.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_code_card.Hide;
frm_code_card.ManualFloat(frm_code_card.BoundsRect );
frm_main.freeTabs('frm_code_card');
action:=cafree;
frm_code_card:=nil;
end;
procedure Tfrm_code_card.bsSkinPanel2Resize(Sender: TObject);
VAR
i:integer;
begin
i:=round(bsSkinPanel2.Width/5);
bsSkinButton6.Width:=i;
bsSkinButton7.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton9.Width:=i;
end;
end.