async private void showMore(Payee item) { ///Apo edw ksekiname ///Exei ftiaxtei class wste na perasoun oi ksexwristes ///plirofoies Tag kai Transaction se ena. PayeeDetailsData pdd = new PayeeDetailsData(); // 1) pdd.Payee = item; ///eisagwgh tou Payee ObservableCollection <Transaction> Transactions; Transactions = new retrieveDataFromXML().GetTransactions(); List <Transaction> PayeeTransactions = new List <Transaction>(); Console.WriteLine("Transactions =>" + Transactions.Count); foreach (var trans in Transactions) { Console.WriteLine("trans.Splits =>" + trans.Splits.Count); foreach (var splits in trans.Splits) { /// Using if, we get the transaction // with the payee id that we're looking for. // Once we find it, get the transaction // and go to the next one (NOT Payee) if (splits.Payee == item.Id) { PayeeTransactions.Add(trans); break; } } } // 2) pdd.PayeeTransactionsList = PayeeTransactions; ///eisagwgh tou Transaction //Console.WriteLine("pdd =>" + pdd.ToString()); // Sending the data to a new Page. await Navigation.PushAsync(new PayeeMore(pdd)); ///apostolh twn pliroforiwn stin selida }
async private void showMore(Tag item) { ///Apo edw ksekiname ///Exei ftiaxtei class wste na perasoun oi ksexwristes ///plirofoies Tag kai Transaction se ena. TagDetailsData tdd = new TagDetailsData(); // 1) tdd.Tag = item; ///eisagwgh tou Tag ObservableCollection <Transaction> Transactions; Transactions = new retrieveDataFromXML().GetTransactions(); List <Transaction> TransactionsWithTag = new List <Transaction>(); foreach (var trans in Transactions) { foreach (var splits in trans.Splits) { foreach (var tags in splits.Tag) { /// Using this if, we get the transactions /// with the tag, that we're looking for. if (tags.Id == tdd.Tag.Id) { TransactionsWithTag.Add(trans); } } } } // 2) tdd.TagTransactionsList = TransactionsWithTag; ///eisagwgh tou Transaction /// Sending the data to a new Page. await Navigation.PushAsync(new TagMore(tdd)); ///apostolh twn pliroforiwn stin selida }