Beispiel #1
0
        private void buttonAddProvider_Click(object sender, EventArgs e)
        {
            FormAddItem formAddItem = new FormAddItem()
            {
                Text = "Add new Provider"
            };

            if (formAddItem.ShowDialog() == DialogResult.OK)
            {
                _dm.Providers.Add(new Provider()
                {
                    Name = formAddItem.ItemName
                });
                _dm.SaveChanges();
                UpdateComboBoxProviders();
                UpdateListViewGoods();
            }
        }
Beispiel #2
0
        private void ButtonAddCategory_Click(object sender, EventArgs e)
        {
            FormAddItem formAddItem = new FormAddItem()
            {
                Text = "Add new Category"
            };

            if (formAddItem.ShowDialog() == DialogResult.OK)
            {
                _dm.Categories.Add(new Category()
                {
                    Name = formAddItem.ItemName
                });
                _dm.SaveChanges();
                UpdateComboBoxCategories();
                UpdateListViewGoods();
            }
        }