|
|
unit u_code_port_air;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, dxExEdtr, BusinessSkinForm, dxTL, dxDBCtrl, dxDBGrid, dxCntner,
|
|
|
bsSkinCtrls, ExtCtrls, StdCtrls, DB, ADODB;
|
|
|
|
|
|
type
|
|
|
Tfrm_code_port_air = class(TForm)
|
|
|
Panel1: TPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
Edit1: TEdit;
|
|
|
Label1: TLabel;
|
|
|
Edit2: TEdit;
|
|
|
Label2: TLabel;
|
|
|
Edit3: TEdit;
|
|
|
Label3: TLabel;
|
|
|
bsSkinSpeedButton1: TbsSkinSpeedButton;
|
|
|
t_code_port_air: TADOQuery;
|
|
|
t_code_port_air1: TDataSource;
|
|
|
Label4: TLabel;
|
|
|
Edit4: 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 t_code_port_airBeforePost(DataSet: TDataSet);
|
|
|
procedure bsSkinSpeedButton1Click(Sender: TObject);
|
|
|
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_code_port_air: Tfrm_code_port_air;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_data_share, my_sys_function, u_main;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_code_port_air.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
t_code_port_air.open;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_port_air.FormCloseQuery(Sender: TObject;
|
|
|
var CanClose: Boolean);
|
|
|
begin
|
|
|
CanClose:=frm_close_query(t_code_port_air);
|
|
|
t_code_port_air.close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_port_air.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_port_air.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(t_code_port_air);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_port_air.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(t_code_port_air);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_port_air.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(t_code_port_air);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_port_air.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
t_code_port_air.Insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_port_air.t_code_port_airBeforePost(DataSet: TDataSet);
|
|
|
begin
|
|
|
table_before_post(t_code_port_air,'<27><><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_code_port_air,'Ӣ<><D3A2><EFBFBD><EFBFBD>');
|
|
|
table_before_post(t_code_port_air,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_port_air.bsSkinSpeedButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
with t_code_port_air do begin
|
|
|
Close;sql.Clear;
|
|
|
sql.Add('select * from t_code_port_air where 1=1 ');
|
|
|
if edit1.text<>'' then
|
|
|
SQL.Add(' and <20><><EFBFBD><EFBFBD> like ''%'+edit1.text+'%''');
|
|
|
if edit2.text<>'' then
|
|
|
SQL.Add(' and Ӣ<><D3A2><EFBFBD><EFBFBD> like ''%'+edit2.text+'%''');
|
|
|
if edit3.text<>'' then
|
|
|
SQL.Add(' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like ''%'+edit3.text+'%''');
|
|
|
if edit4.text<>'' then
|
|
|
SQL.Add(' and <20><><EFBFBD><EFBFBD> like ''%'+edit4.text+'%''');
|
|
|
open;
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_port_air.Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
begin
|
|
|
if Key=#13 then
|
|
|
bsSkinSpeedButton1.OnClick(Sender);
|
|
|
end;
|
|
|
|
|
|
end.
|