asp.net - How best to track a task start time and end time in a single table row? -


A person opens pages to the website to perform quality control tasks, on one page, the activity of quality control begins When someone starts the start button, on any other page, the activity starts when the page loads.

Quality control activity can end once a person:

  1. completes the task,
  2. saves it as incomplete, or
  3. Just closes the browser window.

    The end time can be anywhere from 30 minutes to 10 minutes from the start of the quality control work.

    Problem: If you have ActivityID , a start time , and end time column With a table, what would be the best way to go about saving this information in the table, when the work of updating existing records is outside the accelerated publicity in which the record was recorded? It has to be captured at the earliest times, which is quite straightforward, but still, after the completion of the work, it should be captured at the expiration time for the exclusive activity and the "expiry" of the expiration time will be "concluded"

    To consider some scenarios:

    • The person starts an activity, then completes it. After 10 seconds, the person starts and ends in B. The person A has started an activity, and then the person starts in B 10 seconds later, and the person goes to A before 5 seconds before the person. (I don't have any work area that works here ...?)

      Will this route be acceptable ...? To call the page to load, type a proc to call. As part of the process, enter new activity and start the time, and also return the value of the ActivityID (method described here :). When the webpage hits an "end" event, then pass the returned ActivityID from the first process, and call a call that connects the end time to the AcidIID which came from the first process.

        Insert [table_2] ([valueStart]) value ('start'); Select SCOPE_IDENTITY (); Int sqlIden = SQLcommand.execute (); // Update the task [Table_2] set [valueFinish] = 'Finish' where [id] = sqlIden.ToString ();    

Comments