예제 #1
0
        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;
 }
예제 #3
0
 public RegistrationWindow(IGameRepo gameRepo, IUserRepo userRepo, IBuyService buyService, IPriceCalculationStrategy calcStrat)
 {
     this._gameRepo   = gameRepo;
     this._userRepo   = userRepo;
     this._buyService = buyService;
     this._calcStrat  = calcStrat;
     InitializeComponent();
 }
예제 #4
0
 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;
 }
예제 #5
0
 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;
 }
예제 #6
0
        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++;

            //}
        }
예제 #7
0
        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();
        }
예제 #8
0
 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;
 }
예제 #9
0
 public BuyController(IBuyService buyService, IQueryableRepository <Buy> queryableRepository, IQueryableRepository <vwRP_StockCount> totalRowsRepository)
 {
     _buyService          = buyService;
     _queryableRepository = queryableRepository;
     _totalRowsRepository = totalRowsRepository;
 }
예제 #10
0
 public BuyController(IBuyService buyService)
 {
     _buyService = buyService;
 }
예제 #11
0
 public BuyControllerTest()
 {
     _service = new BuyServiceFake();
     _controller = new BuyController(_service);
 }
예제 #12
0
 public proxyDp(string userName, string password)
 {
     service = new BuyService();
 }
예제 #13
0
 public BuyController(IBuyService service)
 {
     _service = service;
 }
예제 #14
0
 public proxyDp(string userName, string password)
 {
     service = new BuyService();
 }