Exemple #1
0
        /// <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
        }
Exemple #2
0
 /// <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
     }
 }