public List<JobIndustryAreaModel> GetJobIndustryAreaWithJobPost()
 {
     DataTable jobIndustryArea = _jobPostProcessor.GetJobIndustryAreaWithJobPost();
     List<JobIndustryAreaModel> lstJobIndustryArea = new List<JobIndustryAreaModel>();
     if (jobIndustryArea.Rows.Count > 0)
     {
         lstJobIndustryArea = ConvertDatatableToModelList.ConvertDataTable<JobIndustryAreaModel>(jobIndustryArea);
     }
     return lstJobIndustryArea;
 }
 public List<CountryViewModel> GetCountryDetails()
 {
     DataTable country = masterDataRepository.GetCountries();
     List<CountryViewModel> lstCountry = new List<CountryViewModel>();
     if (country.Rows.Count > 0)
     {
         lstCountry = ConvertDatatableToModelList.ConvertDataTable<CountryViewModel>(country);
     }
     return lstCountry;
 }
 public List<EmploymentStatusModel> GetJobJobEmploymentStatusDetails()
 {
     DataTable JobEmploymentStatus = _jobPostProcessor.GetJobJobEmploymentStatusDetail();
     List<EmploymentStatusModel> lstJobEmploymentStatus = new List<EmploymentStatusModel>();
     if (JobEmploymentStatus.Rows.Count > 0)
     {
         lstJobEmploymentStatus = ConvertDatatableToModelList.ConvertDataTable<EmploymentStatusModel>(JobEmploymentStatus);
     }
     return lstJobEmploymentStatus;
 }
 public List<EmploymentTypeModel> GetJobJobEmploTypeDetails()
 {
     DataTable JobEmploymentType = _jobPostProcessor.GetJobJobEmploTypeDetail();
     List<EmploymentTypeModel> lstJobEmploymentType = new List<EmploymentTypeModel>();
     if (JobEmploymentType.Rows.Count > 0)
     {
         lstJobEmploymentType = ConvertDatatableToModelList.ConvertDataTable<EmploymentTypeModel>(JobEmploymentType);
     }
     return lstJobEmploymentType;
 }
        public List <CityViewModel> GetCityHasJobPostId()
        {
            DataTable            city    = _homeRepositories.GetCityHasJobPostId();
            List <CityViewModel> lstCity = new List <CityViewModel>();

            if (city.Rows.Count > 0)
            {
                lstCity = ConvertDatatableToModelList.ConvertDataTable <CityViewModel>(city);
            }
            return(lstCity);
        }
Exemple #6
0
        public List <GenderViewModel> GetGenders()
        {
            DataTable genderdata             = masterRepo.GetAllGender(true);
            List <GenderViewModel> lstGender = new List <GenderViewModel>();

            if (genderdata.Rows.Count > 0)
            {
                lstGender = ConvertDatatableToModelList.ConvertDataTable <GenderViewModel>(genderdata);
            }
            return(lstGender);
        }
 public List<StateViewModel> GetStateList(string CountryCode)
 {
     DataTable state = _jobPostProcessor.GetStateListDetail(CountryCode);
     if (state.Rows.Count > 0)
     {
         List<StateViewModel> lstState = new List<StateViewModel>();
         lstState = ConvertDatatableToModelList.ConvertDataTable<StateViewModel>(state);
         return lstState;
     }
     throw new UserNotFoundException("User not found");
 }
        public List <MaritalStatusViewModel> GetMaritalStatusMaster()
        {
            DataTable maritalStatuses = masterRepository.GetMaritalStatusMaster();
            List <MaritalStatusViewModel> lstMaritalStatus = new List <MaritalStatusViewModel>();

            if (maritalStatuses.Rows.Count > 0)
            {
                lstMaritalStatus = ConvertDatatableToModelList.ConvertDataTable <MaritalStatusViewModel>(maritalStatuses);
            }
            return(lstMaritalStatus);
        }
 public List<GenderViewModel> GetGenderListDetail()
 {
     DataTable gender = _jobPostProcessor.GetGenderListDetail();
     if (gender.Rows.Count > 0)
     {
         List<GenderViewModel> genderList = new List<GenderViewModel>();
         genderList = ConvertDatatableToModelList.ConvertDataTable<GenderViewModel>(gender);
         return genderList;
     }
     throw new UserNotFoundException("Data not found");
 }
 public List<JobTitleViewModel> GetJobTitleDetails()
 {
     DataTable jobTitle = masterDataRepository.GetJobRoles();
     List<JobTitleViewModel> lstJobTitle = new List<JobTitleViewModel>();
     if (jobTitle.Rows.Count > 0)
     {
         lstJobTitle = ConvertDatatableToModelList.ConvertDataTable<JobTitleViewModel>(jobTitle);
         return lstJobTitle;
     }
     return lstJobTitle;
 }
