public MenuViewModel(MenuView menuViewOpen) { menuView = menuViewOpen; pizzeriaService = new PizzeriaService(); PizzaList = pizzeriaService.GetPizzas(); orederedPizzas = new List <tblPizzaOrder>(); }
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; }