Пример #1
0
        private void HandleAddItem()
        {
            ItemDialog dialog = new ItemDialog();

            dialog.Item = CreateItem();
            dialog.ShowDialog();

            database.Add(dialog.Item);
        }
Пример #2
0
        private void HandleModifyItem()
        {
            if (itemListView.SelectedItems.Count <= 0)
            {
                return;
            }

            ItemDialog dialog = new ItemDialog();

            dialog.Item = itemListView.SelectedItems[0].Tag;
            dialog.ShowDialog();

            database.Modify(dialog.Item);
        }