private void btnAceptar_Click(object sender, EventArgs e) { //Actualiza la cantidad del articulo en inventario IfrmAgregarEditarInventario FormInterface = this.Owner as IfrmAgregarEditarInventario; if (FormInterface != null) { Decimal Cantidad = Convert.ToDecimal(txtCantidad.Text); FormInterface.ModificarCantidad(InventarioID, Cantidad); FormInterface.Refrescar(); this.Close(); } }
private void btnSeleccionar_Click(object sender, EventArgs e) { //Llama al procedimiento en la interfase que adiciona un articulo a un combo IfrmAgregarEditarInventario FormInterface = this.Owner as IfrmAgregarEditarInventario; if (FormInterface != null) { FormInterface.AgregarArticulo(InventarioID); FormInterface.Refrescar(); } //Pregunta si desea agregar algun otro articulo al combo if (MessageBox.Show("Desea agregar otro articulo al combo", "Agregar otro articulo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { this.Close(); } }