procedure TBM_CHANGEFILEF.SpeedButton5Click(Sender: TObject);
begin
listbox1.Items.Clear ;
SearchFile(edit1.Text+'\'+edit2.Text);
end;
procedure TBM_CHANGEFILEF.SpeedButton6Click(Sender: TObject);
begin
close;
end;
procedure TBM_CHANGEFILEF.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
canclose:=true;
end;
procedure TBM_CHANGEFILEF.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action:=cafree;
end;
end.
3.4 邮编区号管理界面与代码设计
代码设计
unit BM_POSTU;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ImgList, Grids, DBGrids, ExtCtrls, ComCtrls, Buttons, StdCtrls,
ToolWin, DB, ADODB;
type
TBM_POSTF = class(TForm)
Panel1: TPanel;
StatusBar1: TStatusBar;
Panel2: TPanel;
Splitter1: TSplitter;
DBGrid1: TDBGrid;
DSPOST: TDataSource;
QPOST: TADOQuery;
qpost2: TADOQuery;
DSPOST2: TDataSource;
ListBox1: TListBox;
Edit1: TEdit;
SpeedButton1: TSpeedButton;
Label1: TLabel;
Label2: TLabel;
Edit2: TEdit;
Label3: TLabel;
Edit3: TEdit;
Label4: TLabel;
Edit4: TEdit;
SpeedButton2: TSpeedButton;
procedure FormCreate(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
procedure DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
private
{ Private declarations }
procedure int2();
public
{ Public declarations }
end;
var
BM_POSTF: TBM_POSTF;
implementation
uses BM_DMU;
{$R *.dfm}
procedure TBM_POSTF.int2;
var sql1:string;
i:integer;
begin
sql1:='select DISTINCT 所属 from 邮编电话';
LISTBOX1.Items.Clear ; with qPOST do
begin
close;
sql.Clear ;
sql.Add(sql1);
Open ;
first;
if qPOST.RecordCount >0 then
<< 上一页 [21] [22] [23] [24] [25] [26] 下一页