private void btnSave_Click(object sender, EventArgs e) { if (IsCorrectEntries()) { int intResults = 0; using (clsEmployeeEducation ed = new clsEmployeeEducation()) { ed.Username = _strUsername; ed.EducationLevelCode = cmbLevel.SelectedValue.ToString(); ed.Course = txtCourse.Text; ed.SchoolName = txtSchoolName.Text; ed.SchoolAddress = txtSchoolAddress.Text; ed.InclusiveDates = txtInclusiveDates.Text; ed.Recognition = txtRecognition.Text; ed.Complete = (chkComplete.Checked ? "1" : "0"); intResults = ed.Add(); } if (intResults > 0) { _frmEmployeeDetails.LoadEducationList(); 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; clsEmployeeEducation ed = new clsEmployeeEducation(); ed.EducationCode = _strEducationCode; ed.EducationLevelCode = cmbLevel.SelectedValue.ToString(); ed.Course = txtCourse.Text; ed.InclusiveDates = txtInclusiveDates.Text; ed.Recognition = txtRecognition.Text; ed.SchoolName = txtSchoolName.Text; ed.SchoolAddress = txtSchoolAddress.Text; ed.Complete = (chkComplete.Checked ? "1" : "0"); intResults = ed.Edit(); if (intResults > 0) { _frmEmployeeDetails.LoadEducationList(); Close(); } } }