public StorePage(IGameRepo gameRepo, IUserRepo userRepo, IBuyService buyService, IPriceCalculationStrategy calcStrat, LibraryPage lp, User usr) { libp = lp; this._gameRepo = gameRepo; this._userRepo = userRepo; this._buyService = buyService; this._calcStrat = calcStrat; storeUser = usr; InitializeComponent(); if (storeList == null) { storeList = new ObservableCollection <Game>(); } //storeList = new ObservableCollection<Game> { // new Game{Name=" "} //}; List <string> names = new List <string>(); storeList.Clear(); foreach (var game in _gameRepo.getAllGames()) { if (!names.Contains(game.Name)) { names.Add(game.Name); storeList.Add(game); } } StoreLIst.Items.Clear(); StoreLIst.ItemsSource = storeList; }
public BuyController(IUserService userService, IBuyService buyService, IMatchService matchService) { _matchService = matchService; _buyService = buyService; _userService = userService; }
public RegistrationWindow(IGameRepo gameRepo, IUserRepo userRepo, IBuyService buyService, IPriceCalculationStrategy calcStrat) { this._gameRepo = gameRepo; this._userRepo = userRepo; this._buyService = buyService; this._calcStrat = calcStrat; InitializeComponent(); }
public BuyController(IBuyService buyService, IQueryableRepository <Buy> queryableRepository, IQueryableRepository <vwRP_StockCount> totalRowsRepository, IQueryableRepository <Gift> giftQueryableRepository, IQueryableRepository <User> userQueryableRepository) { _buyService = buyService; _queryableRepository = queryableRepository; _totalRowsRepository = totalRowsRepository; _giftQueryableRepository = giftQueryableRepository; _userQueryableRepository = userQueryableRepository; }
public BuyUserController(IQueryableRepository <Gift> giftQueryableRepository, IQueryableRepository <Brand> brandQueryableRepository, IQueryableRepository <Category> categoryQueryableRepository, IGiftService giftService, IBuyService buyService, IQueryableRepository <User> userQueryableRepository) { _giftQueryableRepository = giftQueryableRepository; _brandQueryableRepository = brandQueryableRepository; _categoryQueryableRepository = categoryQueryableRepository; _giftService = giftService; _buyService = buyService; _userQueryableRepository = userQueryableRepository; }
public LibraryPage(IGameRepo gameRepo, IUserRepo userRepo, IBuyService buyService, IPriceCalculationStrategy calcStrat, StorePage sp, User ActiveUser) { this._gameRepo = gameRepo; this._userRepo = userRepo; this._buyService = buyService; this._calcStrat = calcStrat; this.LibraryUser = ActiveUser; if (sp == null) { stp = new StorePage(_gameRepo, _userRepo, _buyService, _calcStrat, this, this.LibraryUser); } else { stp = sp; } InitializeComponent(); if (userLib == null) { userLib = new ObservableCollection <Game>(); } //this.LibraryUser.UserLibrary.Clear(); //_userRepo.UpdateUser(this.LibraryUser); //foreach(var libItm in _userRepo.getUserByLogin(this.LibraryUser.Login).UserLibrary) //{ // if (_gameRepo.FindById(libItm.GameId) == _gameRepo.FindByFullName("CSGO")) // { // } // else // { // _buyService.BuyGame(_gameRepo.FindByFullName("CSGO"), this.LibraryUser); // } //} userLib.Clear(); foreach (var libItm in userRepo.getUsrDetails(LibraryUser.Id).UserLibrary) { userLib.Add(_gameRepo.FindById(libItm.GameId)); } LibraryLIst.Items.Clear(); LibraryLIst.ItemsSource = userLib; //foreach (var itm in _userRepo.getUsrDetails(LibraryUser.Id).UserLibrary) //{ // int i = 0; // LibraryLIst.Resources.Add(i, _gameRepo.FindById(itm.GameId).Name); // i++; //} }
public SignUpWindow(IGameRepo gameRepo, IUserRepo userRepo, IBuyService buyService, IPriceCalculationStrategy calcStrat) { //foreach (var usr in _userRepo.getAllUsers()) //{ // Console.WriteLine(usr.Id.ToString()); //} this._gameRepo = gameRepo; this._userRepo = userRepo; this._buyService = buyService; this._calcStrat = calcStrat; InitializeComponent(); }
public UserHomeController(ISaleService saleService, IProductService productService, ICustomerService customerService, IUserService userService, IGiftService giftService, IBuyService buyService, ICampaignService campaignService, IQueryableRepository <Sale> saleQueryableRepository, IQueryableRepository <Product> productQueryableRepository, IQueryableRepository <Customer> customerQueryableRepository, IQueryableRepository <Gift> giftQueryableRepository, IQueryableRepository <Buy> buyQueryableRepository, IQueryableRepository <User> userQueryableRepository, IQueryableRepository <Campaign> campaignQueryableRepository, IQueryableRepository <Score> scroreQueryableRepository) { _saleService = saleService; _productService = productService; _customerService = customerService; _userService = userService; _giftService = giftService; _buyService = buyService; _campaignService = campaignService; _productQueryableRepository = productQueryableRepository; _customerQueryableRepository = customerQueryableRepository; _giftQueryableRepository = giftQueryableRepository; _buyQueryableRepository = buyQueryableRepository; _userQueryableRepository = userQueryableRepository; _campaignQueryableRepository = campaignQueryableRepository; _scroreQueryableRepository = scroreQueryableRepository; _saleQueryableRepository = saleQueryableRepository; }
public BuyController(IBuyService buyService, IQueryableRepository <Buy> queryableRepository, IQueryableRepository <vwRP_StockCount> totalRowsRepository) { _buyService = buyService; _queryableRepository = queryableRepository; _totalRowsRepository = totalRowsRepository; }
public BuyController(IBuyService buyService) { _buyService = buyService; }
public BuyControllerTest() { _service = new BuyServiceFake(); _controller = new BuyController(_service); }
public proxyDp(string userName, string password) { service = new BuyService(); }
public BuyController(IBuyService service) { _service = service; }