private void btnNuevoOrden_Click(object sender, EventArgs e) { if (dgvStock.SelectedRows.Count > 0) { C_Inicio.idit = Convert.ToInt32(dgvStock.CurrentRow.Cells[1].Value.ToString()); C_Inicio.prod = dgvStock.CurrentRow.Cells[2].Value.ToString(); C_Inicio.tipo = 1; //C_Inicio.cant = Convert.ToInt32(dgvStock.CurrentRow.Cells[3].Value.ToString()); C_Stock.can = Convert.ToInt32(dgvStock.CurrentRow.Cells[3].Value.ToString()); using (AddToCart m = new AddToCart()) { m.ShowDialog(); datostabla(""); datostabla1(""); } } else { MessageBox.Show("Seleccione la tabla que desea editar"); } }