public EducationController(IUserService IUserService, IEducationService IEducationService, IClassService IClassService, ICollegeService ICollegeService, IDisciplineService IDisciplineService, IEducationCategoryService IEducationCategoryService, ISpecializationService ISpecializationService, IUniversityService IUniversityService, IEducationCategoryUniversityBoardMappingService IEducationCategoryUniversityBoardMappingService) { this._IUserService = IUserService; this._IEducationService = IEducationService; _educationDetails = new EmployeeEducationDetail(); this._IClassService = IClassService; _class = new Master_Class(); this._ICollegeService = ICollegeService; _college = new Master_College(); this._IDisciplineService = IDisciplineService; _discipline = new Master_Discipline(); this._IEducationCategoryService = IEducationCategoryService; _educationCategory = new Master_EducationCategory(); this._ISpecializationService = ISpecializationService; _specialization = new Master_Specialization(); this._IUniversityService = IUniversityService; _university = new Master_University(); this._IEducationCategoryUniversityBoardMappingService = IEducationCategoryUniversityBoardMappingService; _educationCategoryUniversityBoardMapping = new EducationCategoryUniversityBoardMapping(); }
public SelectList GetDiscipline(int catId) { List <Master_Discipline> disciplineList = new List <Master_Discipline>(); disciplineList = _IDisciplineService.GetAll(null, null, "").ToList(); List <Master_EducationCategory> categoryList = new List <Master_EducationCategory>(); categoryList = _IEducationCategoryService.GetAll(null, null, "").ToList(); int sscCatId = categoryList.Where(a => a.EducationCategory == "SSC").Select(a => a.EducationCategoryID).SingleOrDefault(); int hscCatId = categoryList.Where(a => a.EducationCategory == "HSC").Select(a => a.EducationCategoryID).SingleOrDefault(); int sscDisId = disciplineList.Where(a => a.DisciplineName == "SSC").Select(a => a.DisciplineID).SingleOrDefault(); int hscDisId = disciplineList.Where(a => a.DisciplineName == "HSC").Select(a => a.DisciplineID).SingleOrDefault(); if (catId == sscCatId)//SSC { Master_Discipline item = disciplineList.Where(m => m.DisciplineID == sscDisId).FirstOrDefault(); disciplineList.Clear(); disciplineList.Add(item); } else if (catId == hscCatId)//HSC { Master_Discipline item = disciplineList.Where(m => m.DisciplineID == hscDisId).FirstOrDefault(); disciplineList.Clear(); disciplineList.Add(item); } else if (catId != 0 && catId != sscCatId && catId != hscCatId) { disciplineList = disciplineList.Where(m => m.DisciplineID != sscDisId && m.DisciplineID != hscDisId).ToList(); } SelectList selList = new SelectList(disciplineList, "DisciplineID", "DisciplineName"); return(selList); }
public bool Update(Master_Discipline obj, string[] param, string spName) { throw new NotImplementedException(); }
public IEnumerable <Master_Discipline> GetAll(Master_Discipline obj, string[] param, string spName) { return(_IDisciplineRepository.GetAll(obj, param, spName)); }