Esempio n. 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;
            }
        }
Esempio n. 2
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;
            }
        }