// // GET: /TimeSheet/Edit/5 public ActionResult Edit(int id = 0) { TimeSheetMaster master = TimesheetRepository.GetTimeSheetMasterById(id); List <SelectListItem> items = new List <SelectListItem>(); items.Add(new SelectListItem { Text = "Approved", Value = "1" }); items.Add(new SelectListItem { Text = "Submitted", Value = "2", }); items.Add(new SelectListItem { Text = "Rejected", Value = "3" }); ViewBag.StatusList = items; if (master == null) { return(HttpNotFound()); } return(View(master)); }
// // GET: /TimeSheetMaster/Delete/5 public ActionResult Delete(int id = 0) { TimeSheetMaster master = TimesheetRepository.GetTimeSheetMasterById(id); if (master == null) { return(HttpNotFound()); } return(View(master)); }
// // GET: /TimeSheet/Details/5 public ActionResult Details(int id) { TimeSheetMaster master = TimesheetRepository.GetTimeSheetMasterById(id); var detail = master.TimeSheetDetail; if (detail == null) { return(HttpNotFound()); } return(View(detail.ToList())); }