public ActionResult Index(string id) { var _res = _clientService.GetOrganizationByID(HCRGUser != null ? HCRGUser.OrganizationID : int.Parse(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"]))); if (_res != null) { if (_res.MenuIDs != null) { if (!_res.MenuIDs.Contains("1")) { return(RedirectToAction(GlobalConst.Actions.UserController.UnauthorisePage, GlobalConst.Controllers.User, new { area = "" })); } } } CollegeEducationViewModel collegeeducationviewmodel = new CollegeEducationViewModel(); if (id == null) { if (HCRGUser == null) { var getCollegeEducation = _educationService.GetEducationByEducationFormatIDORCollegeIDORDeptIDORPrfIDPaged(null, null, null, null, GlobalConst.Records.Skip, GlobalConst.Records.LandingTake, HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))); collegeeducationviewmodel.EducationDetailResults = Mapper.Map <IEnumerable <EducationDetail> >(getCollegeEducation.educationsDetail); collegeeducationviewmodel.TotalCount = getCollegeEducation.TotalCount; collegeeducationviewmodel.ShowOnlineCourseOnly = false; } else { var getCollegeEducation = _educationService.GetEducationByEducationFormatIDORCollegeIDORDeptIDORPrfIDPaged(null, null, null, HCRGUser.UID, GlobalConst.Records.Skip, GlobalConst.Records.LandingTake, HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))); collegeeducationviewmodel.EducationDetailResults = Mapper.Map <IEnumerable <EducationDetail> >(getCollegeEducation.educationsDetail); collegeeducationviewmodel.TotalCount = getCollegeEducation.TotalCount; collegeeducationviewmodel.ShowOnlineCourseOnly = false; } } else { if (HCRGUser == null) { var getCollegeEducation = _educationService.GetEducationByEducationFormatIDORCollegeIDORDeptIDORPrfIDPaged(null, 2, null, null, GlobalConst.Records.Skip, GlobalConst.Records.LandingTake, HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))); collegeeducationviewmodel.EducationDetailResults = Mapper.Map <IEnumerable <EducationDetail> >(getCollegeEducation.educationsDetail); collegeeducationviewmodel.TotalCount = getCollegeEducation.TotalCount; collegeeducationviewmodel.ShowOnlineCourseOnly = true; } else { var getCollegeEducation = _educationService.GetEducationByEducationFormatIDORCollegeIDORDeptIDORPrfIDPaged(null, 2, null, HCRGUser.UID, GlobalConst.Records.Skip, GlobalConst.Records.LandingTake, HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))); collegeeducationviewmodel.EducationDetailResults = Mapper.Map <IEnumerable <EducationDetail> >(getCollegeEducation.educationsDetail); collegeeducationviewmodel.TotalCount = getCollegeEducation.TotalCount; collegeeducationviewmodel.ShowOnlineCourseOnly = true; } } return(View(collegeeducationviewmodel)); }
public ActionResult GetAllEducation(int?skip) { CollegeEducationViewModel collegeeducationviewmodel = new CollegeEducationViewModel(); int _skipValue = 0; if (skip != null) { _skipValue = skip.Value; } if (HCRGUser == null) { var getCollegeEducation = _educationService.GetEducationByEducationFormatIDORCollegeIDORDeptIDORPrfIDPaged(null, null, null, null, _skipValue, GlobalConst.Records.LandingTake, HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))); collegeeducationviewmodel.EducationDetailResults = Mapper.Map <IEnumerable <EducationDetail> >(getCollegeEducation.educationsDetail); collegeeducationviewmodel.TotalCount = getCollegeEducation.TotalCount; } else { var getCollegeEducation = _educationService.GetEducationByEducationFormatIDORCollegeIDORDeptIDORPrfIDPaged(null, null, null, HCRGUser.UID, _skipValue, GlobalConst.Records.LandingTake, HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))); collegeeducationviewmodel.EducationDetailResults = Mapper.Map <IEnumerable <EducationDetail> >(getCollegeEducation.educationsDetail); collegeeducationviewmodel.TotalCount = getCollegeEducation.TotalCount; } return(Json(collegeeducationviewmodel, GlobalConst.Message.text_html)); }
public ActionResult GetEducationByProfessionID(int professionID, int?skip) { CollegeEducationViewModel collegeeducationviewmodel = new CollegeEducationViewModel(); if (skip != null) { if (HCRGUser == null) { var getCollegeEducation = _educationService.GetEducationByProfessionIDPaged(professionID, 0, skip.Value, GlobalConst.Records.LandingTake, HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))); collegeeducationviewmodel.EducationDetailResults = Mapper.Map <IEnumerable <EducationDetail> >(getCollegeEducation.educationsDetail); collegeeducationviewmodel.TotalCount = getCollegeEducation.TotalCount; } else { var getCollegeEducation = _educationService.GetEducationByProfessionIDPaged(professionID, HCRGUser.UID, skip.Value, GlobalConst.Records.LandingTake, HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))); collegeeducationviewmodel.EducationDetailResults = Mapper.Map <IEnumerable <EducationDetail> >(getCollegeEducation.educationsDetail); collegeeducationviewmodel.TotalCount = getCollegeEducation.TotalCount; } } else { if (HCRGUser == null) { var getCollegeEducation = _educationService.GetEducationByProfessionIDPaged(professionID, 0, GlobalConst.Records.Skip, GlobalConst.Records.LandingTake, HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))); collegeeducationviewmodel.EducationDetailResults = Mapper.Map <IEnumerable <EducationDetail> >(getCollegeEducation.educationsDetail); collegeeducationviewmodel.TotalCount = getCollegeEducation.TotalCount; } else { var getCollegeEducation = _educationService.GetEducationByProfessionIDPaged(professionID, HCRGUser.UID, GlobalConst.Records.Skip, GlobalConst.Records.LandingTake, HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))); collegeeducationviewmodel.EducationDetailResults = Mapper.Map <IEnumerable <EducationDetail> >(getCollegeEducation.educationsDetail); collegeeducationviewmodel.TotalCount = getCollegeEducation.TotalCount; } } return(Json(collegeeducationviewmodel, GlobalConst.Message.text_html)); }