Exemplo n.º 1
0
        //Context menu (delete) on clik order
        private void onContextDeleteClick(object o, EventArgs ea)
        {
            DialogResult result = MessageBox.Show("Видалити? \nВи впевнені?", "Confirmation", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                if (dataGridViewOrders.SelectedRows.Count > 0)
                {
                    // Delete for Id - ((int)dataGridViewOrders.SelectedRows[0].Tag)
                    homeBugaltery.deleteOrder((int)dataGridViewOrders.SelectedRows[0].Tag);
                }
            }
            else if (result == DialogResult.No)
            {
                return;
            }

            updateOrdersGrid();
        }
Exemplo n.º 2
0
        private void MenuItemRemoveOrder_Click(object sender, RoutedEventArgs e)
        {
            homeBugaltery.deleteOrder(GetOrderViewFromSender(sender).Id);

            UpdateAll();
        }
Exemplo n.º 3
0
        private void ButtonRemove_Click(object sender, RoutedEventArgs e)
        {
            hb.deleteOrder(ordersViews[ListViewOrders.SelectedIndex].Id);

            UpdateAll();
        }