📄 uform_area_user.pas
字号:
unit Uform_area_user;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, Buttons, DB, ADODB, ImgList, ExtCtrls;
type
Tform_area_user = class(TForm)
Panel1: TPanel;
Image1: TImage;
Label2: TLabel;
Label4: TLabel;
Label3: TLabel;
Label1: TLabel;
Bevel1: TBevel;
Image2: TImage;
ImageList1: TImageList;
recordset_temp: TADOQuery;
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
BitBtn3: TBitBtn;
BitBtn1: TBitBtn;
Apart_list: TListView;
Label5: TLabel;
Label6: TLabel;
procedure FormShow(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
areaid:integer;
intCount:integer;
end;
var
form_area_user: Tform_area_user;
implementation
uses Uform_dollor_list;
{$R *.dfm}
procedure Tform_area_user.FormShow(Sender: TObject);
var
i:integer;
ListItem: TListItem;
p:^integer;
begin
//show the user list in the area 2002-1-30pm
//clear the listitem
apart_list.Items.Clear ;
//get the area's name
recordset_temp.SQL.Clear;
recordset_temp.SQL.Add('select * from [AREA] where [AREA_ID]=' + inttostr(areaid));
recordset_temp.Open ;
if recordset_temp.RecordCount >0 then label5.Caption :=recordset_temp.Fields[1].AsString ;
recordset_temp.close;
// add the user into the list
recordset_temp.SQL.Clear ;
recordset_temp.SQL.Add (
'select [CUSTOM_ID],[CUSTOM_CODE],[CUSTOM_MNAME],[CUSTOM_FNAME],[CUSTOM_TEL],[AREA_NAME],[CUSTOM_ADD],[FROM_NAME],[CUSTOM_POST],[CUSTOM_DATE] ' +
'from [CUSTOM],[AREA],[FROM] '+
'where [CUSTOM_AREA]=[AREA_ID] and [CUSTOM_FROM]=[FROM_ID] and [CUSTOM_AREA]=' + inttostr(areaid));
recordset_temp.Open ;
intCount:=recordset_temp.RecordCount ;
Label4.Caption :=inttostr(intCount) + '名';
for i:=1 to recordset_temp.RecordCount do
begin
listitem:=apart_LIST.Items.Add ;
listitem.Caption :=recordset_temp.Fields[1].AsString ;
listitem.ImageIndex :=0;
listitem.SubItems.Add(recordset_temp.Fields[2].asstring);
listitem.SubItems.Add(recordset_temp.Fields[3].asstring);
listitem.SubItems.Add(recordset_temp.Fields[4].asstring);
listitem.SubItems.Add(recordset_temp.Fields[5].asstring);
listitem.SubItems.Add(recordset_temp.Fields[6].asstring);
listitem.SubItems.Add(recordset_temp.Fields[7].asstring);
listitem.SubItems.Add(recordset_temp.Fields[8].asstring);
listitem.SubItems.Add(DateTimeToStr(recordset_temp.Fields[9].AsDateTime));
new(p);
p^ := recordset_temp.Fields[0].AsInteger ;
listitem.Data :=p;
recordset_temp.Next;
end;
recordset_temp.close;
end;
procedure Tform_area_user.BitBtn3Click(Sender: TObject);
begin
close;
end;
procedure Tform_area_user.BitBtn1Click(Sender: TObject);
var
p:^integer;
begin
if Apart_list.selected=nil then exit;
p:=apart_list.Selected.Data ;
form_dollor_list.cid:=p^;
form_dollor_list.ShowModal ;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -