D
doose
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TfrmLogin.FormCreate(Sender: TObject);
begin
digit:=1; {次数初值为1,标志位初值为0}
Flag:=0;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('select * from EmployeeInfo');
ADOQuery1.Open;
while not ADOQuery1.Eof do
begin
mUserName.Items.Add(Trim(ADOQuery1.FieldValues['EmployeeName']));
ADOQuery1.Next;
end;
mUserName.ItemIndex := 0;
end;
procedure TfrmLogin.BitBtn1Click(Sender: TObject);
begin
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('select * from EmployeeInfo where EmployeeName=''' + mUserName.Text + '''');
ADOQuery1.Open;
if (not ADOQuery1.Eof) and (Trim(ADOQuery1.FieldValues['Password']) = mPassword.Text) then
Close;
end;
begin
digit:=1; {次数初值为1,标志位初值为0}
Flag:=0;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('select * from EmployeeInfo');
ADOQuery1.Open;
while not ADOQuery1.Eof do
begin
mUserName.Items.Add(Trim(ADOQuery1.FieldValues['EmployeeName']));
ADOQuery1.Next;
end;
mUserName.ItemIndex := 0;
end;
procedure TfrmLogin.BitBtn1Click(Sender: TObject);
begin
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('select * from EmployeeInfo where EmployeeName=''' + mUserName.Text + '''');
ADOQuery1.Open;
if (not ADOQuery1.Eof) and (Trim(ADOQuery1.FieldValues['Password']) = mPassword.Text) then
Close;
end;