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

📄 formyonghumingxiugai.pas

📁 这是一个关于药品进销存的管理软件
💻 PAS
字号:
unit FormYonghumingxiugai;

interface

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

type
  Txiugaiyonghuming = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    Button2: TButton;
    ADOCommand1: TADOCommand;
    ADOQuery1: TADOQuery;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  xiugaiyonghuming: Txiugaiyonghuming;

implementation

uses FormLogin, FormManage;

{$R *.dfm}

procedure Txiugaiyonghuming.Button1Click(Sender: TObject);
var
user,pass,pass2:string;
user2:string;
begin
user:=edit1.Text;
user2:=login.Edit2.Text;
pass:=edit2.Text;
adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.text:=('select 密码 from 用户信息 where 用户名='''+user2+'''');
adoquery1.Open;
pass2:=adoquery1.fieldbyname('密码').AsString;
if pass=pass2 then
  begin
  adocommand1.CommandText:='update 用户信息 set 用户名='''+user+''' where 用户名='''+user2+'''';
  adocommand1.Execute;
  end;
showmessage('操作成功请返回');
if pass<>pass2 then
  begin
  showmessage('密码错误,请重新输入');
  end;

end;

procedure Txiugaiyonghuming.Button2Click(Sender: TObject);
begin
xiugaiyonghuming.close;
manage.Visible:=true;
manage.Enabled:=true;
end;

end.

⌨️ 快捷键说明

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