public ActionResult AddEditEducationDetails(int EducationId = 0, bool IsReadOnly = false) { ViewBag.Classes = GetClasses(); ViewBag.Discipline = GetDiscipline(0); ViewBag.Colleges = GetColleges(); ViewBag.EducationCategory = GetEducationCategory(); ViewBag.Specialization = GetSpecialization(); ViewBag.University = GetUniversity(); ViewBag.Months = GetMonths(); ViewBag.Years = GetYears(); ViewBag.IsReadOnly = IsReadOnly; ViewBag.IsEditPage = false; if (System.Web.HttpContext.Current.Request.IsAuthenticated) { userId = Convert.ToInt32(System.Web.HttpContext.Current.User.Identity.Name.Split('|')[1]); userName = System.Web.HttpContext.Current.User.Identity.Name.Split('|')[0]; //var res = user.Where(u => u.Password == details.Password && u.Email.ToLower() == details.Email.ToLower()).SingleOrDefault(); var eduDetails_lst = _IEducationService.GetAll(null, null, ""); Session["eduDetails_lst"] = eduDetails_lst; var obj = eduDetails_lst.Where(u => u.UserID == userId && u.EduDetID == EducationId).FirstOrDefault(); if (obj != null) { _educationDetails = obj; } } Models.EducationDetails model = new EducationDetails(); if (EducationId != 0) { Mapper.CreateMap <Data.EmployeeEducationDetail, Models.EducationDetails>(); model = Mapper.Map <Data.EmployeeEducationDetail, Models.EducationDetails>(_educationDetails); //By Sachin Khot //model.EducationCategoryId = Convert.ToInt32(model.EducationCategory); model.EducationCategoryId = Convert.ToInt32(model.EducationCategoryId); //model.InstituteNameId = Convert.ToInt32(model.InstituteName); model.InstituteNameId = Convert.ToInt32(model.CollegeID); //model.University_BoardNameId = Convert.ToInt32(model.University_BoardName); model.University_BoardNameId = Convert.ToInt32(model.UniversityID); //model.ClassId = Convert.ToInt32(model.Class); model.ClassId = Convert.ToInt32(model.ClassId); //ViewBag.Discipline = GetDiscipline(Convert.ToInt32(model.TypeofDegreeDeploma)); ViewBag.Discipline = GetDiscipline(Convert.ToInt32(model.DisciplineID)); //model.TypeofDegreeDeplomaId = Convert.ToInt32(model.TypeofDegreeDeploma); model.TypeofDegreeDeplomaId = Convert.ToInt32(model.DisciplineID); //model.SpecializationId = Convert.ToInt32(model.Specialization); model.SpecializationId = Convert.ToInt32(model.SpecializationId); ViewBag.IsEditPage = true; } //Mapper.CreateMap<List<GetEducationList_Result>, List<EducationDetailsHistory>>(); //user.EducationalDetailsList = EducationListPagedList(userId); return(View("EducationalDetails", model)); }
public IActionResult GetByResumeId(int resumeId) { var entities = _educationService.GetAll(resumeId); var model = entities.ToModels(); return(Ok(model)); }
public async Task <IActionResult> Index() { var skills = await _skillService.GetAll(); var sliders = await _homePageSliderService.GetAll(); var messages = await _messageService.GetAll(); var educations = await _educationService.GetAll(); var experiences = await _experienceService.GetAll(); var interesteds = await _interestedService.GetAll(); var articles = await _articleService.GetAll(); var categories = await _categoryService.GetAll(); ViewBag.SkillCount = skills.Data.Skills.Count; ViewBag.SliderCount = sliders.Data.HomePageSliders.Count; ViewBag.MessageCount = messages.Data.Messages.Count; ViewBag.EducationCount = educations.Data.Educations.Count; ViewBag.ExperienceCount = experiences.Data.Experiences.Count; ViewBag.InterestedCount = interesteds.Data.Interesteds.Count; ViewBag.ArticleCount = articles.Data.Articles.Count; ViewBag.CategoryCount = categories.Data.Categories.Count; return(View()); }
public IActionResult GetAll() { var result = _educationService.GetAll(); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public async Task <IActionResult> Index() { var educations = await _educationService.GetAll(); if (educations.ResultStatus == ResultStatus.Error) { return(NotFound()); } if (educations.ResultStatus == ResultStatus.Success) { return(View(educations.Data)); } return(NotFound()); }
public HttpResponseMessage GetEduBackground() { IList <Education> educationList = new List <Education>(); if (HttpRuntime.Cache["Education"] != null) { educationList = HttpRuntime.Cache["Education"] as List <Education>; } else { educationList = _educationService.GetAll().ToList(); SqlCacheHelper.FetchFromDb("Education", educationList); } if (educationList.Count == 0) { throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound)); } return(Request.CreateResponse(HttpStatusCode.OK, educationList)); }