Exemplo n.º 1
0
        private void Dtg_bebestible_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                var item = dtg_bebestible.SelectedItem as DataRowView;

                if (item != null)
                {
                    string        Orden = item.Row[0].ToString();
                    string        bebes = item.Row[2].ToString();
                    BebestibleBLL bb    = new BebestibleBLL();


                    int idb = bb.Get_bebyid(bebes);
                    int ido = Int32.Parse(Orden);
                    bb.Alter_bebestible_Despachado(ido, idb);
                }
                else
                {
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("" + ex);
            }
        }
Exemplo n.º 2
0
        private void txt_buscar_bebi_PreviewTextInput(object sender, TextCompositionEventArgs e)

        {
            int tamanio = txt_buscar_bebi.Text.Length;
            int ascii   = Convert.ToInt32(Convert.ToChar(e.Text));

            if (ascii >= 65 && ascii <= 90 || ascii >= 97 && ascii <= 122)
            {
                if (tamanio < 100)
                {
                    e.Handled = false;
                }
                else
                {
                    e.Handled = true;
                }
            }
            else
            {
                e.Handled = true;
            }
            {
                BebestibleBLL         ib         = new BebestibleBLL();
                string                nombre_beb = txt_buscar_bebi.Text;
                System.Data.DataTable dt         = ib.NombreBebestibleList(nombre_beb);
                dtg_ingredientes.ItemsSource = dt.DefaultView;
            }
        }
Exemplo n.º 3
0
        private void rbt_bebi_Checked(object sender, RoutedEventArgs e)
        {
            txt_id_alimento.Visibility         = Visibility.Hidden;
            txt_nombre_ali.Visibility          = Visibility.Hidden;
            txt_stock_ali.Visibility           = Visibility.Hidden;
            txt_stock_coci_alimento.Visibility = Visibility.Hidden;
            txt_proveedor.Visibility           = Visibility.Hidden;
            cmb_habili_ing.Visibility          = Visibility.Hidden;

            Buscar_ID.Visibility = Visibility.Visible;
            dtg_modi.Visibility  = Visibility.Visible;

            lbl_iding.Visibility               = Visibility.Hidden;
            lbl_insumo_alimento.Visibility     = Visibility.Hidden;
            lbl_stock_alimento.Visibility      = Visibility.Hidden;
            lbl_stock_coci_alimento.Visibility = Visibility.Hidden;
            lbl_alimento.Visibility            = Visibility.Hidden;
            lbl_habili_ing.Visibility          = Visibility.Hidden;

            lbl_idbebi.Visibility          = Visibility.Visible;
            lbl_insumo_bebi.Visibility     = Visibility.Visible;
            lbl_stock_bebi.Visibility      = Visibility.Visible;
            lbl_stock_coci_bebi.Visibility = Visibility.Visible;
            lbl_marca_bebi.Visibility      = Visibility.Visible;
            lbl_precio_bebi.Visibility     = Visibility.Visible;
            lbl_habili_bebi.Visibility     = Visibility.Visible;
            lbl_conpre_bebi.Visibility     = Visibility.Visible;

            txt_id_bebida.Visibility      = Visibility.Visible;
            txt_nombre_bebi.Visibility    = Visibility.Visible;
            txt_stock_bebi.Visibility     = Visibility.Visible;
            txt_stock_bar_bebi.Visibility = Visibility.Visible;
            txt_marca_bebi.Visibility     = Visibility.Visible;
            txt_precio_bebi.Visibility    = Visibility.Visible;
            cmb_habili_bebi.Visibility    = Visibility.Visible;
            cmb_conpre_bebi.Visibility    = Visibility.Visible;

            Modificar_id.IsEnabled = true;

            lbl1.Content = "";
            lbl2.Content = "";
            lbl3.Content = "";
            lbl4.Content = "";
            lbl5.Content = "";
            lbl6.Content = "";

            txt_id_alimento.Clear();
            txt_nombre_ali.Clear();
            txt_stock_ali.Clear();
            txt_stock_coci_alimento.Clear();
            txt_proveedor.SelectedIndex  = -1;
            cmb_habili_ing.SelectedIndex = -1;

            BebestibleBLL ib = new BebestibleBLL();

            System.Data.DataTable dt = ib.Allbebestible();
            dtg_modi.ItemsSource = dt.DefaultView;
        }
Exemplo n.º 4
0
        private void rbt_bebi_Checked(object sender, RoutedEventArgs e)
        {
            BebestibleBLL ib = new BebestibleBLL();

            System.Data.DataTable dt = ib.Allbebestible();
            dtg_eli.ItemsSource        = dt.DefaultView;
            txt_id_eli_ing.Visibility  = Visibility.Hidden;
            txt_id_eli_bebi.Visibility = Visibility.Visible;
            txt_id_eli_bebi.IsEnabled  = true;
        }
Exemplo n.º 5
0
        private void Banner_Loaded_1(object sender, RoutedEventArgs e)
        {
            oDispatcherTimer.Interval = new TimeSpan(0, 0, 3);
            oDispatcherTimer.Tick    += (a, b) =>
            {
                BebestibleBLL         bebBLL = new BebestibleBLL();
                System.Data.DataTable dt     = bebBLL.getbeb_garzon();
                dtg_bebestible.ItemsSource = dt.DefaultView;

                PlatoBLL plaBLL           = new PlatoBLL();
                System.Data.DataTable dta = plaBLL.Getplato_garzon();
                dtg_plato.ItemsSource = dta.DefaultView;
            };
        }
Exemplo n.º 6
0
 private void btn_listar_ingrediente_Click(object sender, RoutedEventArgs e)
 {
     if (rbt_ing.IsChecked == true)
     {
         IngredienteBLL        ib = new IngredienteBLL();
         System.Data.DataTable dt = ib.AllingredientesList();
         dtg_ingredientes.ItemsSource = dt.DefaultView;
     }
     else if (rbt_bebi.IsChecked == true)
     {
         BebestibleBLL         ib = new BebestibleBLL();
         System.Data.DataTable dt = ib.Allbebestible();
         dtg_ingredientes.ItemsSource = dt.DefaultView;
     }
 }
