Esempio n. 1
0
        private void buttonDeleteClient_Click(object sender, RoutedEventArgs e)
        {
            AgreeWindow agree = new AgreeWindow();

            if (agree.ShowDialog() == true)
            {
                var index = clientsGrid.SelectedIndex;
                clientsGrid.Items.RemoveAt(index);
            }
        }
Esempio n. 2
0
        private void deleteBtn_Click(object sender, RoutedEventArgs e)
        {
            AgreeWindow agree = new AgreeWindow();

            if (agree.ShowDialog() == true)
            {
                var index = ProductsGrid.SelectedIndex;
                _controller.DeleteProduct(_productInfoModels[index].Id);
                ProductsGrid.Items.RemoveAt(index);
            }
        }
Esempio n. 3
0
        private void buttonRemove_Click(object sender, RoutedEventArgs e)
        {
            AgreeWindow agree = new AgreeWindow();

            if (agree.ShowDialog() == true)
            {
                int index = gridOrders.SelectedIndex;
                gridOrders.Items.RemoveAt(index);

                int orderId = _ordersInfoModels[index].Id;

                _ordersInfoModels.RemoveAt(index);
                _controller.DeleteOrder(orderId);
            }
        }