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

📄 passwordunit.pas

📁 PosEasy收银系统源码,Pos机前后台管理代码
💻 PAS
字号:
unit PasswordUnit;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  OutlookBtn, StdCtrls;

type
  TPassword = class(TForm)
    StaticText1: TStaticText;
    StaticText2: TStaticText;
    Edit1: TEdit;
    OutlookBtn1: TOutlookBtn;
    OutlookBtn2: TOutlookBtn;
    procedure OutlookBtn1Click(Sender: TObject);
    procedure OutlookBtn2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Password: TPassword;

implementation

uses AddUnit, ReworkUnit, ModuleUnit1, main;

{$R *.DFM}

procedure TPassword.OutlookBtn1Click(Sender: TObject);
var
  delete,deletename,soperator:string;
  checkpass:integer;
begin
  if Edit1.Text='' then
    Messagebox(handle,'请输入操作员编码!','提示',MB_ok)
  else
    begin
      checkpass:=mainfm.checkpass(Edit1.Text,5,soperator);
      if checkpass=101 then
        begin
           edit1.Text:='';
           exit;
        end;   
      if ModuleForm1.pf=1 then
        begin
          Application.CreateForm(TAddForm,AddForm);
          AddForm.ShowModal;
        end;
      if ModuleForm1.pf=2 then
        begin
          Application.CreateForm(TRework,Rework);
          Rework.ShowModal;
        end;
      if ModuleForm1.pf=3 then
        begin
          delete:=ModuleForm1.ModuleQuery1.Fields[0].AsString;
          deletename:=ModuleForm1.ModuleQuery1.Fields[0].FieldName;
          with ModuleForm1 do
            begin
              ModuleQuery1.Close;
              ModuleQuery1.SQL.Clear;
              ModuleQuery1.SQL.Add('delete '+MTTN+' where '+deletename+'='''+delete+'''');
              if Messagebox(handle,'您确定要删除该记录?','消息',MB_okcancel+MB_DEFBUTTON2)=1 then
              	begin
                  ModuleQuery1.ExecSQL;
                end;
              ModuleQuery1.Close;
              ModuleQuery1.SQL.Clear;
              ModuleQuery1.SQL.Add('select * from '+MTTN+'');
              ModuleQuery1.Open;
              DBGridEh1.Columns[0].Width:=213;
              DBGridEh1.Columns[1].Width:=213;
              DBGridEh1.Columns[2].Width:=213;
            end;
        end;
      Password.Release;
      Password.Close;
    end;
end;

procedure TPassword.OutlookBtn2Click(Sender: TObject);
begin
  Password.Release;
  Password.Close;
end;

end.

⌨️ 快捷键说明

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