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

📄 stu_enroll.pas

📁 这个程序是用Delphi编写的
💻 PAS
字号:
unit stu_enroll;

interface

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

type
  TForm2 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    Button2: TButton;
    ADOTable1: TADOTable;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation
 uses unit1,stu_use ;
{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
var
results:boolean ;
begin
  ADOTable1.Close ;
  ADOTable1.Open ;
  ADOTable1.Active;
  results:=ADOTable1.Locate('users'+';'+'password',VarArrayOf([Edit1.Text,Edit2.Text]),[locaseinsensitive]);
  if edit1.Text='' then
  application.MessageBox('用户名不能为空','提示',mb_ok)
  else if edit2.Text='' then
  application.messagebox('密码不能为空','警告',mb_ok)
  else
  if results then
  begin
   user_no := Form2.Edit1.Text;
   Form2.Hide ;
   Form4.ShowModal ;
   close ;
  end
  else
  showmessage('密码错误或用户不存在');
  edit1.Clear ;
  edit2.Clear ;

end;

procedure TForm2.Button2Click(Sender: TObject);
begin
close ;
end;

end.

⌨️ 快捷键说明

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