Time Tracking with SQLite

4 posts, 0 answers
  1. Nikita
    Nikita avatar
    21 posts
    Member since:
    Jun 2011

    Posted 20 May 2014 Link to this post


    Telerik Product and Version

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

    Supported Browsers and Platforms

    Components/Widgets used (JS frameworks, etc.)

    Database is SQLite

    Time Tracking

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


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


    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

    . NET Framework 4.5.1

    Database is SQLite  

    Icons by Roundicons


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



    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.





    Name and address of your company, used in


    Name of workers in your company


    Name of customer’s company


    Name of person in customer’s company who
    order work


    Name and price per hour for different type
    of 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.


    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

    Using start and end command for

    Manual entering data using date
    and time controls on form.


    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.


    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.


    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.


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


    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. Dimitar
    Dimitar avatar
    1321 posts

    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" />

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. Alok Tibrewal
    Alok Tibrewal avatar
    2 posts
    Member since:
    Mar 2005

    Posted 18 Jul 2015 in reply to Dimitar Link to this post


    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. Dimitar
    Dimitar avatar
    1321 posts

    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.

    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