/// <summary> /// The same as fillWithTransactionsType, the only difference here is that the search is only on the user. /// </summary> /// <param name="accountNumber"> The accountNumber is used to identify which person the admin wants to find </param> public void fillWithTransactionsAccount(string accountNumber) { TransactionGrid.Items.Clear(); Cryptobankservice.CryptoBankServiceSoapClient cssc = new Cryptobankservice.CryptoBankServiceSoapClient(); Cryptobankservice.TransactionModel[] transactions = cssc.AllTransactions(accountNumber); for (var i = 0; i < transactions.Length; i++) { var data = new TransactionData { date = transactions[i].date, type = transactions[i].transactiontype, sender = transactions[i].sender, receiver = transactions[i].receiver, amount = transactions[i].amount }; TransactionGrid.Items.Add(data); data = null; } }
/// <summary> /// This method fills the data grid with transactions. /// The moment this method is run all the transactions will be searched through to find the transactions that have the right type and user. /// </summary> /// <param name="type"> The type is used to identify which transactions the admin wants to find </param> /// /// <param name="accountNumber"> The accountNumber is used to identify which person the admin wants to find </param> public void fillWithTransactionsType(string type, string accountNumber) { TransactionGrid.Items.Clear(); Cryptobankservice.CryptoBankServiceSoapClient cssc = new Cryptobankservice.CryptoBankServiceSoapClient(); Cryptobankservice.TransactionModel[] transactions = cssc.TransactionsPerType(type, accountNumber); for (var i = 0; i < transactions.Length; i++) { var data = new TransactionData { date = transactions[i].date, type = transactions[i].transactiontype, sender = transactions[i].sender, receiver = transactions[i].receiver, amount = transactions[i].amount }; TransactionGrid.Items.Add(data); data = null; } }