// // GET: /Student/Create public ActionResult Edit(string id) { if (HttpContext != null) { UrlHelper url = new UrlHelper(HttpContext.Request.RequestContext); ViewBag.breadCrumbData = "<a href='" + url.Action("Index", "Department") + "'>Department List</a>"; ViewBag.breadCrumbData += " > Edit"; } PLDepartment department = DepartmentClientService.GetDepartmentDetail(id); List <PLStaff> st = StaffClientService.GetStaffList(); List <SelectListItem> res = new List <SelectListItem>(); foreach (PLStaff tmp in st) { if (tmp.Department.deptName.Equals(id)) { res.Add(new SelectListItem { Value = tmp.ID.ToString(), Text = tmp.FirstName + " " + tmp.LastName }); } } ViewBag.listStaff = res; return(View("Edit", department)); }
// // GET: /Staff/ public ActionResult Index() { List <PLStaff> staffList = StaffClientService.GetStaffList(); ViewBag.breadCrumbData = "Staff List"; return(View("List", staffList)); }