wz_login_cfrm.pas

来自「关于利用DELPHI来进行企业级方案解决的著作的附书源码」· PAS 代码 · 共 66 行

PAS
66
字号
unit WZ_LogIn_cFRM;


interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Grids, DBGrids, Db, DBClient, MConnect, Mask, ExtCtrls;

type
  TLogInForm = class(TForm)
    Button1: TButton;
    Label1: TLabel;
    Label2: TLabel;
    edtID: TEdit;
    edtPSW: TMaskEdit;
    Button2: TButton;
    Image1: TImage;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    
  public
     state:int64;
     curusername:string;
  end;

var
  LogInForm: TLogInForm;

implementation

{$R *.DFM}
USES
    WZ_CK_cDM;

procedure TLogInForm.Button1Click(Sender: TObject);
begin
  
  with cDataModule do
  begin
    LOGINConnection1.AppServer.Login(edtID.Text, edtPSW.Text,'出库模块');
    LOGINClientDataSet1.close;
    LOGINClientDataSet1.Open;
    curusername:=LOGINClientDataSet1.FieldByName('group_id').value;
    if LOGINClientDataSet1.IsEmpty then
        state:=0   //退出
    else
    begin
        if  LOGINClientDataSet1.FieldByName('group_id').value='32'
        then  state:=2    //出库
        else  state:=1;   //填单
    end;

  end;


end;

procedure TLogInForm.Button2Click(Sender: TObject);
begin
    state:=0 ;//退出
end;

end.

⌨️ 快捷键说明

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