Exemple #11
0
        public List <StateViewModel> GetStates(string country)
        {
            DataTable             state    = masterRepo.GetStates(country);
            List <StateViewModel> lstState = new List <StateViewModel>();

            if (state.Rows.Count > 0)
            {
                lstState = ConvertDatatableToModelList.ConvertDataTable <StateViewModel>(state);
            }
            return(lstState);
        }
 public List<JobIndustryAreaModel> GetJobIndustryAreaWithStudentData()
 {
     DataTable jobIndustryArea = _jobPostProcessor.GetJobIndustryAreaWithStudentData();
     if (jobIndustryArea.Rows.Count > 0)
     {
         List<JobIndustryAreaModel> lstJobIndustryArea = new List<JobIndustryAreaModel>();
         lstJobIndustryArea = ConvertDatatableToModelList.ConvertDataTable<JobIndustryAreaModel>(jobIndustryArea);
         return lstJobIndustryArea;
     }
     throw new DataNotFound("Data not found");
 }
 public List<CityViewModel> GetCityList(string StateCode)
 {
     DataTable city = _jobPostProcessor.GetCityListDetail(StateCode);
     if (city.Rows.Count > 0)
     {
         List<CityViewModel> lstCity = new List<CityViewModel>();
         lstCity = ConvertDatatableToModelList.ConvertDataTable<CityViewModel>(city);
         return lstCity;
     }
     throw new UserNotFoundException("User not found");
 }
Exemple #14
0
        public List <CityViewModel> GetCityList(string StateCode)
        {
            DataTable city = masterRepository.GetCities(StateCode);

            if (city.Rows.Count > 0)
            {
                List <CityViewModel> lstCity = new List <CityViewModel>();
                lstCity = ConvertDatatableToModelList.ConvertDataTable <CityViewModel>(city);
                return(lstCity);
            }
            throw new DataNotFound("Cities not found, please contact your tech deck.");
        }
        public List <CityViewModel> GetCityListByChar(string cityFirstChar)
        {
            DataTable city = _homeRepositories.GetCityListByChar(cityFirstChar);

            if (city.Rows.Count > 0)
            {
                List <CityViewModel> lstCity = new List <CityViewModel>();
                lstCity = ConvertDatatableToModelList.ConvertDataTable <CityViewModel>(city);
                return(lstCity);
            }
            throw new DataNotFound("City data not found");
        }
        public List <CityViewModel> GetCityList()
        {
            DataTable city = _masterRepository.GetAllCitiesWithoutState();

            if (city.Rows.Count > 0)
            {
                List <CityViewModel> lstCity = new List <CityViewModel>();
                lstCity = ConvertDatatableToModelList.ConvertDataTable <CityViewModel>(city);
                return(lstCity);
            }
            throw new UserNotFoundException("User not found");
        }
        public List <JobTitleViewModel> GetJobTitleById(int JobIndustrialArea)
        {
            DataTable jobTitle = masterDataRepository.GetJobTitlesById(JobIndustrialArea);
            List <JobTitleViewModel> lstJobTitle = new List <JobTitleViewModel>();

            if (jobTitle.Rows.Count > 0)
            {
                lstJobTitle = ConvertDatatableToModelList.ConvertDataTable <JobTitleViewModel>(jobTitle);
                return(lstJobTitle);
            }
            return(lstJobTitle);
        }
        public List <CityViewModel> GetCitiesWithJobSeekerInfo()
        {
            DataTable city = _homeRepositories.GetCitiesWithJobSeekerInfo();

            if (city.Rows.Count > 0)
            {
                List <CityViewModel> lstCity = new List <CityViewModel>();
                lstCity = ConvertDatatableToModelList.ConvertDataTable <CityViewModel>(city);
                return(lstCity);
            }
            throw new UserNotFoundException("User not found");
        }
        public List <StateViewModel> GetStateList(string CountryCode)
        {
            DataTable             state    = _masterDataRepository.GetStates(CountryCode);
            List <StateViewModel> lstState = new List <StateViewModel>();

            if (state.Rows.Count > 0)
            {
                lstState = ConvertDatatableToModelList.ConvertDataTable <StateViewModel>(state);
            }
            return(lstState);
            //throw new Exception("State not found");
        }
        public List <JobTitleViewModel> GetJobListByChar(string jobFirstChar)
        {
            List <JobTitleViewModel> jobslist = new List <JobTitleViewModel>();

            try
            {
                DataTable jobs = _homeRepositories.GetJobListByChar(jobFirstChar);
                if (jobs.Rows.Count > 0)
                {
                    jobslist = ConvertDatatableToModelList.ConvertDataTable <JobTitleViewModel>(jobs);
                }
                return(jobslist);
            }
            catch (DataNotFound ex)
            {
                throw new DataNotFound(ex.Message);
            }
        }
        public List <SearchJobListViewModel> SearchJobList(SearchJobViewModel searches, int UserId)
        {
            var sModel = new JobSearchModel
            {
                Skills        = searches.Skills,
                JobRole       = searches.JobTitle,
                City          = string.Join(Constants.CommaSeparator, searches.City),
                Experiance    = searches.Experiance,
                JobCategory   = string.Join(Constants.CommaSeparator, searches.JobCategory),
                CompanyUserId = string.Join(Constants.CommaSeparator, searches.CompanyUserId)
            };
            int       quarterStartMonth = Convert.ToInt32(ConfigurationHelper.Config.GetSection(Constants.JobPostingQuarterStartingMonthKey).Value);
            DataTable jobList           = _searchJobRepository.GetSearchJobList(sModel, UserId, quarterStartMonth);
            List <SearchJobListViewModel> lstJobList = new List <SearchJobListViewModel>();

            if (jobList.Rows.Count > 0)
            {
                lstJobList = ConvertDatatableToModelList.ConvertDataTable <SearchJobListViewModel>(jobList);
                var appliedJobs = homeHandler.GetAplliedJobs(UserId);
                for (int i = 0; i < lstJobList.Count; i++)
                {
                    //getting the all the jobs applied by user only if the user logged in
                    if (UserId != 0 && appliedJobs.Count > 0)
                    {
                        lstJobList[i].IsApplied = appliedJobs.Any(aj => aj == lstJobList[i].JobPostId);
                    }

                    //Handled if image url exist in db but not available physically
                    string picpath = System.IO.Path.GetFullPath(_hostingEnviroment.WebRootPath + lstJobList[i].CompanyLogo);
                    if (!System.IO.File.Exists(picpath))
                    {
                        string fName = $@"\ProfilePic\" + "Avatar_company.jpg";
                        lstJobList[i].CompanyLogo = fName;
                    }
                }
            }
            return(lstJobList);
        }
