/// <summary> /// Handles the Click event of the btnNewStaff control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void btnNewStaff_Click(object sender, EventArgs e) { StaffForm staffForm = new StaffForm(); ((IDialogForm)staffForm).RegisterCaller(this); staffForm.ShowDialog(); }
/// <summary> /// Shows the staff add edit form. /// </summary> /// <param name="rowIndex">Index of the row.</param> private void ShowStaffAddEditForm(int rowIndex) { if (rowIndex > -1) { int staffId = Convert.ToInt32(dgStaffList.Rows[rowIndex].Cells[COLUMN_INDEX_STAFFID].Value); StaffForm staffForm = new StaffForm(); ((IDialogForm)staffForm).RegisterCaller(this); staffForm.StaffId = staffId; staffForm.ShowDialog(); } }