public bool DeleteAJobByRecuiter(int jobId)
        {
            var dt = new DaoJobs();

            if (dt.DeleteAJobByRecuiter(jobId) > 0)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
    public void LoadDatas()
    {
        var       dao       = new DaoJobs();
        DataTable dataTable = dao.GetJobsByAdmin();

        if (dataTable == null || dataTable.Rows.Count <= 0)
        {
            return;
        }
        BindRepeater(rptAccounts, dataTable);
    }
Exemplo n.º 3
0
        private bool SaveJobInfoUpdate()
        {
            var dao  = new DaoJobs();
            var temp = dao.UpdateAJobInfo(JobTitle, Convert.ToInt32(Certificate.CertificateId),
                                          Convert.ToInt32(JobSalaryLevel.JobSalaryLevelId),
                                          Convert.ToInt32(Province.Id), Convert.ToInt32(JobIndustries.JobIndutriesId), ContentDetail, Description,
                                          ExpiredDate, Convert.ToInt32(JobPosition.JobPositionId), Convert.ToInt32(ExperienceLevel.ExperianceLevelId),
                                          Convert.ToInt32(WorkType.WorkTypeId), Convert.ToInt32(Recruitor.RecruitorId), Convert.ToInt32(NumsApplicant), Convert.ToInt32(JobId));

            if (temp > 0)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 4
0
        public void SetFullJobInfo()
        {
            var       dao       = new DaoJobs();
            DataTable infoTable = dao.GetFullJobInforById(Convert.ToInt32(JobId));

            ContentDetail   = infoTable.Rows[0]["ContentDetail"].ToString();
            Description     = infoTable.Rows[0]["Description"].ToString();
            JobTitle        = infoTable.Rows[0]["FullTitle"].ToString();
            NumsApplicant   = infoTable.Rows[0]["NumsApplicant"].ToString();
            ExpiredDate     = Convert.ToDateTime(infoTable.Rows[0]["ExpiredDate"]);
            JobSalaryLevel  = new JobSalaryLevel(infoTable.Rows[0]["SalaryLevelID"].ToString(), infoTable.Rows[0]["SalaryLevel"].ToString());
            JobIndustries   = new JobIndustries(infoTable.Rows[0]["JobIndustryID"].ToString(), infoTable.Rows[0]["JobIndustryName"].ToString());
            Province        = new Province(infoTable.Rows[0]["ProvinceID"].ToString(), infoTable.Rows[0]["ProvinceName"].ToString());
            JobPosition     = new JobPosition(infoTable.Rows[0]["JobPositionID"].ToString(), infoTable.Rows[0]["JobPositionName"].ToString());
            JobIndustries   = new JobIndustries(infoTable.Rows[0]["JobIndustryID"].ToString(), infoTable.Rows[0]["JobIndustryName"].ToString());
            WorkType        = new WorkType(infoTable.Rows[0]["WorkTypeID"].ToString(), infoTable.Rows[0]["WorkTypeName"].ToString());
            Certificate     = new Certificate(infoTable.Rows[0]["CertificateID"].ToString(), infoTable.Rows[0]["CertificateName"].ToString());
            ExperienceLevel = new ExperienceLevel(infoTable.Rows[0]["ExperienceLevelID"].ToString(), infoTable.Rows[0]["ExperienceLevelName"].ToString());
            RewriteUrl      = infoTable.Rows[0]["RewriteUrl"].ToString();
            var companySize = new CompanySize(infoTable.Rows[0]["CompanySizeID"].ToString(), infoTable.Rows[0]["CompanySize"].ToString());

            Recruitor = new Recruitor(infoTable.Rows[0]["CompanyFullName"].ToString(), infoTable.Rows[0]["RecruitorName"].ToString(), companySize, infoTable.Rows[0]["Address"].ToString());
        }
Exemplo n.º 5
0
        protected bool UpdateJobsUnHotByAdmin(int jobId)
        {
            var dt = new DaoJobs();

            return(dt.UpdateJobsUnHotByAdmin(jobId) > 0);
        }
Exemplo n.º 6
0
        protected bool DeleteJobsByAdmin(int jobId)
        {
            var dt = new DaoJobs();

            return(dt.DeleteJobsByAdmin(jobId) > 0);
        }
Exemplo n.º 7
0
        protected DataTable GetAllSavedJobs(int userId)
        {
            var dao = new DaoJobs();

            return(dao.GetAllSavedJobss(userId));
        }
Exemplo n.º 8
0
        public bool DeleteAnAppliedJob(int jobId)
        {
            var dt = new DaoJobs();

            return(dt.DeleteAnAppliedJob(jobId) > 0);
        }
Exemplo n.º 9
0
        protected bool ApplyJobs(int userId, int jobId, int resumeId)
        {
            var dao = new DaoJobs();

            return(dao.SetJobAppliedByUser(userId, jobId, resumeId) > 0);
        }
Exemplo n.º 10
0
        protected bool SaveJobs(int userId, int jobId)
        {
            var dao = new DaoJobs();

            return(dao.SetJobSavedByUser(userId, jobId) > 0);
        }
Exemplo n.º 11
0
        public List <Jobs> JobRanking(int userId)
        {
            try
            {
                var       dao          = new DaoJobs();
                DataTable tableData    = dao.GetAllJobs(userId);
                var       listRankJobs = new List <Jobs>();
                if (tableData != null && tableData.Rows.Count > 0)
                {
                    foreach (DataRow dataRow in tableData.Rows)
                    {
                        int rank = 1;
                        rank += Province.Id == dataRow["ProvinceID"].ToString() ? 3 : 0;
                        rank += JobPosition.JobPositionId == dataRow["JobPositionID"].ToString() ? 1 : 0;
                        rank += JobSalaryLevel.JobSalaryLevelId == dataRow["SalaryLevelID"].ToString() ? 1 : 0;
                        rank += WorkType.WorkTypeId == dataRow["WorkTypeID"].ToString() ? 1 : 0;
                        rank += JobIndustries.JobIndutriesId == dataRow["JobIndustryID"].ToString() ? 1 : 0;
                        rank += ExperienceLevel.ExperianceLevelId == dataRow["ExperienceLevelID"].ToString() ? 1 : 0;
                        rank += Certificate.CertificateId == dataRow["CertificateID"].ToString() ? 1 : 0;
                        switch (LangSkill.SillId)
                        {
                        case "1":
                        case "2":
                            rank += 0;
                            break;

                        case "3":
                            rank += 1;
                            break;

                        case "4":
                        case "7":
                        case "8":
                        case "9":
                        case "10":
                            rank += 2;
                            break;

                        case "5":
                        case "6":
                            rank += 3;
                            break;

                        case "11":
                            rank -= 2;
                            break;

                        default: break;
                        }
                        var job = new Jobs(dataRow["JobID"].ToString(), rank);
                        job.SetFullJobInfo();
                        listRankJobs.Add(job);
                    }
                }
                return(listRankJobs);
            }
            catch (Exception exception)
            {
                Console.Write(exception);
                return(null);
            }
        }
Exemplo n.º 12
0
        protected DataTable GetJobs(string certificateId, string jobSalaryLevelId, string provinceId, string jobIndutriesId, string jobPositionId, string experienceLevelId, string workTypeId, string recruiterId)
        {
            var dao = new DaoJobs();

            return(dao.FilterJobs(certificateId, jobSalaryLevelId, provinceId, jobIndutriesId, jobPositionId, experienceLevelId, workTypeId, recruiterId));
        }
Exemplo n.º 13
0
        protected DataTable GetAllJobsByRecruiter(string recruiterId)
        {
            var dao = new DaoJobs();

            return(dao.GetAllJobsByRecruiter(Convert.ToInt32(recruiterId)));
        }
Exemplo n.º 14
0
        public DataTable GetFullJobInforById(int jobid)
        {
            var dao = new DaoJobs();

            return(dao.GetFullJobInforById(jobid));
        }