Exemplo n.º 7
0
        private void banner_Loaded(object sender, RoutedEventArgs e)
        {
            oDispatcherTimer.Interval = new TimeSpan(0, 0, 5);
            oDispatcherTimer.Tick    += (a, b) =>
            {
                BebestibleBLL         espBLL = new BebestibleBLL();
                System.Data.DataTable dt     = espBLL.getbeborden_espera();
                dtg_espera.ItemsSource = dt.DefaultView;

                BebestibleBLL         prepBLL = new BebestibleBLL();
                System.Data.DataTable dta     = prepBLL.getbeborden_preparacion();
                dtg_preparacion.ItemsSource = dta.DefaultView;

                BebestibleBLL         lisBLL = new BebestibleBLL();
                System.Data.DataTable dtg    = lisBLL.getbeborden_listo();
                dtg_listo.ItemsSource = dtg.DefaultView;
            };
        }
        private void Btn_anular_Click(object sender, RoutedEventArgs e)
        {
            PedidoBLL      pb = new PedidoBLL();
            IngredienteBLL ib = new IngredienteBLL();
            BebestibleBLL  bb = new BebestibleBLL();
            DataTable      dt = new DataTable();

            int id_pe = Int32.Parse(txt_id_pedido.Text);

            string tipo     = pb.Get_tipo_pedido(id_pe);
            string ni       = txt_nombreInsumo.Text;
            int    idinsumo = -1;

            if (tipo == "Pedido de ingredientes")
            {
                idinsumo = ib.Get_idbynom(ni);
            }
            else if (tipo == "Pedido de bebestibles")
            {
                idinsumo = bb.Get_bebyid(ni);
            }
            pb.Anularpedido(id_pe, idinsumo);
            txt_id_pedido.Text          = "";
            txt_cant.Text               = "";
            txt_monto.Text              = "";
            txt_nombreInsumo.Text       = "";
            txt_stockcocina_bar.Text    = "";
            txt_stock_bodega.Text       = "";
            txt_stock_critico.Text      = "";
            txt_stock_total.Text        = "";
            cbb_proveedor.SelectedIndex = -1;

            if (tipo == "Pedido de bebestibles")
            {
                dt = pb.Get_detaPediById_bebestible(id_pe);
                dtg_detalle.ItemsSource = dt.DefaultView;
            }
            else if (tipo == "Pedido de ingredientes")
            {
                dt = pb.Get_detPediById_ingredientes(id_pe);
                dtg_detalle.ItemsSource = dt.DefaultView;
            }
        }
Exemplo n.º 9
0
        private void Btn_Confirmar_Click(object sender, RoutedEventArgs e)
        {
            BebestibleBLL  us  = new BebestibleBLL();
            IngredienteBLL ig  = new IngredienteBLL();
            string         act = ACCION.Content.ToString();

            if (act == "Modificarbebi")
            {
                int id = Int32.Parse(lb_rut.Content.ToString());
                lb_titulo.VerticalAlignment = VerticalAlignment.Center;
                us.id_bebestible            = id;
                us.Alterinhabilitado(us);
                Close();
            }
            else if (act == "Modificaring")
            {
                int id = Int32.Parse(lb_rut.Content.ToString());
                lb_titulo.VerticalAlignment = VerticalAlignment.Center;
                ig.id_ingrediente           = id;
                ig.Alterinhabilitadoing(ig);
                Close();
            }
        }
