Example #1
0
        private void DeleteProductManagmentButton_Click(object sender, EventArgs e)
        {
            var selectedRows = ProductManagmentGridView.SelectedRows;

            try
            {
                using (WarehouseServiceClient client = new WarehouseServiceClient("HTTP"))
                {
                    foreach (var elem in selectedRows)
                    {
                        client.DeleteItem(Convert.ToInt32(((DataGridViewRow)elem).Cells[0].Value));
                    }
                }
                if (statusFilterProductId != 0)
                {
                    ProductManagmentIntoGridView(true, 0, 0, statusFilterProductId);
                }
                else
                {
                    ProductManagmentIntoGridView(true, 0, 0, 0);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }