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

📄 login.pas

📁 一个餐饮行业的销售管理类的源码
💻 PAS
字号:
unit login;

interface

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

type
  TLoginForm = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    pwd: TEdit;
    OKBtn: TButton;
    CancelBtn: TButton;
    DataSource1: TDataSource;
    UserTable: TTable;
    Name: TDBComboBox;
  private
    { Private declarations }
  public
    { Public declarations }
    function canPass:boolean;
  end;

var
  LoginForm: TLoginForm;

implementation

{$R *.dfm}
function TLoginForm.canPass: boolean;
var
    V: Variant;
    A: String;
begin
    Result := False;
    V := UserTable.Lookup('Name',
        Name.Text,
        'Password');
    if not (VarType(V) in [varNull]) then begin
        A := V;
        if  A = Pwd.Text then begin
            Result := True;
            Exit;
        end;
    end;
end;

end.

⌨️ 快捷键说明

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