コード例 #1
0
        private void Tile_filtrar_mesa_Click(object sender, RoutedEventArgs e)
        {
            ListarMesas lm = new ListarMesas();

            lm.Owner = this;
            lm.lb_nombreusuario.Content = lb_nombreusuario.Content;
            lm.ShowDialog();
        }
コード例 #2
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
            {
            }
        }