private void sbtnCVNew_Click(object sender, System.EventArgs e) { ACMS.frmNewCV myfrmNewCV = new frmNewCV(oUser.NEmployeeID(), -1, terminalUser.Branch.Id); if (DialogResult.OK == myfrmNewCV.ShowDialog()) { ListCV(); } myfrmNewCV.Dispose(); }
private void sbtnCVEdit_Click(object sender, System.EventArgs e) { int focusIndex = gvCV.FocusedRowHandle; if (focusIndex >= 0) { DataRow row = gvCV.GetDataRow(focusIndex); if (Convert.ToInt32(row["nSubmittedByID"]) == employee.Id) { int nCaseID = (int)row["nCaseID"]; ACMS.frmNewCV myfrmNewCV = new frmNewCV(oUser.NEmployeeID(), nCaseID, terminalUser.Branch.Id); if (DialogResult.OK == myfrmNewCV.ShowDialog()) ListCV(); myfrmNewCV.Dispose(); } else { UI.ShowMessage(this, "You don't have right to perform this action."); } } else { UI.ShowErrorMessage(this, "Please select a record first.", "Error"); } }