unit8.~pas
来自「用delphi开发的户籍管理系统」· ~PAS 代码 · 共 67 行
~PAS
67 行
unit Unit8;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, jpeg;
type
TForm8 = class(TForm)
Label2: TLabel;
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
abc:string;
end;
var
Form8: TForm8;
implementation
uses unit1;
{$R *.dfm}
procedure TForm8.Button2Click(Sender: TObject);
begin
close;
end;
procedure TForm8.Button1Click(Sender: TObject);
begin
abc:=edit1.Text;
form8.Close;
with unit1.main_Form do
begin
table1.Open;
table1.IndexName:='姓名';
table1.SetKey;
table1.FieldByName('姓名').AsString:=form8.Edit1.Text;
if table1.GotoKey then
begin
dbtext1.Caption:=table1.FieldByName('姓名').AsString;
dbtext2.Caption:=table1.FieldByName('性别').AsString;
dbtext3.Caption:=table1.FieldByName('年龄').AsString;
dbtext4.Caption:=table1.FieldByName('血型').AsString;
dbtext5.Caption:=table1.FieldByName('民族').AsString;
dbtext6.Caption:=table1.FieldByName('出生年月').AsString;
dbtext7.Caption:=table1.FieldByName('身份证').AsString;
dbtext8.Caption:=table1.FieldByName('籍贯').AsString;
dbtext9.Caption:=table1.FieldByName('文化程度').AsString;
dbtext10.Caption:=table1.FieldByName('居住地点').AsString;
dbtext11.Caption:=table1.FieldByName('工作单位').AsString;
dbmemo1.Text:=table1.FieldByName('备注').AsString;
end
else
showmessage('你要查找的户主不存在!');
end;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?