private void btnSave_Click(object sender, EventArgs e) { if (IsCorrectEntries()) { int intResults = 0; using (clsEmployeeQualification eq = new clsEmployeeQualification()) { eq.Username = _strUsername; eq.Qualification = txtQualification.Text; eq.InclusiveDates = txtInclusiveDates.Text; eq.Remarks = txtRemarks.Text; intResults = eq.Add(); } if (intResults > 0) { _frmEmployeeDetails.LoadQualificationList(); if (MessageBox.Show(clsMessageBox.MessageBoxSuccessAddAskNew, clsMessageBox.MessageBoxText, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { ClearFields(); } else { this.Close(); } } } }
private void btnSave_Click(object sender, EventArgs e) { if (IsCorrectEntries()) { int intResults = 0; clsEmployeeQualification eq = new clsEmployeeQualification(); eq.QualificationCode = _strQualificationCode; eq.Qualification = txtQualification.Text; eq.InclusiveDates = txtInclusiveDates.Text; eq.Remarks = txtRemarks.Text; intResults = eq.Edit(); if (intResults > 0) { _frmEmployeeDetails.LoadQualificationList(); this.Close(); } } }