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

📄 mryhdl.pas

📁 生产管理系统:系统具有数据备份及数据还原功能。能够保证系统数据的安全性方便的全方位的数据查询。在相应的权限下
💻 PAS
字号:
unit MRYHDL;

interface

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

type
  TFRM_YHDL = class(TForm)
    Panel1: TPanel;
    Edit1: TEdit;
    Edit2: TEdit;
    Image1: TImage;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;

    procedure FormShow(Sender: TObject);
    procedure Edit1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure SpeedButton2Click(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FRM_YHDL: TFRM_YHDL;
  dl,p : integer;
  yhmc,ppl : string;
  a : array[1..11] of string;
implementation
  uses MR_DATA, MRERP_ZJM;
{$R *.dfm}

procedure TFRM_YHDL.FormShow(Sender: TObject);
begin
  edit1.Clear;
  edit2.Clear;
  edit1.SetFocus;
end;

procedure TFRM_YHDL.Edit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if key = vk_return then
    edit2.SetFocus;
end;

procedure TFRM_YHDL.SpeedButton2Click(Sender: TObject);
begin
  if jj = 1 then
    FRM_YHDL.Close
  else
    APPLICATION.Terminate;
end;

procedure TFRM_YHDL.SpeedButton1Click(Sender: TObject);
var
  P:INTEGER;
begin
  with data.ADOc do
  begin
    close;
    sql.Clear;
    sql.Add('select * from tb_user where czyname=:a and czymm=:b');
    Parameters.ParamByName('a').Value := Trim(Edit1.Text);
    Parameters.ParamByName('b').Value := Trim(Edit2.Text);
    open;
  end;
  if data.ADOc.RecordCount>0 then
  begin
    yhmc := data.ADOc.fieldbyname('czyname').AsString;
    for p := 1 to 11 do
    begin
      ppl := inttostr(p);
      a[p] := data.ADOc.fieldbyname(ppl).AsString;
    end;
    if jj = 1 then
    begin
      self.Close;
      FRM_ERP_ZJM.StatusBar1.Panels.Items[1].Text := '   '+'操作员名称:  '+yhmc;
    end
    else
    begin
      SElf.Close;
      FRM_ERP_ZJM.StatusBar1.Panels.Items[1].Text := '   '+'操作员名称:  '+yhmc;
    end;
  end
  else
  begin
    showmessage('操作员名称、密码不正确'+#13+'请重新输入。');
    edit1.Clear;
    edit2.Clear;
    dl := dl+1;
  end;
  if jj <> 1 then
  begin
    if dl = 4 then
    begin
        FRM_ERP_ZJM.Close;
    end;
  end;
end;

end.

⌨️ 快捷键说明

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