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

📄 unit1.pas

📁 学校教职工工资管理系统可实现工资的增加、删除和修改。
💻 PAS
字号:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, jpeg, ExtCtrls, StdCtrls, DB, ADODB;


type
  TForm1 = class(TForm)
    Label1: TLabel;
    Image1: TImage;
    Label2: TLabel;
    Label3: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    ADOQuery1: TADOQuery;
    GroupBox1: TGroupBox;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  str0,str00,str000:string;


implementation

uses Unit2, Unit3;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
    str2:string;
begin
    if  (RadioButton1.Checked)and (radiobutton2.Checked=false) then
    begin
    str2:='select * from user1 where username=';
    str2:=str2+quotedstr(Edit1.Text)+'and pwd='+quotedstr(edit2.Text);
    adoquery1.Close ;
    adoquery1.SQL.Clear ;
    adoquery1.SQL.Add(str2);
    adoquery1.Open;
    str000:=edit1.Text ;
        if adoquery1.RecordCount >0    then
        form2.show
        else
             showmessage('用户名或密码有误,请重新输入!')
    end
    else if    (RadioButton1.Checked=false)   and (radiobutton2.Checked) then
    begin
    str2:='select * from Staff where Staff#=';
    str2:=str2+quotedstr(Edit1.Text)+'and pwd='+quotedstr(Edit2.Text);

    adoquery1.Close ;
    adoquery1.SQL.Clear ;
    adoquery1.SQL.Add(str2);
    adoquery1.Open;

    str0:=edit1.Text ;
    str00:=edit2.Text ;


    if adoquery1.RecordCount >0    then
    form3.show
    else
        showmessage('用户名或密码有误,请重新输入!')
    end
    else if        (RadioButton1.Checked=false)   and (radiobutton2.Checked=false) then
          showmessage('没有选择使用权限,请选择使用权限!')
end;


procedure TForm1.Button2Click(Sender: TObject);
begin
   application.Terminate ;
end;

end.

⌨️ 快捷键说明

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