📄 uform_user_list.pas
字号:
unit Uform_user_list;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ImgList, DB, ADODB, ComCtrls, StdCtrls, Buttons, ExtCtrls;
type
Tform_user_list = class(TForm)
Panel1: TPanel;
Image1: TImage;
Label2: TLabel;
Label4: TLabel;
Label3: TLabel;
Label1: TLabel;
Bevel1: TBevel;
Image2: TImage;
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
BitBtn3: TBitBtn;
Apart_list: TListView;
recordset_temp: TADOQuery;
ImageList1: TImageList;
BitBtn1: TBitBtn;
procedure FormShow(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
intCount:integer;
end;
var
form_user_list: Tform_user_list;
implementation
uses Uform_dollor_list;
{$R *.dfm}
procedure Tform_user_list.FormShow(Sender: TObject);
var
i:integer;
ListItem: TListItem;
p:^integer;
begin
apart_list.Items.Clear ;
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]');
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;
end;
procedure Tform_user_list.BitBtn3Click(Sender: TObject);
begin
close;
end;
procedure Tform_user_list.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 + -