Exemplo n.º 10
0
        private void btn_crear_Click(object sender, RoutedEventArgs e)
        {
            bool txtcampo1 = true;
            bool txtcampo2 = true;
            bool txtcampo3 = true;
            bool txtcampo4 = true;
            bool txtcampo5 = true;
            bool txtcampo6 = true;
            bool txtcampo7 = true;
            bool critico   = true;

            if (rbt_alimentos.IsChecked == true)
            {
                if (txt_insumo_alimento.Text.Trim() == "" && txt_insumo_bebi.Text.Trim() == "")
                {
                    txtcampo1    = false;
                    lbl1.Content = "Debe Completar el campo";
                }

                if (txt_stock_alimento.Text.Trim() == "" && txt_stock_bebi.Text.Trim() == "")
                {
                    txtcampo2    = false;
                    lbl2.Content = "Debe Completar el campo";
                }

                if (txt_stock_coci_alimento.Text.Trim() == "" && txt_stock_coci_bebi.Text.Trim() == "")
                {
                    txtcampo3    = false;
                    lbl3.Content = "Debe Completar el campo";
                }

                if (cmb_proveedor.Text.Trim() == "" && txt_marca_bebi.Text.Trim() == "")
                {
                    txtcampo4    = false;
                    lbl4.Content = "Debe Completar el campo";
                }

                if (txt_precio_bebi.Text.Trim() == "" && txt_habili_ingre.Text.Trim() == "")
                {
                    txtcampo5    = false;
                    lbl5.Content = "Debe Completar el campo";
                }

                if (txt_stock_critico.Text == "")
                {
                    critico     = false;
                    lb8.Content = "Debe Completar el campo";
                }

                if (txtcampo1 && txtcampo2 && txtcampo3 && txtcampo4 && txtcampo5 && critico)

                {
                    IngredienteBLL ib = new IngredienteBLL();
                    ib.nombre_ingrediente = txt_insumo_alimento.Text;
                    ib.proveedor          = cmb_proveedor.Text;
                    ib.habilitado         = txt_habili_ingre.Text;
                    ib.stock         = Int32.Parse(txt_stock_alimento.Text);
                    ib.stock_cocina  = Int32.Parse(txt_stock_coci_alimento.Text);
                    ib.stock_critico = Int32.Parse(txt_stock_critico.Text);
                    bool estado = ib.AddIngrediente(ib);

                    if (estado)
                    {
                        PopupNotifier popup = new PopupNotifier();
                        popup.TitleText         = "Aviso";
                        popup.Image             = restaurantexxi_adminstrador.Properties.Resources.add;
                        popup.ContentText       = "Se ha Creado el ingrediente: " + txt_insumo_alimento.Text;
                        popup.AnimationDuration = 800;
                        popup.Delay             = 1700;
                        popup.Popup();

                        txt_insumo_alimento.Clear();
                        txt_stock_alimento.Clear();
                        txt_stock_coci_alimento.Clear();
                        cmb_proveedor.SelectedIndex    = -1;
                        txt_habili_ingre.SelectedIndex = -1;
                    }
                    else
                    {
                        MessageBox.Show("Bebestible no fue creado");
                    }
                }
            }

            else if (rbt_bebestibles.IsChecked == true)
            {
                if (txt_insumo_alimento.Text.Trim() == "" && txt_insumo_bebi.Text.Trim() == "")
                {
                    txtcampo1    = false;
                    lbl1.Content = "Debe Completar el campo";
                }

                if (txt_stock_alimento.Text.Trim() == "" && txt_stock_bebi.Text.Trim() == "")
                {
                    txtcampo2    = false;
                    lbl2.Content = "Debe Completar el campo";
                }

                if (txt_stock_coci_alimento.Text.Trim() == "" && txt_stock_coci_bebi.Text.Trim() == "")
                {
                    txtcampo3    = false;
                    lbl3.Content = "Debe Completar el campo";
                }

                if (cmb_proveedor.Text.Trim() == "" && txt_marca_bebi.Text.Trim() == "")
                {
                    txtcampo4    = false;
                    lbl4.Content = "Debe Completar el campo";
                }

                if (txt_precio_bebi.Text.Trim() == "" && txt_habili_ingre.Text.Trim() == "")
                {
                    txtcampo5    = false;
                    lbl5.Content = "Debe Completar el campo";
                }

                if (txt_habili_bebi.Text.Trim() == "")
                {
                    txtcampo6    = false;
                    lbl6.Content = "Debe Completar el campo";
                }

                if (txt_conpre_bebi.Text.Trim() == "")
                {
                    txtcampo7    = false;
                    lbl7.Content = "Debe Completar el campo";
                }

                if (txt_stock_critico.Text == "")
                {
                    critico     = false;
                    lb8.Content = "Debe Completar el campo";
                }

                if (txtcampo1 && txtcampo2 && txtcampo3 && txtcampo4 && txtcampo5 && txtcampo6 && txtcampo7 && critico)

                {
                    BebestibleBLL ib = new BebestibleBLL();
                    ib.nombre_beb    = txt_insumo_bebi.Text;
                    ib.marca         = cmb_proveedor.Text;
                    ib.precio        = Int32.Parse(txt_precio_bebi.Text);
                    ib.stock         = Int32.Parse(txt_stock_bebi.Text);
                    ib.stock_bar     = Int32.Parse(txt_stock_coci_bebi.Text);
                    ib.stock_critico = Int32.Parse(txt_stock_critico.Text);
                    ib.imagen        = imageBt;
                    string habilitado = "";
                    if (si_habilitado.IsSelected)
                    {
                        habilitado = "Si";
                    }
                    else if (no_habilitado.IsSelected)
                    {
                        habilitado = "No";
                    }
                    else
                    {
                        MessageBox.Show("Debe seleccionar un estado para el Insumo");
                    }
                    ib.habilitado = habilitado;
                    string con_prep = "";
                    if (si_con.IsSelected)
                    {
                        con_prep = "Si";
                    }
                    else if (no_con.IsSelected)
                    {
                        con_prep = "No";
                    }
                    else
                    {
                        MessageBox.Show("Debe seleccionar un estadi para el Insumo");
                    }
                    ib.con_prep = con_prep;
                    bool estado = ib.AddBebestible(ib);
                    if (estado)
                    {
                        PopupNotifier popup = new PopupNotifier();
                        popup.TitleText         = "Aviso";
                        popup.Image             = restaurantexxi_adminstrador.Properties.Resources.add;
                        popup.ContentText       = "Se ha Creado el bebestible: " + txt_insumo_alimento.Text;
                        popup.AnimationDuration = 800;
                        popup.Delay             = 1700;
                        popup.Popup();

                        txt_insumo_bebi.Clear();
                        txt_stock_bebi.Clear();
                        txt_stock_coci_bebi.Clear();
                        txt_marca_bebi.Clear();
                        txt_precio_bebi.Clear();
                        txt_habili_bebi.SelectedIndex = -1;
                        txt_conpre_bebi.SelectedIndex = -1;
                    }
                    else
                    {
                        MessageBox.Show("Insumo no fue creado");
                    }
                }
            }
        }
        private void Btn_Aceptar_pedido_Click(object sender, RoutedEventArgs e)
        {
            bool cantidad    = true;
            bool id_prov     = true;
            bool monto_total = true;


            if (txt_cant.Text.Trim() == "")
            {
                cantidad    = false;
                lb1.Content = "Debe ingresar una cantidad";
            }

            if (cbb_proveedor.SelectedIndex == -1)
            {
                id_prov     = false;
                lb2.Content = "Debe seleccionar un proveedor";
            }

            if (txt_monto.Text.Trim() == "")
            {
                monto_total = false;
                lb3.Content = "Ingrese un monto";
            }

            if (cantidad && id_prov && monto_total)
            {
                PedidoBLL      pb        = new PedidoBLL();
                BebestibleBLL  bb        = new BebestibleBLL();
                IngredienteBLL ib        = new IngredienteBLL();
                DataTable      dt        = new DataTable();
                int            id_pedido = Int32.Parse(txt_id_pedido.Text);
                int            monto     = Int32.Parse(txt_monto.Text);
                int            id_provee = Int32.Parse(cbb_proveedor.SelectedValue.ToString());
                string         ni        = txt_nombreInsumo.Text;
                string         tipo      = pb.Get_tipo_pedido(id_pedido);
                int            idinsumo  = -1;
                if (tipo == "Pedido de ingredientes")
                {
                    idinsumo = ib.Get_idbynom(ni);
                }
                else if (tipo == "Pedido de bebestibles")
                {
                    idinsumo = bb.Get_bebyid(ni);
                }
                int canti = Int32.Parse(txt_cant.Text);
                pb.Alter_detalle_pedido(canti, id_provee, monto, idinsumo, id_pedido);
                pb.Alter_montototalporboleta(id_pedido);
                txt_id_pedido.Text       = "";
                txt_cant.Text            = "";
                txt_monto.Text           = "";
                txt_nombreInsumo.Text    = "";
                txt_stockcocina_bar.Text = "";
                txt_stock_bodega.Text    = "";
                txt_stock_critico.Text   = "";
                txt_stock_total.Text     = "";
                if (rdb_todos.IsChecked == true)
                {
                    DataTable dtt = pb.Get_all_pedidos();
                    dtg_pedidos.ItemsSource = dtt.DefaultView;
                }
                else if (rdb_todos_hoy.IsChecked == true)
                {
                    DataTable dth = pb.Get_all_pedidos_hoy();
                    dtg_pedidos.ItemsSource = dth.DefaultView;
                }
                else if (rdb_todos_senana.IsChecked == true)
                {
                    DataTable dts = pb.Get_all_pedidos_semana();
                    dtg_pedidos.ItemsSource = dts.DefaultView;
                }
                else if (rdb_todos_mes.IsChecked == true)
                {
                    DataTable dtm = pb.Get_all_pedidos_mes();
                    dtg_pedidos.ItemsSource = dtm.DefaultView;
                }
                //cbb_proveedor.SelectedIndex = -1;

                if (tipo == "Pedido de bebestibles")
                {
                    dt = pb.Get_detaPediById_bebestible(id_pedido);
                    dtg_detalle.ItemsSource = dt.DefaultView;
                }
                else if (tipo == "Pedido de ingredientes")
                {
                    dt = pb.Get_detPediById_ingredientes(id_pedido);
                    dtg_detalle.ItemsSource = dt.DefaultView;
                }
            }
        }
