Click here to Skip to main content
13,089,818 members (46,981 online)
Rate this:
Please Sign up or sign in to vote.
See more:
For a class project I am building an ASP.Net application. A person would enter their first and last name and click a button "Register". That information would then be placed in a table called employees. The EmployeeID would be the table's Primary Key and automatically generated. I then want the EmployeeID to display on the register page in a label box.

Then for existing employees they will go to the Log In page and enter their EmployeeID. They would then select IN or OUT from a radio button. If IN is selected the server time is entered into the table called timecard in the Time In column. If OUT is selected the server time is entered into the same table in the Time OUT column. The time is converted to minutes and total minutes worked that day would be entered into column DAY TOTAL. Then the day totals would add up to display the WEEK TOTAL which would then be divided by 60 to display hour:minute:seconds of time worked that week.

Then I would like the table "timecard" to be displayed on timecard.aspx which would be a non-navigated page

The first and last EXIT buttons to close the application window.
Posted 11-Jul-13 8:59am
Updated 13-Jul-13 6:00am
ThePhantomUpvoter 11-Jul-13 15:06pm
"That ain't too much is it?", well that depends.... what is your real question and/or problem?
TimTerrell 11-Jul-13 15:34pm
the real questions is how to secure the server time from a radio button selection and have that time entered into a database=employee table=timecard with columns being EmployeeID, Day, Date, Time In, Time Out, Total Day Time (the days time converted to minutes for an accurate time), Total Week Time (all the minutes for days in the work period added together and converted to hours/minutes).
ThePhantomUpvoter 11-Jul-13 15:39pm
Well you would probably have to read the documentation for whatever database you are using and use whatever function it has for getting the server date/time. SQL Server has a getdate() function for getting the server date/time. Then you would INSERT or UPDATE the database column.
TimTerrell 11-Jul-13 15:44pm
second part, building a relationship between tables of the database so that the employee table generates the Employee ID and the other table enters and displays data from the Employee ID
TimTerrell 11-Jul-13 15:46pm
I'm using MySQL server for this project. getdate() will fill in the data table?
ThePhantomUpvoter 11-Jul-13 15:56pm
I believe that the MySQL function is Now() and no you will have to write a query to insert the data into your table.
TimTerrell 11-Jul-13 16:05pm
when I have researched this on line I may be asking the wrong question or phrasing it poorly. getdate() or now() from what I have seen produces a result thur 7/11/2013 3:00 PM...and what I am wanting is broken down a bit more...
Employee ID Day Date Time In Time Out Total Day Time Total Week Time
TT0232 Thur 7/11/2013 1:30:24 3:30:00 119:36 min 1:59:36
so I will have to have manipulation control and that is what I am struggling with.
ThePhantomUpvoter 11-Jul-13 16:10pm
Sorry, that is beyond me. I do not know anything about MySQL to tell you anything about what it is that you want to do. I know you can't do that easily in SQL Server but I don't know about MySQL. I would tell you that you need to improve your question, using the Improve question link, to get a good answer.
TimTerrell 11-Jul-13 16:32pm
Ok thank you, I appreciate your assistance on this so far though and I will look at the link, but I am still learning programming language, so I don't know the proper terms to get what I want done.
Richard MacCutchan 12-Jul-13 3:59am
I'm not a database expert, but you need to think about what information you need to store in your tables. From reading the above you need a timecard table that has fields:
Employee id : a previously generated number that links to the employees name.
Tine in : the time(and date) that the employee signs in.
Time out : the time signed out.
The latter two items are stored as DateTime values. From this you can use the reporting features of your database (or some code) to report the items in the format you suggest above.
ryanb31 12-Jul-13 12:43pm
Where are you stuck? You have asked for a lot. Do some work and then let us know where you are stuck.
TimTerrell 13-Jul-13 11:11am
OK, I have been plugging away at this and it is the little things that I am dressing up now that I need to correct. As I said before, I am using Microsoft Visual Studio 2010 Ultimate. I have a simple EXIT button that I want to close the window. You click that button and the program stops working and closes the application window. I have found some segments on line using java, but I don't know how or where to write those code segments to get it to function.
ryanb31 13-Jul-13 21:54pm
I'm confused. Close what window? You have this tagged as ASP.Net which means it is running in someones browser. No you are referring to Java. Do you mean JavaScript? You need to be clear about what you need.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 13 Jul 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100