unitlogin.pas.~13~

来自「初中成绩录入系统网络版(firebird) firebird下的网络编程」· ~13~ 代码 · 共 49 行

~13~
49
字号
unit unitLogin;

interface

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

type
  TfmLogin = class(TForm)
    edtServerPath: TEdit;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    Label1: TLabel;
    RGPUser: TRadioGroup;
    Label2: TLabel;
    edtPassword: TEdit;
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

implementation

uses Datamodule;

{$R *.dfm}

procedure TfmLogin.BitBtn1Click(Sender: TObject);
begin
  dm.IBDatabase1.Close;
  dm.IBDatabase1.Params.Clear;
  if RGPUser.ItemIndex=0 then
    dm.IBDatabase1.Params.Add('user_name='+'LLY1')
  else
    dm.IBDatabase1.Params.Add('user_name='+'LLY2');
  dm.IBDatabase1.Params.Add('password='+edtPassword.Text);
  try
    dm.IBDatabase1.Open;
    self.ModalResult:=mrOK;
  except
    Application.MessageBox('登入失败!','错误',MB_OK or MB_ICONERROR);
  end;
end;

end.

⌨️ 快捷键说明

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