Exemplo n.º 12
0
        private void btn_crear_Click(object sender, RoutedEventArgs e)
        {
            bool txtcampo1 = true;
            bool txtcampo2 = true;
            bool txtcampo3 = true;
            bool txtcampo4 = true;
            bool txtcampo5 = true;
            bool txtcampo6 = true;
            bool txtcampo7 = true;

            if (rbt_alimentos.IsChecked == true)
            {
                if (txt_insumo_alimento.Text.Trim() == "" && txt_insumo_bebi.Text.Trim() == "")
                {
                    txtcampo1    = false;
                    lbl1.Content = "Debe Completar el campo";
                }

                if (txt_stock_alimento.Text.Trim() == "" && txt_stock_bebi.Text.Trim() == "")
                {
                    txtcampo2    = false;
                    lbl2.Content = "Debe Completar el campo";
                }

                if (txt_stock_coci_alimento.Text.Trim() == "" && txt_stock_coci_bebi.Text.Trim() == "")
                {
                    txtcampo3    = false;
                    lbl3.Content = "Debe Completar el campo";
                }

                if (cmb_proveedor.Text.Trim() == "" && txt_marca_bebi.Text.Trim() == "")
                {
                    txtcampo4    = false;
                    lbl4.Content = "Debe Completar el campo";
                }

                if (txt_precio_bebi.Text.Trim() == "" && txt_habili_ingre.Text.Trim() == "")
                {
                    txtcampo5    = false;
                    lbl5.Content = "Debe Completar el campo";
                }

                if (txtcampo1 && txtcampo2 && txtcampo3 && txtcampo4 && txtcampo5)

                {
                    IngredienteBLL ib = new IngredienteBLL();
                    ib.nombre_ingrediente = txt_insumo_alimento.Text;
                    ib.proveedor          = cmb_proveedor.Text;
                    ib.habilitado         = txt_habili_ingre.Text;
                    ib.stock        = Int32.Parse(txt_stock_alimento.Text);
                    ib.stock_cocina = Int32.Parse(txt_stock_coci_alimento.Text);
                    bool estado = ib.AddIngrediente(ib);

                    if (estado)
                    {
                        MessageBox.Show("Bebestible creado correctamente");
                        txt_insumo_alimento.Clear();
                        txt_stock_alimento.Clear();
                        txt_stock_coci_alimento.Clear();
                        cmb_proveedor.SelectedIndex    = -1;
                        txt_habili_ingre.SelectedIndex = -1;
                    }
                    else
                    {
                        MessageBox.Show("Bebestible no fue creado");
                    }
                }
            }

            else if (rbt_bebestibles.IsChecked == true)
            {
                if (txt_insumo_alimento.Text.Trim() == "" && txt_insumo_bebi.Text.Trim() == "")
                {
                    txtcampo1    = false;
                    lbl1.Content = "Debe Completar el campo";
                }

                if (txt_stock_alimento.Text.Trim() == "" && txt_stock_bebi.Text.Trim() == "")
                {
                    txtcampo2    = false;
                    lbl2.Content = "Debe Completar el campo";
                }

                if (txt_stock_coci_alimento.Text.Trim() == "" && txt_stock_coci_bebi.Text.Trim() == "")
                {
                    txtcampo3    = false;
                    lbl3.Content = "Debe Completar el campo";
                }

                if (cmb_proveedor.Text.Trim() == "" && txt_marca_bebi.Text.Trim() == "")
                {
                    txtcampo4    = false;
                    lbl4.Content = "Debe Completar el campo";
                }

                if (txt_precio_bebi.Text.Trim() == "" && txt_habili_ingre.Text.Trim() == "")
                {
                    txtcampo5    = false;
                    lbl5.Content = "Debe Completar el campo";
                }

                if (txt_habili_bebi.Text.Trim() == "")
                {
                    txtcampo6    = false;
                    lbl6.Content = "Debe Completar el campo";
                }

                if (txt_conpre_bebi.Text.Trim() == "")
                {
                    txtcampo7    = false;
                    lbl7.Content = "Debe Completar el campo";
                }

                if (txtcampo1 && txtcampo2 && txtcampo3 && txtcampo4 && txtcampo5 && txtcampo6 && txtcampo7)

                {
                    BebestibleBLL ib = new BebestibleBLL();
                    ib.nombre_beb = txt_insumo_bebi.Text;
                    ib.marca      = txt_marca_bebi.Text;
                    ib.precio     = Int32.Parse(txt_precio_bebi.Text);
                    ib.stock      = Int32.Parse(txt_stock_bebi.Text);
                    ib.stock_bar  = Int32.Parse(txt_stock_coci_bebi.Text);
                    ib.imagen     = imageBt;
                    string habilitado = "";
                    if (si_habilitado.IsSelected)
                    {
                        habilitado = "Si";
                    }
                    else if (no_habilitado.IsSelected)
                    {
                        habilitado = "No";
                    }
                    else
                    {
                        MessageBox.Show("Debe seleccionar un estado para el Insumo");
                    }
                    ib.habilitado = habilitado;
                    string con_prep = "";
                    if (si_con.IsSelected)
                    {
                        con_prep = "Si";
                    }
                    else if (no_con.IsSelected)
                    {
                        con_prep = "No";
                    }
                    else
                    {
                        MessageBox.Show("Debe seleccionar un estadi para el Insumo");
                    }
                    ib.con_prep = con_prep;
                    bool estado = ib.AddBebestible(ib);
                    if (estado)
                    {
                        MessageBox.Show("Insumo creado correctamente");
                        txt_insumo_bebi.Clear();
                        txt_stock_bebi.Clear();
                        txt_stock_coci_bebi.Clear();
                        txt_marca_bebi.Clear();
                        txt_precio_bebi.Clear();
                        txt_habili_bebi.SelectedIndex = -1;
                        txt_conpre_bebi.SelectedIndex = -1;
                    }
                    else
                    {
                        MessageBox.Show("Insumo no fue creado");
                    }
                }
            }
        }
