public ActionResult Create(AcadamicMasterModel model) { var studentId = UserProfileMasterBAL.GetStudentProfileData(User.Identity.Name).StudentId; model.CollageName = CollageMasterBAL.GetCollage(studentId.ToString()).CollageName; model.SemesterList = AcademicMasterBAL.BindSamester(); model.GradeList = AcademicMasterBAL.BindGrade(); if (ModelState.IsValid) { try { // TODO: Add insert logic here AcademicMasterBAL.CreateProfile(model, studentId.ToString()); return(RedirectToAction("Index")); } catch (Exception Ex) { return(View(Ex)); } } else { return(View(model)); } }
// GET: ManageProfile/Create public ActionResult Create() { var model = UserProfileMasterBAL.GetStudentProfileData(User.Identity.Name); model.CollageList = CollageMasterBAL.GetCollageList(); model.GenderList = UserProfileMasterBAL.BindGender(); return(View(model)); }
// GET: Academic/Edit/5 public ActionResult Edit(int id) { var studentId = UserProfileMasterBAL.GetStudentProfileData(User.Identity.Name).StudentId; var model = AcademicMasterBAL.Acadamic(User.Identity.Name, id); model.CollageName = CollageMasterBAL.GetCollage(studentId.ToString()).CollageName; model.SemesterList = AcademicMasterBAL.BindSamester(); model.GradeList = AcademicMasterBAL.BindGrade(); return(View(model)); }
public ActionResult Create(UserProfileMasterModel model) { model.StudentId = UserProfileMasterBAL.GetStudentProfileData(User.Identity.Name).StudentId; model.CollageList = CollageMasterBAL.GetCollageList(); model.GenderList = UserProfileMasterBAL.BindGender(); if (ModelState.IsValid) { UserProfileMasterBAL.CreateProfile(model); return(RedirectToAction("Create")); } else { return(View(model)); } }