예제 #1
0
 public void RegisterCardService(CardServices service)
 {
     if (CardServiceData == null)
     {
         CardServiceData = service;
     }
 }
예제 #2
0
        private CardServices CreateCardService()
        {
            var userID  = Guid.Parse(User.Identity.GetUserId());
            var service = new CardServices(userID);

            return(service);
        }
예제 #3
0
        // GET: Section
        public ActionResult CardAction()
        {
            CardServices cardControl = new CardServices();
            var          card        = cardControl.cardDescription();

            return(PartialView("_CardView", card));
        }
예제 #4
0
        public void TestVerifyNotExists()
        {
            var          ExpectedResult = new ValidateResult();
            CardServices _Repo          = new CardServices();

            IEnumerator enumerator = KeyTestData.GetEnumerator();

            while (enumerator.MoveNext())
            {
                object            obj    = enumerator.Current;
                CardData4Test_key keydef = new CardData4Test_key();
                CardData4Test_key key    = (obj != null) ? ((CardData4Test_key)obj) : keydef;

                if (key.TestScenario == ScenarioTest.DoesNotExists)
                {
                    CardData4Test card = TestData[key];
                    ExpectedResult = new ValidateResult {
                        Result = card.ExpectedResult
                    };
                    CardInfo cardtest = CardInfo.Create(card.Name, card.CardNo, card.ExpDate);
                    var      Test     = _Repo.ValidateCardInfo(cardtest);

                    Assert.AreEqual(ExpectedResult.Result, Test.Result);
                }
            }
        }
예제 #5
0
        private async Task <DialogTurnResult> ShoesPricePromptAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
        {
            var productState = await UserProfileAccessor.GetAsync(stepContext.Context);

            var dc = stepContext.Context.Activity;
            var lowerCaseCategorie = productState.Categorie;

            //if (dc.Text.Equals("Sneakers") || dc.Text.Equals("Loafers") || dc.Text.Equals("Boots"))
            //{
            //    lowerCaseCategorie = dc.Text;
            //}

            if (string.IsNullOrWhiteSpace(productState.Categorie))
            {
                productState.Categorie = char.ToUpper(lowerCaseCategorie[0]) + lowerCaseCategorie.Substring(1);
                await UserProfileAccessor.SetAsync(stepContext.Context, productState);
            }

            if (productState.PriceMin == 0 && productState.PriceMax == 0)
            {
                return(await stepContext.PromptAsync(PricePrompt, CardServices.CardPrice()));
            }
            else
            {
                return(await stepContext.NextAsync());
            }
        }
예제 #6
0
        // GET: Card
        public ActionResult Index()
        {
            var userID  = Guid.Parse(User.Identity.GetUserId());
            var service = new CardServices(userID);
            var model   = service.GetCards();

            return(View(model));
        }
예제 #7
0
        public LoadController()
        {
            var accountServices     = new AccountServices();
            var cardServices        = new CardServices();
            var loanServices        = new LoanServices();
            var transactionServices = new TransactionServices();
            var transferServices    = new TransferServices(accountServices, cardServices, loanServices, transactionServices);

            loadServices = new LoadServices(transferServices, accountServices, cardServices, loanServices, transactionServices);
        }
예제 #8
0
        public void TestGetData()
        {
            var ExpectedResult = new CardInfo {
                CardNumber = "4567890123456789"
            };
            CardServices _Repo = new CardServices();
            var          Test  = _Repo.GetCardbyNumber("4567890123456789");

            Assert.AreEqual(ExpectedResult.CardNumber, Test.CardNumber);
        }
예제 #9
0
        public CardsController(CustomerService customerService,
                               AccountsService accountsService,
                               CardServices cardService,
                               PaymentsService transactionService,
                               //MetaDataService metaDataService,
                               UserManager <IdentityUser> userManager,
                               ILogger <CardsController> logger)

        {
            this.transactionService = transactionService;
            this.userManager        = userManager;
            this.cardService        = cardService;
            this.customerService    = customerService;
            this.accountsService    = accountsService;
            // this.metaDataService = metaDataService;
            this.logger = logger;
        }
예제 #10
0
        static void Main(string[] args)
        {
            var cardRepo         = new CardRepository();
            var cardServices     = new CardServices(cardRepo);
            var cardControl      = new CardsController(cardServices);
            var addCardPostModel = new AddCardToPlayerPostModel {
                CardsId = 2, PlayersId = 5
            };

            cardControl.AddCardsToPlayers(addCardPostModel);
            //var repository = new PlayerRepository();
            //var service = new PlayersService(repository);
            //var controller = new PleyersController(service);
            //var playersPostModel = new PlayersPostModel { Status = 2, Id = 5, MatchesId = 1 };
            //var updatePlayersPostModel = new UpdatePlayersPostModel
            //{
            //    Status = 2
            //};
            //controller.Update(updatePlayersPostModel);
        }
예제 #11
0
        public void DeleteWordClick(object sender, RoutedEventArgs e)
        {
            if (AllWords.SelectedIndex >= 0)
            {
                Words deleteWord = new Words();
                deleteWord = AllWords.SelectedItem as Words;
                cardServices.DeleteCard(deleteWord.Id);

                List <Colod> allColods    = colodServices.GetColod();
                Colod        currentColod = new Colod();
                currentColod = allColods
                               .Where(x => x.IsChecked == true)
                               .FirstOrDefault();

                cardServices = new CardServices();
                List <Words> requestCards = cardServices.GetCards(currentColod.Id);
                AllWords.ItemsSource = requestCards;
                colodServices.DeleteWordCount(currentColod.Id);
            }
        }
예제 #12
0
 public CardInfoController()
 {
     this._Repo = new CardServices();
 }
예제 #13
0
 internal Helper(AccountServices accountServices, CardServices cardServices, LoanServices loanServices)
 {
     this.accountServices = accountServices;
     this.cardServices    = cardServices;
     this.loanServices    = loanServices;
 }
 public CardController()
 {
     cardServices       = new CardServices();
     accountServices    = new AccountServices();
     linkedCardServices = new LinkedCardServices(accountServices);
 }
예제 #15
0
 public void Init()
 {
     cs = new CardServices();
 }
예제 #16
0
 public CardServicesTest()
 {
     cardService = new CardServices(GetRepository(), new MockLogger <CreditCard>());
 }