Beispiel #1
0
        private void AddItem_Click(object sender, EventArgs e)
        {
            AddItem      addNewItem = new AddItem();
            DialogResult result     = addNewItem.ShowDialog();

            if (result == DialogResult.OK)
            {
                GetItemInfo();
                itemsListBox.SelectedItem = addNewItem.itemName;
            }
            else if (result == DialogResult.Cancel)
            {
                GetItemInfo();
            }
        }
Beispiel #2
0
        private void BtnAddItem_Click(object sender, EventArgs e)
        {
            AddItem      addNewItem = new AddItem();
            DialogResult result     = addNewItem.ShowDialog();

            if (result == DialogResult.OK)
            {
                GetItemList();
                cmboBodyDoors.Text = addNewItem.itemName;
            }
            else if (result == DialogResult.Cancel)
            {
                GetItemList();
                cmboBodyDoors.SelectedIndex = -1;
            }
        }