Exemplo n.º 13
0
        private void Modificar_id_Click(object sender, RoutedEventArgs e)
        {
            bool txtcampo1 = true;
            bool txtcampo2 = true;
            bool txtcampo3 = true;
            bool txtcampo4 = true;
            bool txtcampo5 = true;
            bool txtcampo6 = true;
            bool txtcampo7 = true;
            bool txtcampo8 = true;
            bool scv       = true;

            if (rbt_ing.IsChecked == true)
            {
                if (txt_id_bebida.Text.Trim() == "" && txt_id_alimento.Text.Trim() == "")
                {
                    txtcampo1    = false;
                    lbl1.Content = "Debe Completar el campo";
                }

                if (txt_stock_critico.Text == "")
                {
                    scv = false;
                    lb_stock_critico.Content = "Complete el campo";
                }

                if (txt_nombre_ali.Text.Trim() == "" && txt_nombre_bebi.Text.Trim() == "")
                {
                    txtcampo2    = false;
                    lbl2.Content = "Debe Completar el campo";
                }

                if (txt_stock_ali.Text.Trim() == "" && txt_stock_bebi.Text.Trim() == "")
                {
                    txtcampo3    = false;
                    lbl3.Content = "Debe Completar el campo";
                }

                if (txt_stock_coci_alimento.Text.Trim() == "" && txt_stock_bar_bebi.Text.Trim() == "")
                {
                    txtcampo4    = false;
                    lbl4.Content = "Debe Completar el campo";
                }

                if (txt_proveedor.Text.Trim() == "" && txt_marca_bebi.Text.Trim() == "")
                {
                    txtcampo5    = false;
                    lbl5.Content = "Debe Completar el campo";
                }

                if (txt_precio_bebi.Text.Trim() == "" && cmb_habili_ing.Text.Trim() == "")
                {
                    txtcampo6    = false;
                    lbl6.Content = "Debe Completar el campo";
                }

                if (txtcampo1 && txtcampo2 && txtcampo3 && txtcampo4 && txtcampo5 && txtcampo6)

                {
                    IngredienteBLL ub = new IngredienteBLL();
                    ub.id_ingrediente     = Int32.Parse(txt_id_alimento.Text);
                    ub.nombre_ingrediente = txt_nombre_ali.Text;
                    ub.proveedor          = txt_proveedor.Text;
                    ub.habilitado         = cmb_habili_ing.Text;
                    ub.stock         = Int32.Parse(txt_stock_ali.Text);
                    ub.stock_cocina  = Int32.Parse(txt_stock_coci_alimento.Text);
                    ub.stock_critico = Int32.Parse(txt_stock_critico.Text);
                    ub.AlterinIngrediente(ub);


                    System.Data.DataTable dt = ub.AllingredientesList();

                    dtg_modi.ItemsSource = dt.DefaultView;



                    PopupNotifier popup = new PopupNotifier();
                    popup.TitleText         = "Aviso";
                    popup.Image             = restaurantexxi_adminstrador.Properties.Resources.add;
                    popup.ContentText       = "Se ha modificado el Ingrediente: " + txt_nombre_ali.Text;
                    popup.AnimationDuration = 800;
                    popup.Delay             = 1700;
                    popup.Popup();

                    IngredienteBLL        ib  = new IngredienteBLL();
                    System.Data.DataTable dtt = ib.AllingredientesList();
                    dtg_modi.ItemsSource = dtt.DefaultView;
                }
            }
            else if (rbt_bebi.IsChecked == true)
            {
                if (txt_id_bebida.Text.Trim() == "" && txt_id_alimento.Text.Trim() == "")
                {
                    txtcampo1    = false;
                    lbl1.Content = "Debe Completar el campo";
                }

                if (txt_nombre_ali.Text.Trim() == "" && txt_nombre_bebi.Text.Trim() == "")
                {
                    txtcampo2    = false;
                    lbl2.Content = "Debe Completar el campo";
                }

                if (txt_stock_ali.Text.Trim() == "" && txt_stock_bebi.Text.Trim() == "")
                {
                    txtcampo3    = false;
                    lbl3.Content = "Debe Completar el campo";
                }

                if (txt_stock_critico.Text == "")
                {
                    scv = false;
                    lb_stock_critico.Content = "Complete el campo";
                }

                if (txt_stock_coci_alimento.Text.Trim() == "" && txt_stock_bar_bebi.Text.Trim() == "")
                {
                    txtcampo4    = false;
                    lbl4.Content = "Debe Completar el campo";
                }

                if (txt_proveedor.Text.Trim() == "" && txt_marca_bebi.Text.Trim() == "")
                {
                    txtcampo5    = false;
                    lbl5.Content = "Debe Completar el campo";
                }

                if (txt_precio_bebi.Text.Trim() == "" && cmb_habili_ing.Text.Trim() == "")
                {
                    txtcampo6    = false;
                    lbl6.Content = "Debe Completar el campo";
                }

                if (cmb_habili_bebi.Text.Trim() == "")
                {
                    txtcampo7    = false;
                    lbl7.Content = "Debe Completar el campo";
                }

                if (cmb_conpre_bebi.Text.Trim() == "")
                {
                    txtcampo8    = false;
                    lbl8.Content = "Debe Completar el campo";
                }

                if (txtcampo1 && txtcampo2 && txtcampo3 && txtcampo4 && txtcampo5 && txtcampo6 && txtcampo7 && txtcampo8)
                {
                    BebestibleBLL ub = new BebestibleBLL();
                    ub.id_bebestible = Int32.Parse(txt_id_bebida.Text);
                    ub.nombre_beb    = txt_nombre_bebi.Text;
                    ub.marca         = txt_proveedor.Text;
                    ub.precio        = Int32.Parse(txt_precio_bebi.Text);
                    ub.stock         = Int32.Parse(txt_stock_bebi.Text);
                    ub.stock_bar     = Int32.Parse(txt_stock_bar_bebi.Text);
                    ub.stock_critico = Int32.Parse(txt_stock_critico.Text);
                    ub.habilitado    = cmb_habili_bebi.Text;
                    ub.con_prep      = cmb_conpre_bebi.Text;

                    ub.AlterinBebestible(ub);


                    System.Data.DataTable dt = ub.Allbebestible();
                    dtg_modi.ItemsSource = dt.DefaultView;
                    PopupNotifier popup = new PopupNotifier();
                    popup.TitleText         = "Aviso";
                    popup.Image             = restaurantexxi_adminstrador.Properties.Resources.add;
                    popup.ContentText       = "Se ha modificado el bebestible: " + txt_nombre_bebi.Text;
                    popup.AnimationDuration = 800;
                    popup.Delay             = 1700;
                    popup.Popup();

                    BebestibleBLL         ib  = new BebestibleBLL();
                    System.Data.DataTable dtt = ib.Allbebestible();
                    dtg_modi.ItemsSource = dtt.DefaultView;
                }
            }
        }
