示例#1
0
 public MenuViewModel(MenuView menuViewOpen)
 {
     menuView        = menuViewOpen;
     pizzeriaService = new PizzeriaService();
     PizzaList       = pizzeriaService.GetPizzas();
     orederedPizzas  = new List <tblPizzaOrder>();
 }
示例#2
0
        public MenuViewModel(MenuView menuViewOpen, string JMBG)
        {
            menuView        = menuViewOpen;
            pizzeriaService = new PizzeriaService();
            PizzaList       = pizzeriaService.GetPizzas();
            orederedPizzas  = new List <tblPizzaOrder>();
            ordersOfUser    = pizzeriaService.GetOrdersOfGuest(JMBG);

            if (ordersOfUser.Any())
            {
                if (ordersOfUser.Last().OrderStatus == "W")
                {
                    ViewMakeOrder = Visibility.Hidden;
                    ViewShowOrder = Visibility.Visible;
                }
            }
            this.JMBG = JMBG;
        }