예제 #1
0
        public bool AddTransaction(string paketId, LaunchPackageData transactionData)
        {
            try {
                Dictionary <string, LaunchPackageData> transactions = null;
                var transData = App.Locator.AccountService.Transactions;

                if (transData != null)
                {
                    transactions = JsonConvert.DeserializeObject <Dictionary <string, LaunchPackageData> >(transData);
                }
                else
                {
                    transactions = new Dictionary <string, LaunchPackageData>();
                }

                if (!transactions.ContainsKey(paketId))
                {
                    transactions.Add(paketId, transactionData);
                }

                transData = JsonConvert.SerializeObject(transactions);
                App.Locator.AccountService.Transactions = transData;

                return(true);
            } catch (Exception ex) {
                System.Diagnostics.Debug.WriteLine(ex);
                return(false);
            }
        }
예제 #2
0
        public bool AddTransaction(string paketId, string paymentTranscation)
        {
            var transData = new LaunchPackageData {
            };

            transData.LaunchPackageDetails = new LaunchPackageDetails();
            transData.LaunchPackageDetails.PaymentTransaction = paymentTranscation;

            return(AddTransaction(paketId, transData));
        }