示例#1
0
        /// <summary>
        /// New Item
        /// </summary>
        private void NewItemLending()
        {
            frmEditLending form = new frmEditLending();
            var            res  = form.ShowDialog();        // Show Edit form

            while (res == DialogResult.Yes)                 // If New item request
            {
                form.Dispose();
                form = new frmEditLending();                // New Form
                res  = form.ShowDialog();                   // Show new Edit form
            }
            UpdateLendingOLV();                             // Update Lending OLV
            UpdateConOLV();                                 // Update Contact OLV
            UpdateAllItemsOLV();
        }
示例#2
0
 /// <summary>
 /// Edit Item
 /// </summary>
 private void EditItemLending()
 {
     if (olvLending.SelectedIndex >= 0)               // If selected Item
     {
         frmEditLending form  = new frmEditLending(); // Show Edit form
         List <Guid>    gList = new List <Guid>();
         gList.Add(((Lending)olvLending.SelectedObject).ID);
         var res = form.ShowDialog(gList);
         while (res == DialogResult.Yes)                 // If New item request
         {
             form.Dispose();
             form = new frmEditLending();              // New Form
             res  = form.ShowDialog();                 // Show new Edit form
         }
         UpdateLendingOLV();                           // Update Lending OLV
         UpdateConOLV();                               // Update Contact OLV
         UpdateAllItemsOLV();
     }
 }