private void BtnDeleteProfile_Click(object sender, EventArgs e) { DialogResult dr = MessageBox.Show("Are sure to delete this Profile?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dr == DialogResult.Yes) { try { JobSeekerRepo.DeleteJobseekerjob(this.Id); EducationalQualificationRepo.DeleteEducationInfo(this.Id); JobSeekerRepo.DeleteJobSeeker(this.Id); MessageBox.Show("Profile deleted!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Error); } this.BackHome(); this.Dispose(); } else { return; } }
private void BtnDeleteEducation_Click(object sender, EventArgs e) { DialogResult dr = MessageBox.Show("Are sure to delete this Education history?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dr == DialogResult.Yes) { try { EducationalQualificationRepo.DeleteEducationInfo(this.Id, this.lblDegree.Text); MessageBox.Show("Education info deleted!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Error); } this.pnlEducationalBacground.Visible = false; this.PopulateDataGridView(); } else { return; } }