public NewItemViewModel(IFoodOrderService model) { if (model == null) { throw new ArgumentNullException("model"); } _model = model; ExitCommand = new DelegateCommand(param => OnExitApplication()); BackCommand = new DelegateCommand(param => OnBackToMain()); SaveCommand = new DelegateCommand(param => Save()); }
/// <summary> /// Nézetmodell példányosítása. /// </summary> /// <param name="model">A modell.</param> public LoginViewModel(IFoodOrderService model) { if (model == null) { throw new ArgumentNullException("model"); } _model = model; UserName = string.Empty; ExitCommand = new DelegateCommand(param => OnExitApplication()); LoginCommand = new DelegateCommand(param => LoginAsync(param as PasswordBox)); }
private void App_Startup(object sender, StartupEventArgs e) { _service = new FoodOrderService(ConfigurationManager.AppSettings["baseAddress"]); _loginViewModel = new LoginViewModel(_service); _loginViewModel.ExitApplication += ViewModel_ExitApplication; _loginViewModel.MessageApplication += ViewModel_MessageApplication; _loginViewModel.LoginSuccess += ViewModel_LoginSuccess; _loginViewModel.LoginFailed += ViewModel_LoginFailed; _loginView = new LoginWindow { DataContext = _loginViewModel }; _loginView.Show(); }
public HotelController(IFoodOrderService IFoodOrderService, IUserManangement IUserManangement) { _repository = IFoodOrderService; _repositoryUser = IUserManangement; }
public HomeController(IRestaurantService restaurantService, IOrderService orderService, IFoodOrderService foodOrderService) { _restaurantService = restaurantService; _orderService = orderService; _foodOrderService = foodOrderService; }