Time Tracking with SQLite

Thread is closed for posting
4 posts, 0 answers
  1. DF82562D-A49E-4E74-81C9-2714FA7436DD
    DF82562D-A49E-4E74-81C9-2714FA7436DD avatar
    22 posts
    Member since:
    Jun 2011

    Posted 20 May 2014 Link to this post

    Requirements

    Telerik Product and Version

    Visual Studio 2013
    Telerik DevCraft, UI for Winforms 2014.1.402.40
    Telerik DevCraft, Reporting 8.0.14.507
    .NET Framework 4.5.1 

    Supported Browsers and Platforms


    Components/Widgets used (JS frameworks, etc.)

    Database is SQLite 1.0.92.0.

    PROJECT DESCRIPTION 
    Time Tracking

    Desktop application for keeping records of
    the time consumed for clients’ needs. 

    Mission

    This application is made internally to
    track working hours for different customers.

    Tools

    App is made with Visual Studio 2013 and
    Telerik DevCraft controls, UI for Winforms and Reporting.

    Telerik DevCraft, UI for Winforms 2014.1.402.40

    Telerik DevCraft, Reporting 8.0.14.507

    . NET Framework 4.5.1

    Database is SQLite 1.0.92.0.  

    Icons by Roundicons

     

    After open solution, upgrade Telerik
    Winforms, Reporting and Nuget. If you didn’t have SQLite, download and install
    from this link.

    http://system.data.sqlite.org/downloads/1.0.92.0/sqlite-netFx451-setup-bundle-x86-2013-1.0.92.0.exe

    Database

    For many reasons we choose SQLite. But this
    come with price. Main app feature is to track time by recording date and time
    to database. Problem with SQLite is that there is no date and time datatype.
    There are date and time functions for storing it as text, real and integer.
    Most of time working on project we spend for customizing date and time to be
    editable in RadGridView.

    This problem is solved by manual edit of
    entered date and time and converting in to integer. For displaying date in
    readable format is used SQLite function datetime() and unixepoch modifier.

    Date and time is record to database in Unix
    time format. Unix time starts from 1970 and integer represents seconds since
    that date. Precision for this format for strong time is one second. Because we
    will always record data for current work this format is suitable.

    Database

    TimeTracking

    Tables

    Company

    Name and address of your company, used in
    Invoice

    Person

    Name of workers in your company

    Customer

    Name of customer’s company

    Employer

    Name of person in customer’s company who
    order work

    Job

    Name and price per hour for different type
    of work

    Work

    Main table for storing all recorded data. Joining
    filed with customer, employer, person, job, short description of work,
    additional expense, start and end time.

     

    Calculation of work cost

    When time is recorded or entered, app
    calculate total work cost.

    This is done by subtraction end time with
    start time. Result is number of seconds. That number is converted in hours and
    then multiply with job price per hour for that work. And finally expenses is
    added to result.

    Instructions

    There are main form for entering new data
    and edit old ones. Couple forms for edit tables and one form for reporting.

    On main form there is three ways to record
    time.

    1.      
    Using start and end command for
    stopwatch.

    2.      
    Manual entering data using date
    and time controls on form.

    3.      
    RadGridView.

    Using stopwatch

    On the left side of form select data from
    RadDropDownLists. Press Start button. Data will be recorded to database. Start
    and end time in database is same in this record. Duration of elapsed time is
    displayed on form.

    When the work is finished press End button.
    Last record in database is edited and end time is changed.

    Enter data manually

    On the left side of form select data from
    RadDropDownLists. On the right enter start and end time in RadDateTimePicker
    and RadTimePicker controls.

    Press Enter data manually button. Data will
    be recorded to database.

    RadGridView

    In RadGridView is possible to enter and to
    data. There are couple of

    Edit data

    Data could be edited in RadGridView
    directly or in fields on form.

    To edit fields on form double click on to row.
    Data from row is displayed in form RadDropDownLists and RadDateTimePicker and
    RadTimePicker controls. To confirm press Change time button.

    Delete data

    Data could be deleted in RadGridView.

    To delete with button, double click on to
    row. Data from row is displayed in form RadDropDownLists and RadDateTimePicker
    and RadTimePicker controls. To delete row press Delete button.

    Reporting

    There are two reports to display work.
    First is complete work for time period, for all comapnies. Second is work for
    company in some time period.

    Third report is Invoice for company for
    time period.

    Limitations

    Recording work with Stopwatch option is
    limited to one work at a given time. App is not multiuser because of SQLite
    limitations.

    Localization

    All text is fully localizable by editing
    resource file. Some additional changes must be made in code and controls,
    mainly to localize date and time.

    Fully functional app with Serbian
    localization and additional features in Invoice is available to use from: http://radnisati.ti.rs/publish.html

    Attached files
    Source code for English Time Tracking app, Serbian Time Tracking app (Radni sati) and screen image.


  2. C9F3D0E2-E9A1-4184-9D42-DF6715D046E4
    C9F3D0E2-E9A1-4184-9D42-DF6715D046E4 avatar
    2984 posts
    Member since:
    Nov 2022

    Posted 23 May 2014 Link to this post

    Hi Vladimir,

    Thank you for posting the project - much appreciated. I am sure that the community will benefit from it. I have added 3500 Telerik Points to your account for this post.

    And just want to mention that in order the English version of the project to run properly the connection string in the App.Config file should be updated as follows:
    <add name="TimeTracking.My.MySettings.timetrackingConnectionString" connectionString="data source=timetracking.s3db" providerName="System.Data.SQLite" />

    Regards,
    Dimitar
    Telerik
     
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
     
  3. 7373250B-B240-40D2-AC89-080D8C9431A1
    7373250B-B240-40D2-AC89-080D8C9431A1 avatar
    3 posts
    Member since:
    Mar 2005

    Posted 18 Jul 2015 in reply to C9F3D0E2-E9A1-4184-9D42-DF6715D046E4 Link to this post

    Hi,

    Really interested to see this project which runs with SQLite and Entity. But it is giving error all the time.

     

    Can you assist to resolve it.

     

  4. C9F3D0E2-E9A1-4184-9D42-DF6715D046E4
    C9F3D0E2-E9A1-4184-9D42-DF6715D046E4 avatar
    2984 posts
    Member since:
    Nov 2022

    Posted 20 Jul 2015 Link to this post

    Hi Alok,

    Thank you for contacting us.

    When you open the project you should first restore all packages (Entity Framework, SQLite) then you must resolve all references (Telerik UI for WinForms, Telerik Reporting,  SQLite). In addition, you should make sure that the you are using .NET Framework 4.5.1 or newer. Once this is done you should be able to build the project.

    Let me know if you have additional questions.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.