private void btnAceptar_Click(object sender, EventArgs e) { if (!validaciones()) { return; } try { Producto prod = (Producto)productoBindingSource.Current; prod.Stock = Int32.Parse(waterMarkTextBox1.Text); if (MessageBox.Show("Esta seguro de querer agregar esta cantidad" + " [ " + prod.Stock + " ] " + " al stock de este producto" + " [ " + prod.Nombre + " ] " + "?", "Entrada de Producto", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK) { int cantidad = Convert.ToInt32(waterMarkTextBox1.Text) + Convert.ToInt32(label3.Text); DatosProducto.InsertarStock(((Producto)productoBindingSource.Current).IdProducto, cantidad); MessageBox.Show("El monto" + " [ " + prod.Stock + " ] " + " se aƱadio al stock con exito!!", "Confirmacion"); Actualizar(); this.Close(); } } catch { //DialogResult result = MessageBox.Show("Ingrese todos los campos, !Son Obligatorios!!", "Verificacion", MessageBoxButtons.RetryCancel, MessageBoxIcon.Asterisk); //if (result == DialogResult.Cancel) //{ // this.Close(); //} //else if (result == DialogResult.Retry) //{ // return; //} } }