Example #1
0
 public static tblCandidateTimesheetHour ConvertTotblCandidateTimesheetHour(this CandidateTimesheetHoursViewModel data)
 {
     return(new tblCandidateTimesheetHour()
     {
         ID = Convert.ToInt64(data.ID),
         TimesheetID = data.TimesheetID,
         TimeDate = data.TimeDate,
         HoursWorked = data.HoursWorked,
         BreakHours = data.BreakHours
     });
 }
Example #2
0
        public async Task <CandidateTimesheetHoursViewModel> UpdateCandidateTimesheetHours(CandidateTimesheetHoursViewModel data)
        {
            try
            {
                await Task.Run(() => ManageCandidateTimesheetHours.UpdateCandidateTimesheetHours(data.ConvertTotblCandidateTimesheetHour()));

                return(data);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #3
0
        public async Task <CandidateTimesheetHoursViewModel> CreateCandidateTimesheetHours(CandidateTimesheetHoursViewModel data)
        {
            try
            {
                tblCandidateTimesheetHour res = await Task.Run(() => ManageCandidateTimesheetHours.InsertCandidateTimesheetHours(data.ConvertTotblCandidateTimesheetHour()));

                return(res.ConvertToCandidateTimesheetHoursViewModel());
            }
            catch (Exception)
            {
                throw;
            }
        }