public void RegisterCardService(CardServices service) { if (CardServiceData == null) { CardServiceData = service; } }
private CardServices CreateCardService() { var userID = Guid.Parse(User.Identity.GetUserId()); var service = new CardServices(userID); return(service); }
// GET: Section public ActionResult CardAction() { CardServices cardControl = new CardServices(); var card = cardControl.cardDescription(); return(PartialView("_CardView", card)); }
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); } } }
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()); } }
// GET: Card public ActionResult Index() { var userID = Guid.Parse(User.Identity.GetUserId()); var service = new CardServices(userID); var model = service.GetCards(); return(View(model)); }
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); }
public void TestGetData() { var ExpectedResult = new CardInfo { CardNumber = "4567890123456789" }; CardServices _Repo = new CardServices(); var Test = _Repo.GetCardbyNumber("4567890123456789"); Assert.AreEqual(ExpectedResult.CardNumber, Test.CardNumber); }
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; }
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); }
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); } }
public CardInfoController() { this._Repo = new CardServices(); }
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); }
public void Init() { cs = new CardServices(); }
public CardServicesTest() { cardService = new CardServices(GetRepository(), new MockLogger <CreditCard>()); }