Exemplo n.º 14
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            OrdenBLL ordBLL = new OrdenBLL();

            //ordBLL.creaOrden();
            if (Session["numero_boleta"] == null)
            {
            }
            else if (Session["numero_boleta"] != null && GridView1.Rows.Count > 0)
            {
                string faltaStock = "";
                foreach (GridViewRow row in GridView1.Rows)
                {
                    int    id  = int.Parse(row.Cells[1].Text);
                    string cat = row.Cells[3].Text;
                    if (cat != "bebible")
                    {
                        PlatoBLL plaBLL          = new PlatoBLL();
                        int      stockactual     = plaBLL.verificaStock(id);
                        int      stockSolicitado = int.Parse(((TextBox)row.Cells[5].FindControl("TextBox1")).Text);
                        if (stockactual < stockSolicitado)
                        {
                            faltaStock = faltaStock + row.Cells[2].Text + " Stock Actual: " + stockactual + "\\n ";
                        }
                    }
                    else if (cat == "bebible")
                    {
                        BebestibleBLL bebesBLL        = new BebestibleBLL();
                        int           stockactual     = bebesBLL.verificaStock(id);
                        int           stockSolicitado = int.Parse(((TextBox)row.Cells[5].FindControl("TextBox1")).Text);
                        if (stockactual < stockSolicitado)
                        {
                            faltaStock = faltaStock + row.Cells[2].Text + " Stock Actual: " + stockactual + "\\n ";
                        }
                    }
                }



                if (faltaStock.Length <= 0)
                {
                    bool check = ordBLL.creaOrden(int.Parse(Session["numero_boleta"].ToString()));
                    if (check)
                    {
                        foreach (GridViewRow row in GridView1.Rows)
                        {
                            int id       = int.Parse(row.Cells[1].Text);
                            int cantidad = int.Parse(((TextBox)row.Cells[5].FindControl("TextBox1")).Text);

                            if (row.Cells[3].Text != "bebible")
                            {
                                PlatoBLL plBLL = new PlatoBLL();
                                plBLL.ingresaRelacion(id, cantidad);
                                plBLL.reduceStock(id, cantidad);
                            }
                            else if (row.Cells[3].Text == "bebible")
                            {
                                BebestibleBLL bebBLL = new BebestibleBLL();
                                bebBLL.agregarRelacion(id, cantidad);
                                bebBLL.reduceStock(id, cantidad);
                            }
                        }
                        Session["pedido"] = null;
                        Response.Redirect("/CarroCompras.aspx");
                    }
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('No se pudo Generar la orden: \\n Insuficiente Stock de: \\n" + faltaStock + " ')", true);
                }
            }
        }
Exemplo n.º 15
0
        private void Modificar_id_Click(object sender, RoutedEventArgs e)
        {
            bool txtcampo1 = true;
            bool txtcampo2 = true;
            bool txtcampo3 = true;
            bool txtcampo4 = true;
            bool txtcampo5 = true;
            bool txtcampo6 = true;
            bool txtcampo7 = true;
            bool txtcampo8 = true;

            if (rbt_ing.IsChecked == true)
            {
                if (txt_id_bebida.Text.Trim() == "" && txt_id_alimento.Text.Trim() == "")
                {
                    txtcampo1    = false;
                    lbl1.Content = "Debe Completar el campo";
                }

                if (txt_nombre_ali.Text.Trim() == "" && txt_nombre_bebi.Text.Trim() == "")
                {
                    txtcampo2    = false;
                    lbl2.Content = "Debe Completar el campo";
                }

                if (txt_stock_ali.Text.Trim() == "" && txt_stock_bebi.Text.Trim() == "")
                {
                    txtcampo3    = false;
                    lbl3.Content = "Debe Completar el campo";
                }

                if (txt_stock_coci_alimento.Text.Trim() == "" && txt_stock_bar_bebi.Text.Trim() == "")
                {
                    txtcampo4    = false;
                    lbl4.Content = "Debe Completar el campo";
                }

                if (txt_proveedor.Text.Trim() == "" && txt_marca_bebi.Text.Trim() == "")
                {
                    txtcampo5    = false;
                    lbl5.Content = "Debe Completar el campo";
                }

                if (txt_precio_bebi.Text.Trim() == "" && cmb_habili_ing.Text.Trim() == "")
                {
                    txtcampo6    = false;
                    lbl6.Content = "Debe Completar el campo";
                }

                if (txtcampo1 && txtcampo2 && txtcampo3 && txtcampo4 && txtcampo5 && txtcampo6)

                {
                    IngredienteBLL ub = new IngredienteBLL();
                    ub.id_ingrediente     = Int32.Parse(txt_id_alimento.Text);
                    ub.nombre_ingrediente = txt_nombre_ali.Text;
                    ub.proveedor          = txt_proveedor.Text;
                    ub.habilitado         = cmb_habili_ing.Text;
                    ub.stock        = Int32.Parse(txt_stock_ali.Text);
                    ub.stock_cocina = Int32.Parse(txt_stock_coci_alimento.Text);
                    ub.AlterinIngrediente(ub);
                    MessageBox.Show("Usuario Modificado correctamente");
                }
            }
            else if (rbt_bebi.IsChecked == true)
            {
                if (txt_id_bebida.Text.Trim() == "" && txt_id_alimento.Text.Trim() == "")
                {
                    txtcampo1    = false;
                    lbl1.Content = "Debe Completar el campo";
                }

                if (txt_nombre_ali.Text.Trim() == "" && txt_nombre_bebi.Text.Trim() == "")
                {
                    txtcampo2    = false;
                    lbl2.Content = "Debe Completar el campo";
                }

                if (txt_stock_ali.Text.Trim() == "" && txt_stock_bebi.Text.Trim() == "")
                {
                    txtcampo3    = false;
                    lbl3.Content = "Debe Completar el campo";
                }

                if (txt_stock_coci_alimento.Text.Trim() == "" && txt_stock_bar_bebi.Text.Trim() == "")
                {
                    txtcampo4    = false;
                    lbl4.Content = "Debe Completar el campo";
                }

                if (txt_proveedor.Text.Trim() == "" && txt_marca_bebi.Text.Trim() == "")
                {
                    txtcampo5    = false;
                    lbl5.Content = "Debe Completar el campo";
                }

                if (txt_precio_bebi.Text.Trim() == "" && cmb_habili_ing.Text.Trim() == "")
                {
                    txtcampo6    = false;
                    lbl6.Content = "Debe Completar el campo";
                }

                if (cmb_habili_bebi.Text.Trim() == "")
                {
                    txtcampo7    = false;
                    lbl7.Content = "Debe Completar el campo";
                }

                if (cmb_conpre_bebi.Text.Trim() == "")
                {
                    txtcampo8    = false;
                    lbl8.Content = "Debe Completar el campo";
                }

                if (txtcampo1 && txtcampo2 && txtcampo3 && txtcampo4 && txtcampo5 && txtcampo6 && txtcampo7 && txtcampo8)

                {
                    BebestibleBLL ub = new BebestibleBLL();
                    ub.id_bebestible = Int32.Parse(txt_id_bebida.Text);
                    ub.nombre_beb    = txt_nombre_bebi.Text;
                    ub.marca         = txt_marca_bebi.Text;
                    ub.precio        = Int32.Parse(txt_precio_bebi.Text);
                    ub.stock         = Int32.Parse(txt_stock_bebi.Text);
                    ub.stock_bar     = Int32.Parse(txt_stock_bar_bebi.Text);
                    ub.habilitado    = cmb_habili_bebi.Text;
                    ub.con_prep      = cmb_conpre_bebi.Text;
                    ub.AlterinBebestible(ub);
                    MessageBox.Show("Usuario Modificado correctamente");
                }
            }
        }
