Пример #1
0
        private void btnShip_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedCells.Count > 0)
            {
                int selectedrowindex = dataGridView1.SelectedCells[0].RowIndex;

                DataGridViewRow selectedRow = dataGridView1.Rows[selectedrowindex];

                string id = Convert.ToString(selectedRow.Cells[0].Value);
                statusLbl.Text = balObj.ProcessRequest(Convert.ToInt32(id));
            }
        }
Пример #2
0
        private void btnShip_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedCells.Count > 0)
            {
                int selectedrowindex = dataGridView1.SelectedCells[0].RowIndex;

                DataGridViewRow selectedRow = dataGridView1.Rows[selectedrowindex];

                string id     = Convert.ToString(selectedRow.Cells[0].Value);
                string prodId = Convert.ToString(selectedRow.Cells[1].Value);
                int    qty    = Convert.ToInt32(selectedRow.Cells[4].Value);
                statusLbl.Text = balObj.ProcessRequest(Convert.ToInt32(id));

                MessageBox.Show(balObj.UpdateStockWithProduct(prodId, qty));
            }
        }