Last post Feb 17, 2016 09:10 AM by Candice Zhou
Feb 10, 2016 03:41 PM|amfcandeias|LINK
I new at .net . On my database i have workers with the hour that they enter in the bilding and with the hour they left. When they in i use the letter "e" and when they out i use the letter "s". Ussualy they enter 2 times at day and they exit 2 times.. one
at beginning ate the they, then exit to lunch and then return to the afternoon.
How can i put the information of all functionaries on the grid view with this order (in witch line with different hours of the day)
FuncionaryCode | EnterirngHour | ExitHour | AfterLunchEnteringHour | FinalDayHour
Thanks to anyone that can help me..
Feb 11, 2016 03:27 AM|Candice Zhou|LINK
I think you could save the entering time as EnterirngHour field, save the leaving time as ExitHour field.
Then, calculate the time in one day as FinalDayHour field in Database. You could use DATEDIFF() Function, this function returns the time between two dates:
Please see: https://msdn.microsoft.com/en-us/library/ms189794.aspx
Finally, display these fields in Gridview.
Feb 11, 2016 11:57 AM|amfcandeias|LINK
Yes, i need to do that calculation, thanks in advance, but first i need to put the info on the gridview like it is on the below image (on the left is how the information is on database and on the right is how i like to put it on the grid view..
I don't know how to do it? Can you tell me how can i do?
Feb 12, 2016 05:22 PM|amfcandeias|LINK
Feb 16, 2016 09:39 AM|Candice Zhou|LINK
Ussualy they enter 2 times at day and they exit 2 times
How do you confirm a user only enter two times and exit two time at one day?
Feb 16, 2016 04:40 PM|amfcandeias|LINK
When the user enter on the company the status change to "e", when he go out to lunch the status change to "s"... Then when he come from the lunch he status change to "e" and when he go home status change to "s". The status change when he pass a card by a
scanbar code.. How can i display this hours in one line of the gridview?
Feb 17, 2016 09:10 AM|Candice Zhou|LINK
I think your requirement is unreasonable. As my previous post asked, how do you confirm a user only enter two times and exit two time at one day? If a user exit more than three times, your gridview will get error.