Exemple #22
0
        public UserDetail GetJobseekerDetail(int UserId)
        {
            DataTable  jobSeekerDetail   = _userProfileRepository.GetJobseekerData(UserId);
            DataTable  allcities         = _userProfileRepository.GetAllCities();
            DataTable  preferredlocation = _userProfileRepository.GetUserPreferredlocation(UserId);
            DataTable  ITSkills          = _userProfileRepository.GetUserITSkills(UserId);
            DataTable  ProfileScore      = _userProfileRepository.ProfileScore(UserId);
            UserDetail model             = new UserDetail();

            if (jobSeekerDetail.Rows.Count > 0)
            {
                model.PersonalDetails = new UserViewModel();
                ExperienceDetails[]  objExperience  = JsonConvert.DeserializeObject <ExperienceDetails[]>(jobSeekerDetail.Rows[0]["ExperienceDetails"].ToString());
                EducationalDetails[] objEducational = JsonConvert.DeserializeObject <EducationalDetails[]>(jobSeekerDetail.Rows[0]["EducationalDetails"].ToString());

                model.Cities   = ConvertDatatableToModelList.ConvertDataTable <CityViewModel>(allcities);
                model.ITSkills = ConvertDatatableToModelList.ConvertDataTable <ITSkills>(ITSkills);

                //Adding preferred location
                if (preferredlocation != null && preferredlocation.Rows.Count > 0)
                {
                    //checking if locationid is null then assign otherlocation
                    model.PersonalDetails.PreferredLocation1 = (preferredlocation.Rows[0]["LocationId"] as string) ?? preferredlocation.Rows[0]["OtherLocation"] as string;
                    model.PersonalDetails.PreferredLocation2 = (preferredlocation.Rows[1]["LocationId"] as string) ?? (preferredlocation.Rows[1]["OtherLocation"]) as string;
                    model.PersonalDetails.PreferredLocation3 = (preferredlocation.Rows[2]["LocationId"] as string) ?? (preferredlocation.Rows[2]["OtherLocation"]) as string;
                }

                //model.PersonalDetails.Preferredlocation = ConvertDatatableToModelList.ConvertDataTable<string>(preferredlocation);

                model.ExperienceDetails  = objExperience;
                model.EducationalDetails = objEducational;
                if (model.EducationalDetails != null)
                {
                    foreach (EducationalDetails edu in model.EducationalDetails)
                    {
                        if (edu.Course != null)
                        {
                            DataTable coursename = _masterRepository.GetCoursesById(Convert.ToInt32(edu.Course));
                            if (coursename != null)
                            {
                                edu.CourseName = Convert.ToString(coursename.Rows[0]["CourseName"]);
                            }
                        }
                    }
                }

                model.Skills = new Skills();
                if (!Convert.IsDBNull(jobSeekerDetail.Rows[0]["Skills"]))
                {
                    model.Skills = JsonConvert.DeserializeObject <Skills>(jobSeekerDetail.Rows[0]["Skills"].ToString());
                }
                model.PersonalDetails.DOB               = Convert.ToString(jobSeekerDetail.Rows[0]["DateOfBirth"]);
                model.PersonalDetails.ProfileSummary    = Convert.ToString(jobSeekerDetail.Rows[0]["ProfileSummary"]);
                model.PersonalDetails.ProfilePic        = Convert.ToString(jobSeekerDetail.Rows[0]["ProfilePic"]);
                model.PersonalDetails.CandidateId       = Convert.ToString(jobSeekerDetail.Rows[0]["CandidateId"]);
                model.PersonalDetails.JobTitleName      = Convert.ToString(jobSeekerDetail.Rows[0]["JobTitleName"]);
                model.PersonalDetails.FirstName         = Convert.ToString(jobSeekerDetail.Rows[0]["FirstName"]);
                model.PersonalDetails.LastName          = Convert.ToString(jobSeekerDetail.Rows[0]["LastName"]);
                model.PersonalDetails.MobileNo          = Convert.ToString(jobSeekerDetail.Rows[0]["MobileNo"]);
                model.PersonalDetails.Email             = Convert.ToString(jobSeekerDetail.Rows[0]["Email"]);
                model.PersonalDetails.MaritalStatus     = Convert.ToString(jobSeekerDetail.Rows[0]["MaritalStatus"]);
                model.PersonalDetails.MaritalStatusName = Convert.ToString(jobSeekerDetail.Rows[0]["MaritalStatusName"]);
                model.PersonalDetails.Address1          = Convert.ToString(jobSeekerDetail.Rows[0]["Address1"]);
                model.PersonalDetails.City              = Convert.ToString(jobSeekerDetail.Rows[0]["City"]);
                model.PersonalDetails.JobTitleId        = jobSeekerDetail.Rows[0]["JobTitleId"] as int? ?? 0;
                model.PersonalDetails.UserId            = UserId;
                model.PersonalDetails.Gender            = Convert.ToString(jobSeekerDetail.Rows[0]["Gender"]);
                model.PersonalDetails.Country           = Convert.ToString(jobSeekerDetail.Rows[0]["Country"]);
                model.PersonalDetails.State             = Convert.ToString(jobSeekerDetail.Rows[0]["State"]);
                model.PersonalDetails.Resume            = Convert.ToString(jobSeekerDetail.Rows[0]["Resume"]);
                model.PersonalDetails.LinkedinProfile   = Convert.ToString(jobSeekerDetail.Rows[0]["LinkedinProfile"] as string) ?? "";
                model.PersonalDetails.IsJobAlert        = Convert.ToBoolean(jobSeekerDetail.Rows[0]["IsJobAlert"]);
                //model.PersonalDetails.ProfileScore = ProfileScore;
                if (!Convert.IsDBNull(jobSeekerDetail.Rows[0]["TotalExperience"]))
                {
                    model.PersonalDetails.TotalExperience = Convert.ToDouble(jobSeekerDetail.Rows[0]["TotalExperience"]);
                }
                //Check if resume file exist on server
                string resumepath = Path.GetFullPath(_hostingEnviroment.WebRootPath + model.PersonalDetails.Resume);
                if (!File.Exists(resumepath))
                {
                    string fName = "";
                    model.PersonalDetails.Resume = fName;
                }

                if (ProfileScore != null && ProfileScore.Rows.Count > 0)
                {
                    model.PersonalDetails.ProfileScore = Convert.ToInt16(ProfileScore.Rows[0]["Total"]);
                }
                model.PersonalDetails.CTC                  = Convert.ToString(jobSeekerDetail.Rows[0]["CurrentSalary"]);
                model.PersonalDetails.ECTC                 = Convert.ToString(jobSeekerDetail.Rows[0]["ExpectedSalary"]);
                model.PersonalDetails.AboutMe              = Convert.ToString(jobSeekerDetail.Rows[0]["AboutMe"]);
                model.PersonalDetails.JobIndustryArea      = Convert.ToString(jobSeekerDetail.Rows[0]["JobIndustryAreaId"]);
                model.PersonalDetails.EmploymentStatus     = Convert.ToString(jobSeekerDetail.Rows[0]["EmploymentStatusId"]);
                model.PersonalDetails.EmploymentStatusName = Convert.ToString(jobSeekerDetail.Rows[0]["EmploymentStatusName"]);
            }
            return(model);
        }