/// <summary> /// New Item /// </summary> private void NewItemBorrowing() { frmEditBorrowing form = new frmEditBorrowing(); var res = form.ShowDialog(); // Show Edit form while (res == DialogResult.Yes) // If New item request { form.Dispose(); form = new frmEditBorrowing(); // New Form res = form.ShowDialog(); // Show new Edit form } UpdateBorrowingOLV(); // Update Borrowing OLV UpdateConOLV(); // Update Contact OLV }
/// <summary> /// Edit Item /// </summary> private void EditItemBorrowing() { if (olvBorrowing.SelectedIndex >= 0) // If selected Item { frmEditBorrowing form = new frmEditBorrowing(); // Show Edit form List <Guid> gList = new List <Guid>(); gList.Add(((Borrowing)olvBorrowing.SelectedObject).ID); var res = form.ShowDialog(gList); while (res == DialogResult.Yes) // If New item request { form.Dispose(); form = new frmEditBorrowing(); // New Form res = form.ShowDialog(); // Show new Edit form } UpdateBorrowingOLV(); // Update Borrowing OLV UpdateConOLV(); // Update Contact OLV } }