public async Task <ActionResult> StudentProfile(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var student = await _studentProfileService.Get(id); var currentpackage = await _studentProfileService.PackageNameForStudent(); ViewBag.currentpackage = currentpackage; if (student == null) { return(HttpNotFound()); } return(View(student)); }
// GET: Student/Panel public async Task <ActionResult> Index() { try { var profile = await _studentInfoService.GetStudentWithoutId(); ViewBag.student = profile; //var sub = await _studentInfoService.SubjectCountStudent(); //ViewBag.SubjectCount = sub; //var post = await _postService.ListPost(7); //ViewBag.post = post; var package = await _studentInfoService.PackageNameForStudent(); ViewBag.Package = package; } catch (Exception ex) { var a = ex; } return(View()); }