public EducationalDetail Create(EducationalDetail obj) { try { _educationalDetailRepo.InsertCompletedEvent += objSubscriberClasses.SendEmail; _educationalDetailRepo.InsertCompletedEvent += objSubscriberClasses.SendSMS; obj = _educationalDetailRepo.Create(obj); //userObj.Id = (long)obj.UserId; //userObj.ProfileInfoPercentage = (int)CustomStatus.ProfileInfoPercentage.Complete; //_userDetailsRepo.UpdateUser(userObj); return obj; } catch (Exception ex) { _logger.Error(ex.Message, ex); throw ex; } }
public EducationalDetail UpdateEducationDetails(int id, EducationalDetail UpdateEducationDetails) { return _educationalDetailRepo.UpdateEducationDetails(id, UpdateEducationDetails); }
public ActionResult UpdateAlumni(StudentRegistrationModel StudentRegistration) { if (Session["UserId"] != null) { int UserId = Convert.ToInt32(Session["UserId"].ToString()); StudentRegistrationModel userdto = null; if (ModelState.IsValid) { EducationalDetail Education = new EducationalDetail(); TryUpdateModel(Education); EducationalDetailService.UpdateEducationDetails(UserId, Education); TempData["Success"] = UtilitiesClass.SuccessMessage; return RedirectToAction("Profile", "Profile", new { area = "Alumini" }); } List<EducationdetailsDTO> educationdetails = EducationalDetailService.GetEducationdetails(UserId); List<GraduationYear> _GraduationYears = new List<GraduationYear>(); for (int i = 1970; i <= 2015; i++) _GraduationYears.Add(new GraduationYear { Year = "" + i, GraduationYearId = i }); foreach (var educationdetail in educationdetails) { userdto = new StudentRegistrationModel() { CourseId = educationdetail.CourseId, CourseCategoryId = educationdetail.CategoryId, Batch = educationdetail.Batch, Coursecategorys = CourseCategoryService.GetAllCourseCategories(), }; } return View(userdto); } return RedirectToAction("Login", "Account", new { area = "" }); }