示例#1
0
        private void Button_Add_Click(object sender, EventArgs e)
        {
            PurchaseSetup purchaseSetup = new PurchaseSetup(ColumnWidthSetting);

            purchaseSetup.ShowDialog();
            Order = purchaseSetup.Order;

            if (Order == null)
            {
                return;
            }

            orders.Add(Order);

            listView_Purchase.Items.Clear();

            CreateItemsForListView();
        }
示例#2
0
        private void Button_Change_Click(object sender, EventArgs e)
        {
            if (listView_Purchase.SelectedItems.Count == 0)
            {
                MessageBox.Show("Выберете закупку", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            Order = (Order)listView_Purchase.SelectedItems[0].Tag;
            PurchaseSetup purchaseSetup = new PurchaseSetup(Order, ColumnWidthSetting);

            purchaseSetup.ShowDialog();
            Order = purchaseSetup.Order;

            Replacement();

            listView_Purchase.Items.Clear();

            CreateItemsForListView();
        }