/// <summary> /// New Item /// </summary> private void NewItemBoard() { frmEditBoardGames form = new frmEditBoardGames(); var res = form.ShowDialog(); // Show Edit form while (res == DialogResult.Yes) // If New item request { form.Dispose(); form = new frmEditBoardGames(); // New Form res = form.ShowDialog(); // Show new Edit form } UpdateBoardOLV(); // Update Items OLV UpdateCopOLV(); // Update Copies OLV }
/// <summary> /// Edit Item /// </summary> private void EditItemBoard() { if (olvBoard.SelectedIndex >= 0) // If selected Item { frmEditBoardGames form = new frmEditBoardGames(); // Show Edit form var res = form.ShowDialog(((Boardgames)olvBoard.SelectedObject).ID); while (res == DialogResult.Yes) // If New item request { form.Dispose(); form = new frmEditBoardGames(); // New Form res = form.ShowDialog(); // Show new Edit form } UpdateBoardOLV(); // Update Items OLV UpdateCopOLV(); // Update Copies OLV } }