Beispiel #1
0
 public NBPController()
     : base()
 {
     this.context = new BankContext();
     //disable creating of proxies
     (context as BankContext).Configuration.ProxyCreationEnabled = false;
     NBPReader = new NBPXMLReader();
 }
Beispiel #2
0
 public BankUow(IBankContext context, IRepositoryProvider repositoryProvider) : base(context, repositoryProvider)
 {
 }
Beispiel #3
0
 public NBPController(IBankContext context)
     : this(context,new NBPXMLReader())
 {
 }
Beispiel #4
0
 protected BaseBankContextController(IBankContext dbContext)
 {
     this.DbContext = dbContext;
 }
Beispiel #5
0
 public NBPController(IBankContext context, INBPReader NBPReader)
 {
     this.context = context;
     this.NBPReader = NBPReader;
 }
Beispiel #6
0
 public AccountsController(IBankContext context)
 {
     _context = context;
 }
 public BankWorkerService(IBankContext context)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
 }
 public BankAccountsController(IBankContext dbContext)
     : base(dbContext)
 {
 }
Beispiel #9
0
        public void Setup(IBankContext context)
        {
            var product = resourceService.GetBankProduct(productId);

            if (product == null)
            {
                throw new UnityException($"dont exists product with id {productId}");
            }

            ButtonState buttonState = null;

            if (product.isBest || product.isPopular)
            {
                buttonState = context.BestButtonState;
            }
            else if (product.price.type == Data.MoneyType.gold)
            {
                buttonState = context.GoldButtonState;
            }
            else
            {
                buttonState = context.SilverButtonState;
            }

            if (buttonState != null)
            {
                SpriteState spriteState = new SpriteState {
                    disabledSprite    = buttonState.disabledSprite,
                    highlightedSprite = buttonState.highlightSprite,
                    pressedSprite     = buttonState.activeSprite
                };
                buyButton.spriteState          = spriteState;
                buyButton.image.overrideSprite = buttonState.normalSprite;
                buyButton.image.sprite         = buttonState.normalSprite;
            }



            priceImage.overrideSprite = resourceService.GetPriceSprite(product.price);

            if (product.isBest)
            {
                bestImage.ActivateSelf();
                popularImage.DeactivateSelf();
            }
            else if (product.isPopular)
            {
                popularImage.ActivateSelf();
                bestImage.DeactivateSelf();
            }
            else
            {
                popularImage.DeactivateSelf();
                bestImage.DeactivateSelf();
            }

            string countString = product.price.price.ToString();

            if (product.bonus > 0)
            {
                countString += $" + {product.bonus}";
            }
            countText.text = countString;

            if (engine.GetService <IOfferService>().IsBankOfferActive)
            {
                bonusPan.ActivateSelf();
            }
            else
            {
                bonusPan.DeactivateSelf();
            }

            priceText.text = $"{product.realPrice}$";

            buyButton.SetListener(() => {
                engine.GetService <IPurchaseService>().PurchaseProduct(product);
            }, engine.GetService <IAudioService>());
        }
 // GET: api/Transactions
 public TransactionsController(IBankContext dbContext)
     : base(dbContext)
 {
 }
Beispiel #11
0
 public WorkingBankRepo(IBankContext context)
 {
     this.BContext = context;
 }
Beispiel #12
0
 public WorkingBankRepo()
 {
     this.BContext = new BankContext();
 }