Exemplo n.º 16
0
        private void btn_eli_Click(object sender, RoutedEventArgs e)
        {
            bool    idid = true;
            Generic gen  = new Generic();

            gen.ACCION.Content    = "deshabilitar";
            gen.ACCION.Visibility = Visibility.Hidden;
            BebestibleBLL  us = new BebestibleBLL();
            IngredienteBLL ig = new IngredienteBLL();

            if (txt_id_eli_bebi.Text == "" && txt_id_eli_ing.Text == "")
            {
                idid          = false;
                lbl_1.Content = "El Debe selecionar una ID";
            }
            if (idid)
            {
                if (rbt_bebi.IsChecked == true)
                {
                    int idbebestible = Int32.Parse(txt_id_eli_bebi.Text);
                    try
                    {
                        DataTable da     = us.listarmodificar(idbebestible);
                        DataRow   row    = da.Rows[0];
                        string    id     = row[0].ToString();
                        string    Nombre = row[1].ToString();
                        gen.lb_titulo.FontSize       = 18;
                        gen.lb_confirmacion.FontSize = 16;
                        gen.lb_contenido.FontSize    = 16;
                        gen.lb_titulo.Content        = "¿Desea deshabilitar este Bebestible?";
                        gen.lb_confirmacion.Content  = "Al realizar esta accion, se deshabilitara el Bebestible:";
                        gen.lb_contenido.Content     = "id : " + id + "\n" +
                                                       "Nombre: " + Nombre;

                        gen.Title = "Confirmación";
                        gen.btn_Cancelar.Content  = "Volver";
                        gen.btn_Confirmar.Content = "Deshabilitar";
                        gen.ACCION.Content        = "Modificarbebi";
                        gen.lb_rut.Content        = txt_id_eli_bebi.Text;
                        gen.Owner = this;
                        gen.ShowDialog();
                    }

                    catch (Exception ex)

                    {
                        Console.WriteLine(ex);
                        MessageBox.Show("Este Bebestible no existe en el sistema");
                    }
                }
                else if (rbt_ing.IsChecked == true)
                {
                    int idingrediente = Int32.Parse(txt_id_eli_ing.Text);
                    try
                    {
                        DataTable da     = ig.listarmodificar(idingrediente);
                        DataRow   row    = da.Rows[0];
                        string    id     = row[0].ToString();
                        string    Nombre = row[1].ToString();
                        gen.lb_titulo.FontSize       = 18;
                        gen.lb_confirmacion.FontSize = 16;
                        gen.lb_contenido.FontSize    = 16;
                        gen.lb_titulo.Content        = "¿Desea deshabilitar este Ingrediente?";
                        gen.lb_confirmacion.Content  = "Al realizar esta accion, se deshabilitara el Ingrediente:";
                        gen.lb_contenido.Content     = "id : " + id + "\n" +
                                                       "Nombre: " + Nombre;

                        gen.Title = "Confirmación";
                        gen.btn_Cancelar.Content  = "Volver";
                        gen.btn_Confirmar.Content = "Deshabilitar";
                        gen.ACCION.Content        = "Modificaring";
                        gen.lb_rut.Content        = txt_id_eli_ing.Text;
                        gen.Owner = this;
                        gen.ShowDialog();
                    }

                    catch (Exception ex)
                    {
                        Console.WriteLine(ex);
                        MessageBox.Show("Este Ingrediente no existe en el sistema");
                    }
                }
            }
        }
