public ActionResult StudentEdit(int id) { var model = new StudentEditModel(); model = ProfileManageRepo.editStudentProfile(id); return(View(model)); }
public ActionResult TeacherEdit(int id) { var model = new TeacherEditModel(); model = ProfileManageRepo.editTeacherProfile(id); return(View(model)); }
public ActionResult TeacherProfile() { var model = new TeacherProfileModel(); model = ProfileManageRepo.loadTeacherProfile(HttpUtil.UserProfile.ID); return(View(model)); }
public ActionResult TeacherEdit(TeacherEditModel model) { if (!ModelState.IsValid) { return(View(model)); } var result = ProfileManageRepo.saveTeacherProfile(model, HttpUtil.UserProfile.ID); if (result.HasError) { ViewBag.Error = result.Message; return(View(model)); } return(View(model)); }