示例#1
0
        private void BtnDelete_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("Are sure to delete this account?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (dr == DialogResult.Yes)
            {
                try
                {
                    JobRepo.DeleteFromJobSeekerJob(this.Id);

                    JobRepo.DeleteJob(this.Id);

                    CompanyRepo.DeleteCompany(this.Id);

                    MessageBox.Show("Company profile deleted!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
                this.BackHome();
                this.Dispose();
            }
            else
            {
                return;
            }
        }
示例#2
0
        private void PopulateDefaultDGV()
        {
            string sql = JobRepo.GetNewJobs();

            this.PopulateDGVJob(sql);
            this.PopulateDGVJobSeekers();
        }
示例#3
0
        private void BackHere()
        {
            string sql = JobRepo.GetAllJobOfCompany(this.Id);

            this.PopulateDGVPostedJobs(sql);
            this.Visible = true;
        }
示例#4
0
        public CompanyForm(Delegates.BackToHome backHome, DataSet ds)
        {
            InitializeComponent();
            this.BackHome = backHome;
            this.Ds       = ds;
            SetAll();
            string sql = JobRepo.GetAllJobOfCompany(this.Id);

            this.PopulateDGVPostedJobs(sql);
        }
示例#5
0
        public void BackHere()
        {
            this.PopulateDGVFeatueredCompany();
            string sql = JobRepo.GetDeadlineTodayJobs();

            this.PopulateDGVDeadlineToday(sql);
            sql = JobRepo.GetNewJobs();
            this.PopulateDGVNewJobs(sql);
            this.Visible = true;
        }
示例#6
0
        private void BtnSubmit_Click(object sender, EventArgs e)
        {
            string sql;

            this.Title       = this.txtTitle.Text;
            this.Type        = this.cmbType.Text;
            this.Category    = this.txtCategory.Text;
            this.Address     = this.txtAddress.Text;
            this.DeadLine    = this.dtpDeadline.Text;
            this.Description = this.txtDescription.Text;
            if (Validation.Text(this.Title, this.Type, this.Category, this.Description, this.txtVacancy.Text, this.txtSalary.Text, this.Address, this.DeadLine))
            {
                try
                {
                    string message;

                    if (Validation.IsNumber(this.txtVacancy.Text) && Validation.IsDouble(this.txtSalary.Text))
                    {
                        this.Vacancy = Convert.ToUInt16(this.txtVacancy.Text);
                        this.Salary  = Convert.ToDouble(this.txtSalary.Text);
                        if (this.Purpose == "addJob")
                        {
                            sql     = JobRepo.InsertJob(this.JobId.ToString(), this.Title, this.Type, this.Category, this.Description, this.Vacancy.ToString(), this.DeadLine, this.Address, this.Salary.ToString(), this.CompanyId);
                            message = "Job Published successfully";
                        }
                        else
                        {
                            sql     = JobRepo.UpdateJob(this.Title, this.Type, this.Category, this.Description, this.Vacancy.ToString(), this.DeadLine, this.Address, this.Salary.ToString(), this.JobId.ToString());
                            message = "Job updated successfully";
                        }
                        DataAccess.ExecuteUpdateQuery(sql);
                        MessageBox.Show(message, "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        this.BackToCompany();
                        this.Dispose();
                    }
                    else
                    {
                        MessageBox.Show("Vacancy or Salary Should be Digits", "Message!!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                MessageBox.Show("All fields are required to fillup", "Message!!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
示例#7
0
        private void BtnDelete_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("Are sure to delete this job circuler?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (dr == DialogResult.Yes)
            {
                try
                {
                    JobRepo.DeleteJob(this.JobId);
                    JobRepo.DeleteJobSeekerJob(this.JobId);
                    MessageBox.Show("Job Circuler deleted!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                this.BackToCompany();
                this.Dispose();
            }
            else
            {
                return;
            }
        }
示例#8
0
 private void TxtSearchJobAddress_TextChanged(object sender, EventArgs e)
 {
     this.Sql = JobRepo.SearchByAddress(this.txtSearchJobAddress.Text);
     this.PopulateDGVJob(this.Sql);
 }
示例#9
0
 private void TxtSearchCategory_TextChanged(object sender, EventArgs e)
 {
     this.Sql = JobRepo.SearchByCategory(this.txtSearchCategory.Text);
     this.PopulateDGVJob(this.Sql);
 }
示例#10
0
 private void TxtSearchJobtitle_TextChanged(object sender, EventArgs e)
 {
     this.Sql = JobRepo.SearchByTitle(this.txtSearchJobtitle.Text);
     this.PopulateDGVJob(this.Sql);
 }
示例#11
0
 private void BtnSearch_Click(object sender, EventArgs e)
 {
     this.Sql = JobRepo.SearchSpecificJob(this.txtSearchCategory.Text, this.txtSearchJobAddress.Text, this.txtSearchJobtitle.Text);
     this.PopulateDGVJob(this.Sql);
 }
示例#12
0
        private void TxtSearchPostedJobs_TextChanged(object sender, EventArgs e)
        {
            string sql = JobRepo.SearchByTitle(this.Id, this.txtSearchPostedJobs.Text);

            this.PopulateDGVPostedJobs(sql);
        }