Exemplo n.º 17
0
        private void Btn_Confirmar_Click(object sender, RoutedEventArgs e)
        {
            usuarioBLL us  = new usuarioBLL();
            string     act = ACCION.Content.ToString();

            if (act == "eliminar")
            {
                int rut = Int32.Parse(lb_rut.Content.ToString());
                lb_titulo.VerticalAlignment = VerticalAlignment.Center;
                us.rut = rut;
                us.DeleteUser(us);
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText         = "Aviso";
                popup.Image             = Properties.Resources.delete;
                popup.ContentText       = "Se ha Eliminado el usuario con rut: " + rut;
                popup.AnimationDuration = 800;
                popup.Delay             = 1400;
                popup.Popup();
                Close();
            }
            else if (act == "eliminarprov")
            {
                ProveedorBLL pb = new ProveedorBLL();
                int          id = Int32.Parse(lb_rut.Content.ToString());
                pb.deleteprov(id);
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText         = "Aviso";
                popup.Image             = Properties.Resources.delete;
                popup.ContentText       = "Se ha Eliminado el Proveedor con id: " + id;
                popup.AnimationDuration = 500;
                popup.Delay             = 2500;
                popup.Popup();
                Close();
            }
            else if (act == "deletemesa")
            {
                MesaBLL mb  = new MesaBLL();
                int     num = Int32.Parse(lb_rut.Content.ToString());
                mb.DeleteMesa(num);
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText         = "Aviso";
                popup.Image             = Properties.Resources.delete;
                popup.ContentText       = "Se ha Eliminado la mesa número: " + num;
                popup.AnimationDuration = 500;
                popup.Delay             = 2500;
                popup.Popup();
                Close();
            }
            else if (act == "Modificarbebi")
            {
                int           id = Int32.Parse(lb_rut.Content.ToString());
                BebestibleBLL bb = new BebestibleBLL();
                lb_titulo.VerticalAlignment = VerticalAlignment.Center;
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText         = "Aviso";
                popup.Image             = Properties.Resources.add;
                popup.ContentText       = "Se ha Deshabilitado el bebestible con id: " + id;
                popup.AnimationDuration = 500;
                popup.Delay             = 2000;
                popup.Popup();
                bb.id_bebestible = id;
                bb.Alterinhabilitado(bb);
                Close();
            }
            else if (act == "Modificaring")
            {
                int id = Int32.Parse(lb_rut.Content.ToString());
                lb_titulo.VerticalAlignment = VerticalAlignment.Center;
                IngredienteBLL ib = new IngredienteBLL();
                ib.id_ingrediente = id;
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText         = "Aviso";
                popup.Image             = Properties.Resources.add;
                popup.ContentText       = "Se ha Deshabilitado el ingrediente con id: " + id;
                popup.AnimationDuration = 500;
                popup.Delay             = 2000;
                popup.Popup();
                ib.Alterinhabilitadoing(ib);
                Close();
            }
            else if (act == "deshabilitar")
            {
                PlatoBLL pb = new PlatoBLL();
                pb.Id_plato = Int32.Parse(lb_rut.Content.ToString());
                pb.DesPlato(pb);
                Close();
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText         = "Aviso";
                popup.Image             = Properties.Resources.delete;
                popup.ContentText       = "Se ha Deshabilitado el plato con id: " + Int32.Parse(lb_rut.Content.ToString());
                popup.AnimationDuration = 500;
                popup.Delay             = 2000;
                popup.Popup();
                Close();
            }
            else if (act == "go_list")
            {
                ListarMesas lm = new ListarMesas();
                lm.Owner = this;
                lm.rdb_todas.IsChecked = true;
                lm.ShowDialog();
                Close();
            }
            else
            {
            }
        }
Exemplo n.º 18
0
        private void Buscar_ID_Click(object sender, RoutedEventArgs e)
        {
            if (rbt_ing.IsChecked == true)
            {
                IngredienteBLL us = new IngredienteBLL();
                bool           id = true;
                if (txt_id_alimento.Text == "")
                {
                    id           = false;
                    lbl1.Content = "Debe ingresar una id";
                }

                if (id)
                {
                    int id_ingrediente = Int32.Parse(txt_id_alimento.Text);
                    try
                    {
                        DataTable da  = us.listarmodificar(id_ingrediente);
                        DataRow   row = da.Rows[0];
                        txt_nombre_ali.Text          = row[0].ToString();
                        txt_proveedor.Text           = row[1].ToString();
                        txt_stock_ali.Text           = row[2].ToString();
                        txt_stock_coci_alimento.Text = row[3].ToString();
                        cmb_habili_ing.Text          = row[4].ToString();
                        txt_stock_critico.Text       = row[5].ToString();



                        txt_id_alimento.IsEnabled         = true;
                        txt_nombre_ali.IsEnabled          = true;
                        txt_stock_ali.IsEnabled           = true;
                        txt_stock_coci_alimento.IsEnabled = true;
                        txt_proveedor.IsEnabled           = true;
                        cmb_habili_ing.IsEnabled          = true;
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show("" + ex);
                    }
                }
            }
            else if (rbt_bebi.IsChecked == true)
            {
                BebestibleBLL us = new BebestibleBLL();
                if (txt_id_bebida.Text == "")
                {
                    MessageBox.Show("Debe ingresar un ID para poder buscar a un Insumo");
                }
                else if (txt_id_bebida.Text != "")
                {
                    int id_bebestible = Int32.Parse(txt_id_bebida.Text);
                    us.listarmodificar(id_bebestible);
                    try
                    {
                        DataTable da  = us.listarmodificar(id_bebestible);
                        DataRow   row = da.Rows[0];
                        txt_nombre_bebi.Text    = row[1].ToString();
                        txt_proveedor.Text      = row[2].ToString();
                        txt_precio_bebi.Text    = row[3].ToString();
                        txt_stock_bebi.Text     = row[4].ToString();
                        txt_stock_bar_bebi.Text = row[5].ToString();
                        cmb_habili_bebi.Text    = row[6].ToString();
                        cmb_conpre_bebi.Text    = row[7].ToString();
                        txt_stock_critico.Text  = row[8].ToString();

                        txt_id_bebida.IsEnabled      = true;
                        txt_nombre_bebi.IsEnabled    = true;
                        txt_stock_bebi.IsEnabled     = true;
                        txt_stock_bar_bebi.IsEnabled = true;
                        txt_precio_bebi.IsEnabled    = true;
                        cmb_habili_bebi.IsEnabled    = true;
                        txt_proveedor.IsEnabled      = true;
                        cmb_conpre_bebi.IsEnabled    = true;
                    }
                    catch
                    {
                        MessageBox.Show("Esta ID no existe en el sistema");
                    }
                }
            }
        }