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.
133 lines
3.6 KiB
Plaintext
133 lines
3.6 KiB
Plaintext
unit u_code_country;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, dxExEdtr, BusinessSkinForm, dxTL, dxDBCtrl, dxDBGrid, dxCntner,
|
|
bsSkinCtrls, dxDBTLCl, dxGrClms, ExtCtrls, StdCtrls, Mask, DBCtrls,
|
|
ComCtrls, bsSkinTabs, bsdbctrls, DB, ADODB, wwdbedit, Wwdotdot, Wwdbcomb;
|
|
|
|
type
|
|
Tfrm_code_country = class(TForm)
|
|
dxDBGrid1: TdxDBGrid;
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
Label1: TLabel;
|
|
DBEdit1: TDBEdit;
|
|
Label2: TLabel;
|
|
DBEdit2: TDBEdit;
|
|
Label7: TLabel;
|
|
Label3: TLabel;
|
|
DBEdit3: TDBEdit;
|
|
bsSkinPageControl1: TbsSkinPageControl;
|
|
bsSkinTabSheet1: TbsSkinTabSheet;
|
|
bsSkinTabSheet2: TbsSkinTabSheet;
|
|
DBRichEdit1: TDBRichEdit;
|
|
bsSkinDBImage1: TbsSkinDBImage;
|
|
t_code_country_map1: TDataSource;
|
|
t_code_country_map: TADOQuery;
|
|
t_code_country_mapDSDesigner: TStringField;
|
|
t_code_country_mapDSDesigner2: TBlobField;
|
|
Panel1: TPanel;
|
|
bsSkinButton1: TbsSkinButton;
|
|
bsSkinButton2: TbsSkinButton;
|
|
bsSkinButton4: TbsSkinButton;
|
|
bsSkinButton3: TbsSkinButton;
|
|
bsSkinButton5: TbsSkinButton;
|
|
t_code_disport: TADOQuery;
|
|
t_code_disport1: TDataSource;
|
|
bsSkinTabSheet3: TbsSkinTabSheet;
|
|
dxDBGrid2: TdxDBGrid;
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
dxDBGrid1Column5: TdxDBGridLookupColumn;
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
procedure FormShow(Sender: TObject);
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
procedure bsSkinPanel1Resize(Sender: TObject);
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
{ Public declarations }
|
|
end;
|
|
|
|
var
|
|
frm_code_country: Tfrm_code_country;
|
|
|
|
implementation
|
|
|
|
uses my_sys_function, u_data_share, u_main;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure Tfrm_code_country.FormCloseQuery(Sender: TObject;
|
|
var CanClose: Boolean);
|
|
begin
|
|
CanClose:=frm_close_query(frm_data_share.t_code_country);
|
|
end;
|
|
|
|
procedure Tfrm_code_country.FormShow(Sender: TObject);
|
|
begin
|
|
frm_data_share.t_code_country.requery;
|
|
t_code_country_map.open;
|
|
t_code_disport.open;
|
|
end;
|
|
|
|
procedure Tfrm_code_country.bsSkinButton5Click(Sender: TObject);
|
|
begin
|
|
close;
|
|
end;
|
|
|
|
procedure Tfrm_code_country.bsSkinButton1Click(Sender: TObject);
|
|
begin
|
|
frm_data_share.t_code_country.Insert;
|
|
end;
|
|
|
|
procedure Tfrm_code_country.bsSkinButton2Click(Sender: TObject);
|
|
begin
|
|
table_post(frm_data_share.t_code_country);
|
|
end;
|
|
|
|
procedure Tfrm_code_country.bsSkinButton4Click(Sender: TObject);
|
|
begin
|
|
table_delete(frm_data_share.t_code_country);
|
|
end;
|
|
|
|
procedure Tfrm_code_country.bsSkinButton3Click(Sender: TObject);
|
|
begin
|
|
table_cancel(frm_data_share.t_code_country);
|
|
end;
|
|
|
|
procedure Tfrm_code_country.FormClose(Sender: TObject;
|
|
var Action: TCloseAction);
|
|
begin
|
|
frm_code_country.Hide;
|
|
frm_code_country.ManualFloat(frm_code_country.BoundsRect );
|
|
frm_main.freeTabs('frm_code_country');
|
|
action:=cafree;
|
|
frm_code_country:=nil;
|
|
end;
|
|
|
|
procedure Tfrm_code_country.bsSkinPanel1Resize(Sender: TObject);
|
|
var
|
|
i:integer;
|
|
begin
|
|
i:=round(bsSkinPanel1.width/5);
|
|
bsSkinButton1.width:=i;
|
|
bsSkinButton2.width:=i;
|
|
bsSkinButton4.width:=i;
|
|
bsSkinButton3.width:=i;
|
|
end;
|
|
|
|
end.
|