示例#1
0
 public async Task <IEnumerable <SubzzV2.Core.Models.TimeClock> > GetTimeClockData(string userId)
 {
     try
     {
         var model = new SubzzV2.Core.Models.TimeClock
         {
             UserId   = base.CurrentUser.Id,
             Activity = TimeClockActivity.ActionType.Return
         };
         return(await _service.GetTimeClockData(model));
     }
     catch (Exception ex)
     {
     }
     finally
     {
     }
     return(null);
 }
示例#2
0
 public IActionResult CheckTimeClockStatus()
 {
     try
     {
         var model = new SubzzV2.Core.Models.TimeClock
         {
             UserId   = base.CurrentUser.Id,
             Activity = TimeClockActivity.ActionType.Return
         };
         var Summary = _service.CheckTimeClockStatus(model);
         return(Json(Summary));
     }
     catch (Exception ex)
     {
     }
     finally
     {
     }
     return(null);
 }
示例#3
0
 public IActionResult InsertClockOutTimeNew(string userId)
 {
     try
     {
         var model = new SubzzV2.Core.Models.TimeClock
         {
             UserIdd      = base.CurrentUser.Id,
             UpdatedOn    = DateTime.Now,
             ActivityTime = DateTime.Now,
             Activity     = TimeClockActivity.ActionType.Clockout
         };
         var Summary = _service.InsertClockOutTimeNew(model);
         return(Ok(Summary));
     }
     catch (Exception ex)
     {
     }
     finally
     {
     }
     return(null);
 }
示例#4
0
 public ActionResult UpdateTimeClockData([FromBody] SubzzV2.Core.Models.TimeClock model)
 {
     try
     {
         int RowsEffected = _service.UpdateTimeClockData(model);
         if (RowsEffected > 0)
         {
             return(Json("success"));
         }
         else
         {
             return(Json("error"));
         }
     }
     catch (Exception ex)
     {
     }
     finally
     {
     }
     return(null);
 }
示例#5
0
 public IActionResult TimeClockBreakStatusNew(string userId)
 {
     try
     {
         var model = new SubzzV2.Core.Models.TimeClock
         {
             UserIdd       = base.CurrentUser.Id,
             UpdatedOn     = DateTime.Now,
             ActivityTime  = DateTime.Now,
             BreakTime     = DateTime.Now.TimeOfDay,
             Activity      = TimeClockActivity.ActionType.Break,
             TakeBreakTime = DateTime.Now.TimeOfDay
         };
         var Summary = _service.TimeClockBreakStatusNew(model);
         return(Ok(Summary));
     }
     catch (Exception ex)
     {
     }
     finally
     {
     }
     return(null);
 }