public async Task <JsonResult> Archived(ShiftViewModel model, bool archive) { try { var data = _shiftService.GetByID(model.ID).Result; data.UpdatedAt = TimeUtility.GetTimeZoneByName(CurrentUser.TimeZone); data.UpdatedBy = CurrentUser.ID; data.IsArchived = archive; _shiftService.Update(data); return(Json(new { success = true })); } catch { return(Json(new { success = false })); } }