public async Task <ActionResult> Complaint(TimesheetComPostDTO _TimesheetComPostDTO) { try { if (_UtilitySession.Session != null) { LabourComplaintDetailDTO _LabourComplaintDetailDTO = new LabourComplaintDetailDTO(); List <TimesheetComGridPostDTO> _TimesheetComGridPostDTO = new List <TimesheetComGridPostDTO>(); ViewBag.Name = _UtilitySession.Session.user.name; string User_id = _UtilitySession.Session.user.id; List <ts_timesheet> _ts_timesheet_com = new List <ts_timesheet>(); ts_user _ts_user = new ts_user(); _ts_user = _UtilitySession.Session.user; _TimesheetComGridPostDTO = await Task.Run(() => _Repository.setTimesheetComData(_TimesheetComPostDTO, _ts_user)); _LabourComplaintDetailDTO._TimesheetComGridPostDTO = _TimesheetComGridPostDTO; return(View(_LabourComplaintDetailDTO)); } else { return(RedirectToAction("Index", "Home")); } } catch (NullReferenceException e) { ViewBag.Error = e.ToString(); return(View()); } }
public async Task <ActionResult> AllCheckOut(string CheckoutTime) { LabourComplaintDetailDTO _LabourComplaintDetailDTO = new LabourComplaintDetailDTO(); if (_UtilitySession.Session != null) { ViewBag.Name = _UtilitySession.Session.user.name; List <TimesheetComGridPostDTO> _TimesheetComGridPostDTO = new List <TimesheetComGridPostDTO>(); _UtilitySession.Session._TimesheetGridDTO = null; ts_user _ts_user = new ts_user(); _ts_user = _UtilitySession.Session.user; _TimesheetComGridPostDTO = await Task.Run(() => _Repository.AllComplainCheckOut(_ts_user, CheckoutTime)); _UtilityComplainSession.Session._TimesheetComGridPostDTO = _TimesheetComGridPostDTO; _LabourComplaintDetailDTO._TimesheetComGridPostDTO = _TimesheetComGridPostDTO; _LabourComplaintDetailDTO._TimesheetComGridPostDTO = _UtilityComplainSession.Session._TimesheetComGridPostDTO; _LabourComplaintDetailDTO.PageSize = 5; _LabourComplaintDetailDTO.TotalCount = _UtilitySession.Session._TimesheetGridDTO.Count; return(View(_LabourComplaintDetailDTO)); } else { return(RedirectToAction("Index", "Home")); } }
public async Task <ActionResult> IndividualCheckOut(int?empid, string checkOutTime) { LabourComplaintDetailDTO _LabourComplaintDetailDTO = new LabourComplaintDetailDTO(); if (_UtilitySession.Session != null) { ViewBag.Name = _UtilitySession.Session.user.name; List <TimesheetComGridPostDTO> _TimesheetComGridPostDTO = new List <TimesheetComGridPostDTO>(); ts_user _ts_user = new ts_user(); _ts_user = _UtilitySession.Session.user; _TimesheetComGridPostDTO = await Task.Run(() => _Repository.IndividualComplainCheckOut(_ts_user, empid, checkOutTime)); return(View(_LabourComplaintDetailDTO)); } else { return(RedirectToAction("Index", "Home")); } }