⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cxtj.pas

📁 实现人力资源的管理
💻 PAS
字号:
unit cxtj;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, StdCtrls;

type
  Tcxtjfrm = class(TForm)
    Label1: TLabel;
    ComboBox1: TComboBox;
    Edit1: TEdit;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    Label2: TLabel;
    procedure SpeedButton1Click(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  cxtjfrm: Tcxtjfrm;

implementation

{$R *.dfm}

uses dbdata;

procedure Tcxtjfrm.SpeedButton1Click(Sender: TObject);
var
b:string;          
begin
if (trim(combobox1.Text)<>'') and (trim(edit1.Text)<>'') then
begin
if combobox1.Text='姓名' then
b:='姓名'
else
if combobox1.Text='编号' then
b:='编号';
with data.ADOpublic do
   begin
      close;
      sql.Clear;
      sql.Add('select * from 人事表 where');
      sql.Add(b);
      sql.Add('= :a');
      parameters.ParamByName('a').Value:=trim(edit1.Text);
      open;
   end;
   data.ADOpublic.Active:=true;
   close;
end
else
   application.MessageBox('请设置查询条件!','提示',0+64);
end;

procedure Tcxtjfrm.SpeedButton2Click(Sender: TObject);
begin
close;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -