ONET is a system that provides information on occupations and worker requirements across the organization. This local ONET describes occupations in terms of the knowledge, skills, and abilities required, as well as how the growth, necessary education and training pathways are planned for each position inside the organization.
This ONET includes two main applications, data entry (using Delphi) and organizational user interface (using ASP.net):
The administrative section of the application manages all data input and user access for the organization. The database is based on MSSQL, and access to it is through standard ADODB.
One of the basic forms in the application is the login form, which is displayed in the following section.
unit uLogin;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, AdvGlowButton, StdCtrls, ADODB;
type
TfLogin = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
AdvGlowButton2: TAdvGlowButton;
AdvGlowButton1: TAdvGlowButton;
procedure AdvGlowButton2Click(Sender: TObject);
procedure AdvGlowButton1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
private
{ Private declarations }
tmpResult: Boolean;
public
{ Public declarations }
end;
var
fLogin: TfLogin;
implementation
uses fMain;
{$R *.dfm}
procedure TfLogin.AdvGlowButton1Click(Sender: TObject);
var tmpQuery1: TADOQuery;
begin
tmpResult := False;
tmpQuery1:=TADOQuery.Create(Self);
tmpQuery1.Connection:=Form1.ADOConnection1;
tmpQuery1.SQL.Clear;
tmpQuery1.SQL.Add('SELECT * FROM Users WHERE (fUsername = N''' + edit1.Text + ''') AND (fPassword = N''' + edit2.Text + ''') AND (fGroup = 2)');
tmpQuery1.Open;
if tmpQuery1.RecordCount = 1 then
begin
if tmpQuery1.FieldByName('fUsername').AsString = edit1.Text then
tmpResult := True;
end;
tmpQuery1.Close;
if tmpResult then
Close
else
begin
MessageDlg( 'Incorrect Username or Password',mtError,mbOKCancel,0);
end;
end;
procedure TfLogin.AdvGlowButton2Click(Sender: TObject);
begin
Application.Terminate;
end;
procedure TfLogin.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
CanClose := tmpResult;
end;
procedure TfLogin.FormCreate(Sender: TObject);
begin
tmpResult := False;
end;
end.
The desktop application contains 47 forms and the source code for complete application is available upon request for presentation purposes. Please contact me for more information.
Check Web user interface for this application here: ONET (Occupational Information Network) Web User Interface