public IHttpActionResult Details(string id) { try { if (string.IsNullOrEmpty(id)) { return(NotFound()); } MainTimeSheetView objMT = new MainTimeSheetView { TimesheetStatus = _ITimeSheetRepository.GetTimesheetstatus(id), TimeSheetMasterID = Convert.ToInt32(id) }; return(Ok(objMT)); } catch (Exception) { throw; } }
public ActionResult Details(string id) { try { if (string.IsNullOrEmpty(id)) { return(RedirectToAction("TimeSheet", "AllTimeSheet")); } MainTimeSheetView objMT = new MainTimeSheetView(); objMT.ListTimeSheetDetails = _ITimeSheet.TimesheetDetailsbyTimeSheetMasterID(Convert.ToInt32(Session["UserID"]), Convert.ToInt32(id)); objMT.ListofProjectNames = _ITimeSheet.GetProjectNamesbyTimeSheetMasterID(Convert.ToInt32(id)); objMT.ListofPeriods = _ITimeSheet.GetPeriodsbyTimeSheetMasterID(Convert.ToInt32(id)); objMT.ListoDayofWeek = DayofWeek(); objMT.TimeSheetMasterID = Convert.ToInt32(id); return(View(objMT)); } catch (Exception) { throw; } }