Exemple #1
0
        private void RegistrarProducto_Venta()
        {
            ProductoVentaController productoVentaController = new ProductoVentaController();
            bool requiereReceta = false;

            if (cb_RequiereReceta.IsChecked.Value)
            {
                requiereReceta = true;
            }

            if (productoVentaController.crearProducto(txb_Nombre.Text, txb_Codigo.Text, txb_Descripcion.Text, float.Parse(txb_Preciounitario.Text),
                                                      txb_Restricción.Text, txb_UnidadMedida.Text, float.Parse(txb_PrecioVenta.Text), requiereReceta, "url de la foto", txb_Ubicacion.Text,
                                                      Convert.ToInt32(txb_Cantidad.Text), dtp_Caducidad.SelectedDate.Value.ToString("yyyy/MM/dd"), "Example") == BusinessLogic.ResultadoOperacionEnum.ResultadoOperacion.Exito)
            {
                MessageBox.Show("Producto registrado con éxito");
                this.Close();
            }
            else
            {
                MessageBox.Show("ocurrió un error");
            }
        }