Пример #1
0
 /// <summary>
 /// Adds a new shift.
 /// </summary>
 /// <param name="sessionID">The sessionID of the current session</param>
 /// <param name="EmployeeID">The employee ID of the employee who's shift this is.</param>
 /// <param name="role">The role for the shift.</param>
 /// <param name="start">The start time of the shift.</param>
 /// <param name="end">The end time of the shift.</param>
 public void AddShift(string sessionID, int EmployeeID, string role, DateTime start, DateTime end)
 {
     WorkerShiftsTableAdapter wta = new WorkerShiftsTableAdapter();
     wta.Insert(start, end, role, EmployeeID);
 }
 /// <summary>
 /// Starts a new shift of the given logged in in the given role.
 /// </summary>
 /// <param name="sessionID">The sessionID of the current session</param>
 /// <param name="role">The role.</param>
 public void StampShiftStart(string sessionID, string role)
 {
     WorkerShiftsTableAdapter wta = new WorkerShiftsTableAdapter();
     wta.Insert(DateTime.Now, null, role, Auth.getEmployeeID(sessionID));
     EmployeeStatusTableAdapter est = new EmployeeStatusTableAdapter();
     est.UpdateStatus(true, role, Auth.getEmployeeID(sessionID));
 }