示例#1
0
 private void ButtonAddInventoryCode_Click(object sender, EventArgs e)
 {
     using (InventoryCodeControlForm inventoryCodeControl = new InventoryCodeControlForm())
     {
         inventoryCodeControl.AddNewBookExample += AddNewCodeToList;
         inventoryCodeControl.ShowDialog();
         Activate();
     }
 }
示例#2
0
        private void ButtonEditInventoryCode_Click(object sender, EventArgs e)
        {
            if (listBoxInventoryCodeNotAvailable.SelectedItem != null)
            {
                int currentCode = Convert.ToInt32(listBoxInventoryCodeNotAvailable.SelectedItem, CultureInfo.CurrentCulture);
                using (InventoryCodeControlForm inventoryCodeControl = new InventoryCodeControlForm(currentCode))
                {
                    inventoryCodeControl.AddNewBookExample  += AddNewCodeToList;
                    inventoryCodeControl.EditNewBookExample += RemoveCodeFromList;

                    inventoryCodeControl.ShowDialog();
                    Activate();
                }
            }
        }