public JsonResult ProcessStaffDetail(StudentId stud) { var partnerId = Lists4CV.Status.Where(x => x.Name == "Partner").First().Id.ToString(); var who = WhoIsWhereLists.Students4WhoIsWhere.Where(x => x.Id == stud.id).First(); if (who.Status == partnerId) { TempData["Student"] = who; TempData["StudCV"] = WhoIsWhereLists.GetStudentCV(who.Id); //TempData["AllApps"] = Employee.AllApplications(stud.id); //TempData["SupHistory"] = Employee.SupervisingHistory(stud.id); } else { var students = (IEnumerable <Student4WhoWhere>)TempData["Staffs"]; TempData.Keep("Staffs"); if (students.Where(x => x.Id == stud.id).Count() == 0) { students = (IEnumerable <Student4WhoWhere>)TempData["OthersStaffs"]; TempData.Keep("OthersStaffs"); } TempData["Student"] = students.Where(x => x.Id == stud.id).First(); TempData["StudCV"] = WhoIsWhereLists.GetStudentCV(stud.id); TempData["AllApps"] = Employee.AllApplications(stud.id); TempData["SupHistory"] = Employee.SupervisingHistory(stud.id); } return(Json("Success", JsonRequestBehavior.AllowGet)); }
public JsonResult ProcessStudentDetail(StudentId stud) { TempData["StudentId"] = stud; TempData["Student"] = WhoIsWhereLists.Students4WhoIsWhere.Where(x => x.Id == stud.id).First(); TempData["StudCV"] = WhoIsWhereLists.GetStudentCV(stud.id); TempData["AllApps"] = Employee.AllApplications(stud.id); TempData["SupHistory"] = Employee.SupervisingHistory(stud.id); return(Json("Success", JsonRequestBehavior.AllowGet)); }
public JsonResult ProcessStudentDetail(StudentId stud) { var students = (IEnumerable <Student4WhoWhere>)TempData["ManagableStudents"]; TempData.Keep("ManagableStudents"); TempData["Student"] = students.Where(x => x.Id == stud.id).First(); TempData["StudCV"] = WhoIsWhereLists.GetStudentCV(stud.id); TempData["AllApps"] = Employee.AllApplications(stud.id); TempData["SupHistory"] = Employee.SupervisingHistory(stud.id); return(Json("Success", JsonRequestBehavior.AllowGet)); }