Solved

basic clock in and out application

Posted on 2004-04-12
7
144 Views
Last Modified: 2010-04-05
hi
i would like to build a simple clock in clock out application with users that will help me keep
track of them and stored in access database.

 i can show couple of images of how that would look like

but basically

a form where you could type in your user name and will be checked with the access database

then a small form appears with 2 butons

Clock In Clock Out

and that save in the database the clock in time date and the user

and if clock out that would shift end   time and data and user would be saved into the database

thank you

if you guys want to see the images post your e-mail and i will send it to you

just to get a better look at what i am asking for

thank you
0
Comment
Question by:emailworks
  • 2
7 Comments
 
LVL 17

Expert Comment

by:mokule
ID: 10807011
Hi
In my member profile You've got my e-mail. Send me Your images.
0
 
LVL 17

Accepted Solution

by:
mokule earned 190 total points
ID: 10807281
Hi
I've got images.
Not look at them yet
This is quick example, on one Form.

unit Main;

interface

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

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    Panel2: TPanel;
    Panel3: TPanel;
    laTime: TLabel;
    Timer1: TTimer;
    btnClockIn: TButton;
    btnClockOut: TButton;
    edUser: TEdit;
    edPswd: TEdit;
    btnLogin: TButton;
    Label2: TLabel;
    Label3: TLabel;
    btnCancel: TButton;
    procedure Timer1Timer(Sender: TObject);
    procedure btnClockInClick(Sender: TObject);
    procedure btnClockOutClick(Sender: TObject);
    procedure btnLoginClick(Sender: TObject);
    procedure edUserChange(Sender: TObject);
    procedure btnCancelClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Timer1Timer(Sender: TObject);
var
  str: string;
begin
  str := TimeToStr(Now);
  if str <> laTime.Caption then
    laTime.Caption := str;
end;

procedure TForm1.btnClockInClick(Sender: TObject);
begin
// Your ClockIn procedure
//  ClockIn(edUser.Text,laTime.Caption);
  Panel3.Enabled := False;
  Panel3.Visible := False;
  edUser.Text := '';
  edPswd.Text := '';
end;

procedure TForm1.btnClockOutClick(Sender: TObject);
begin
//  ClockOut(edUser.Text,laTime.Caption);
  Panel3.Enabled := False;
  Panel3.Visible := False;
  edUser.Text := '';
  edPswd.Text := '';
end;

procedure TForm1.btnLoginClick(Sender: TObject);
begin
  if (Length(edUser.Text) > 0) and (Length(edPswd.Text) > 0) then
    begin
//    if VerifyUser then  // Your user verification
      begin
      Panel3.Enabled := True;
      Panel3.Visible := True;
      end;
    end;
end;

procedure TForm1.edUserChange(Sender: TObject);
begin
  if (Length(edUser.Text) > 0) and (Length(edPswd.Text) > 0) then
    btnLogin.Enabled := True
  else
    btnLogin.Enabled := False
end;

procedure TForm1.btnCancelClick(Sender: TObject);
begin
  Panel3.Enabled := False;
  Panel3.Visible := False;
end;

end.


{dfm}

object Form1: TForm1
  Left = 217
  Top = 115
  BorderIcons = [biSystemMenu, biMinimize]
  BorderStyle = bsDialog
  Caption = 'Simple Clock In Out'
  ClientHeight = 268
  ClientWidth = 307
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Panel1: TPanel
    Left = 8
    Top = 8
    Width = 289
    Height = 73
    TabOrder = 0
    object laTime: TLabel
      Left = 32
      Top = 8
      Width = 225
      Height = 48
      Alignment = taCenter
      AutoSize = False
      Caption = 'laTime'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -48
      Font.Name = 'Arial'
      Font.Style = []
      ParentFont = False
    end
  end
  object Panel2: TPanel
    Left = 8
    Top = 96
    Width = 289
    Height = 89
    TabOrder = 1
    object Label2: TLabel
      Left = 16
      Top = 8
      Width = 22
      Height = 13
      Caption = 'User'
    end
    object Label3: TLabel
      Left = 160
      Top = 8
      Width = 46
      Height = 13
      Caption = 'Password'
    end
    object edUser: TEdit
      Left = 16
      Top = 24
      Width = 113
      Height = 21
      TabOrder = 0
      OnChange = edUserChange
    end
    object edPswd: TEdit
      Left = 160
      Top = 24
      Width = 113
      Height = 21
      PasswordChar = '*'
      TabOrder = 1
      OnChange = edUserChange
    end
    object btnLogin: TButton
      Left = 107
      Top = 56
      Width = 75
      Height = 25
      Caption = 'Login'
      Enabled = False
      TabOrder = 2
      OnClick = btnLoginClick
    end
  end
  object Panel3: TPanel
    Left = 8
    Top = 200
    Width = 289
    Height = 57
    Enabled = False
    TabOrder = 2
    Visible = False
    object btnClockIn: TButton
      Left = 8
      Top = 16
      Width = 75
      Height = 25
      Caption = 'Clock In'
      TabOrder = 0
      OnClick = btnClockInClick
    end
    object btnClockOut: TButton
      Left = 104
      Top = 16
      Width = 75
      Height = 25
      Caption = 'Clock Out'
      TabOrder = 1
      OnClick = btnClockOutClick
    end
    object btnCancel: TButton
      Left = 200
      Top = 16
      Width = 75
      Height = 25
      Caption = 'Cancel'
      TabOrder = 2
      OnClick = btnCancelClick
    end
  end
  object Timer1: TTimer
    Interval = 200
    OnTimer = Timer1Timer
    Left = 216
    Top = 40
  end
end
0
 

Expert Comment

by:efryer
ID: 10819377
Emailworks,

I have just finished an application in delphi that does almost exactly what you are after

Features :
Access database backend (ADO) - Access chosen so that administrator can do their own specialised reports
Drop down user login (makes it easier for user to get name right)
Login with password (makes sure that another user cannot clock another in/out)
Main page just has users name displayed with Current time and Date, daily log of login or logout, two buttons for time on and time off
Admin section - Add/remove users, change users passwords, run a time report between two dates etc

Flow of the application for the user is

1) Login
2) clockin or clockout (button is greyed out dependent on their last action)
3) Close application

Is that the sort of thing you were after???

Regards

Bob
0
 

Author Comment

by:emailworks
ID: 10819811
yeah
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 100
How to debug For loops? 3 49
Create a path if not exists 7 76
Delphi: Connect to running MS Outlook 4 80
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question