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; } }
internal void PopulateDataGridView() { string sql = EducationalQualificationRepo.GetAll(this.Id); this.PopulateDGVDegree(sql); }
private void BtnSave_Click(object sender, EventArgs e) { //List<string> list = new List<string>(); string sql; this.Degree = this.txtDegree.Text; this.Major = this.txtMajor.Text; this.PassingYear = this.dtpPassingYear.Text; this.Institute = this.txtInstituteName.Text; this.Board = this.cmbBoard.Text; if (Validation.Text(this.Degree, this.Major, this.PassingYear, this.Institute, this.Board, this.txtCgpa.Text)) { GPAorCGPA gpaOrCgpa; if (this.cmbGPAorCGPA.Text == "GPA") { gpaOrCgpa = Validation.ValidGpa; } else if (this.cmbGPAorCGPA.Text == "CGPA") { gpaOrCgpa = Validation.ValidCgpa; } else { MessageBox.Show("Please select GPA or CGPA", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (gpaOrCgpa(this.txtCgpa.Text)) { this.Cgpa = Convert.ToDouble(this.txtCgpa.Text); if (OldDegree == null) { try { EducationalQualificationRepo.InsertEducationInfo(this.Degree, this.Major, this.dtpPassingYear.Value.ToString(), this.Institute, this.Cgpa.ToString(), this.Board, this.JobSeekerId); MessageBox.Show("Eduacational Background Added!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { try { EducationalQualificationRepo.UpdateEducationInfo(this.Degree, this.Major, this.dtpPassingYear.Value.ToString(), this.Institute, this.Cgpa.ToString(), this.Board, this.JobSeekerId, this.OldDegree); MessageBox.Show("Eduacational Background updated!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Error); } } if (this.BackPage == "SignUp") { this.SUF.Visible = true; } else { this.BackToJobSeeker(); } this.Dispose(); } else { MessageBox.Show("CGPA Scale is 4.00 and GPA Scale is 5.00!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } else { MessageBox.Show("All fields are required to fill!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }