Solved

basic clock in and out application

Posted on 2004-04-12
7
148 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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