public ActionResult UpdateRegistrationInterview(int registrationId, string identifyCard)
        {
            RegistrationInterview registrationInterview = registrationInterviewRepository.GetRegistrationInterviewByIdAndIdentifyCard(registrationId, identifyCard);

            if (registrationInterview == null || registrationInterview.CreatedAt.Value.Year != DateTime.Now.Year || registrationInterview.ReviewedBy != null)
            {
                return(RedirectToRoute("hosoungtuyen"));
            }
            List <Province>                     province = provinceRepository.GetProvinceByCountryId(237);
            List <District>                     districtsCurrentLiving        = districtRepository.GetDistrictByProvinceId(79);
            List <Ward>                         wardsCurrentLiving            = wardRepository.GetWardByDistrictId(registrationInterview.CurrentLivingAddress.Ward.DistrictID);
            List <District>                     districtsHouseHold            = districtRepository.GetDistrictByProvinceId(registrationInterview.HouseHold.Ward.District.ProvinceId);
            List <Ward>                         wardsHouseHold                = wardRepository.GetWardByDistrictId(registrationInterview.HouseHold.Ward.DistrictID);
            List <TrainningCategory>            trainningCategories           = trainningCategoryRepository.GetTrainningCategories();
            List <GraduationClassfication>      graduationClassfication       = graduationClassficationRepository.GetGraduationClassfications();
            List <SpecializedTraining>          specializedTrainings          = specializedTrainingRepository.GetSpecializedTrainings();
            List <HighestLevelEducation>        highestLevelEducations        = highestLevelEducationRepository.GetHighestLevelEducations();
            List <StatusWorikingInEducation>    statusWorikingInEducations    = statusWorikingInEducationRepository.GetStatusWorikingInEducations();
            List <InfomationTechnologyDegree>   infomationTechnologyDegrees   = informationTechnologyDegree.GetAllInfomationTechnologyDegree();
            List <ForeignLanguageCertification> foreignLanguageCertifications = foreignLanguageRepository.GetAllForeignLanguageCertification();
            List <Subject>                      subjects = subjectRepository.GetSubjects();
            List <DegreeClassification>         degreeClassifications = degreeClassificationRepository.GetDegreeClassifications();
            List <SchoolDegree>                 schoolDegrees         = degreeRepository.GetSchoolDegrees();


            CandidateModelInOneView candidateModelInOneView = new CandidateModelInOneView(province, districtsCurrentLiving, wardsCurrentLiving, districtsHouseHold, wardsHouseHold, registrationInterview, trainningCategories, graduationClassfication, highestLevelEducations, specializedTrainings, statusWorikingInEducations, infomationTechnologyDegrees, foreignLanguageCertifications, subjects, degreeClassifications, schoolDegrees);

            return(View(candidateModelInOneView));
        }
Example #2
0
        public ActionResult ApproveRegistration(int id)
        {
            Account usersession = (Account)Session[CommonConstants.USER_SESSION];

            if (usersession == null || usersession.RoleId != 4 && usersession.RoleId != 2)
            {
                Session.RemoveAll();
                return(RedirectToRoute("login", null));
            }
            RegistrationInterview registrationInterview = registrationInterviewRepository.GetRegistrationInterviewByIdWithDetail(id);

            if (registrationInterview == null || registrationInterview.PhoneNumber == null || registrationInterview.CreatedAt.Value.Year != DateTime.Now.Year || registrationInterview.ReviewedBy != null || registrationInterview.CreatedAtManagementUnitId != usersession.ManagementUnitId)
            {
                return(RedirectToRoute("raxoathoso"));
            }
            List <Province>                     province = provinceRepository.GetProvinceByCountryId(237);
            List <District>                     districtsCurrentLiving        = districtRepository.GetDistrictByProvinceId(79);
            List <Ward>                         wardsCurrentLiving            = wardRepository.GetWardByDistrictId(registrationInterview.CurrentLivingAddress.Ward.DistrictID);
            List <District>                     districtsHouseHold            = districtRepository.GetDistrictByProvinceId(registrationInterview.HouseHold.Ward.District.ProvinceId);
            List <Ward>                         wardsHouseHold                = wardRepository.GetWardByDistrictId(registrationInterview.HouseHold.Ward.DistrictID);
            List <TrainningCategory>            trainningCategories           = trainningCategoryRepository.GetTrainningCategories();
            List <GraduationClassfication>      graduationClassfication       = graduationClassficationRepository.GetGraduationClassfications();
            List <SpecializedTraining>          specializedTrainings          = specializedTrainingRepository.GetSpecializedTrainings();
            List <HighestLevelEducation>        highestLevelEducations        = highestLevelEducationRepository.GetHighestLevelEducations();
            List <StatusWorikingInEducation>    statusWorikingInEducations    = statusWorikingInEducationRepository.GetStatusWorikingInEducations();
            List <InfomationTechnologyDegree>   infomationTechnologyDegrees   = informationTechnologyDegree.GetAllInfomationTechnologyDegree();
            List <ForeignLanguageCertification> foreignLanguageCertifications = foreignLanguageRepository.GetAllForeignLanguageCertification();
            List <Subject>                      subjects = subjectRepository.GetSubjects();
            List <DegreeClassification>         degreeClassifications        = degreeClassificationRepository.GetDegreeClassifications();
            List <SchoolDegree>                 schoolDegrees                = degreeRepository.GetSchoolDegrees();
            List <SubjectRequiredSchoolDegree>  subjectRequiredSchoolDegrees = subjectsRequiredSchoolDegreeRepository.GetSubjectRequiredSchoolDegreesBySchoolDegree(registrationInterview.SchoolDegreeIdExpectedTeach);

            CandidateModelInOneView candidateModelInOneView = new CandidateModelInOneView(province, districtsCurrentLiving, wardsCurrentLiving, districtsHouseHold, wardsHouseHold, registrationInterview, trainningCategories, graduationClassfication, highestLevelEducations, specializedTrainings, statusWorikingInEducations, infomationTechnologyDegrees, foreignLanguageCertifications, subjects, degreeClassifications, schoolDegrees);

            return(View(candidateModelInOneView));
        }