예제 #1
0
 public OrderViewModel(MainViewModel mainViewModel)
 {
     CurrentViewModel       = new GroupItemsViewModel(this);
     _mainViewModel         = mainViewModel;
     _orderDetailRepository = new OrderDetailRepository(_connectionString);
     _orderRepository       = new OrderRepository(_connectionString);
     _tableRepository       = new TableRepository(_connectionString);
     _billRepositary        = new BillRepository(_connectionString);
 }
 public MenuItemsByGroupViewModel(GroupItemsViewModel groupItemsViewModel)
 {
     _groupItemsViewModel   = groupItemsViewModel;
     _menuRepository        = new MenuRepository(_connectionString);
     _orderDetailRepository = new OrderDetailRepository(_connectionString);
     GroupName    = _groupItemsViewModel.SelectedGroupName;
     ItemsByGroup = _menuRepository.GetMenuItemsByGroup(GroupName);
     Amount       = "1";
 }