/// <summary> /// New Item /// </summary> private void NewItemItems() { frmEditItem form = new frmEditItem(); var res = form.ShowDialog(); // Show Edit form while (res == DialogResult.Yes) // If New item request { form.Dispose(); form = new frmEditItem(); // New Form res = form.ShowDialog(); // Show new Edit form } UpdateItemsOLV(); // Update Items OLV UpdateCopOLV(); // Update Copies OLV }
/// <summary> /// Edit Item /// </summary> private void EditItemItems() { if (olvItem.SelectedIndex >= 0) // If selected Item { frmEditItem form = new frmEditItem(); // Show Edit form var res = form.ShowDialog(((Items)olvItem.SelectedObject).ID); while (res == DialogResult.Yes) // If New item request { form.Dispose(); form = new frmEditItem(); // New Form res = form.ShowDialog(); // Show new Edit form } UpdateItemsOLV(); // Update Items OLV UpdateCopOLV(); // Update Copies OLV } }