Exemple #1
0
 private protected override async Task GetDataAsync(int id)
 {
     PaymentCard card = await PaymentCardProcessor.GetCard(ApiHelper.ApiClient, id);
     if (card != null)
     {
         var decryptedCard = (PaymentCard)DecryptItem(card);
         PaymentCard = decryptedCard;
         _tempPaymentCard = (PaymentCard)decryptedCard.Clone();//store a temp card for future verifications
     }
     else
         await PageService.PushPopupAsync(new ErrorView(ErrorMsg.CouldNotGetItem(ItemType)));
 }
Exemple #2
0
        private protected override async Task <IEnumerable <Grouping <string, ItemPreview> > > RefreshPageAsync()
        {
            IEnumerable <Grouping <string, ItemPreview> > newList = await PaymentCardProcessor.GetPreviews(ApiHelper.ApiClient);

            return(newList);
        }
Exemple #3
0
        private protected override async Task GetDataAsync()
        {
            IEnumerable <Grouping <string, ItemPreview> > previews = await PaymentCardProcessor.GetPreviews(ApiHelper.ApiClient);

            DisplayItems(previews);
        }
Exemple #4
0
 private protected override async Task<DeleteCallStatus> DeleteAsync()
 {
     bool isSuccess = await PaymentCardProcessor.Delete(ApiHelper.ApiClient, PaymentCard.Id);
     return new DeleteCallStatus(isSuccess, PaymentCard.Id);
 }
Exemple #5
0
 private protected override async Task<ModifyCallStatus> ModifyAsync(int id)
 {
     var encryptedCard = (PaymentCard)EncryptItem(PaymentCard);
     bool isSuccess = await PaymentCardProcessor.Modify(ApiHelper.ApiClient, id, encryptedCard);
     return new ModifyCallStatus(isSuccess, _tempPaymentCard.Name != PaymentCard.Name, new ItemPreview(PaymentCard.Id, PaymentCard.Name, TypeOfItems.PaymentCard.ToSampleString(), TypeOfItems.PaymentCard));
 }
Exemple #6
0
 private protected override async Task<bool> CreateAsync()
 {
     var encryptedCard = (PaymentCard)EncryptItem(PaymentCard);
     bool isSuccess = await PaymentCardProcessor.CreateCard(ApiHelper.ApiClient, encryptedCard);
     return isSuccess;
 }