private void lastFiveItems_Click(object sender, EventArgs e) { int uId = new UserService(Server).GetUserByLogin(transactionUser.Text); List<UserTransactionDTO> filteredList = new UserTransactionService(Server).GetLastUserTransactions(uId, 5); UserTransactions = filteredList; userTransactionList.DataSource = UserTransactions; }
private void sortTransactionsByMaxSum_Click(object sender, EventArgs e) { int uId = new UserService(Server).GetUserByLogin(transactionUser.Text); List<UserTransactionDTO> filteredList = new UserTransactionService(Server).GetUserTransactionsDescByMaxSum(uId); UserTransactions = filteredList; userTransactionList.DataSource = UserTransactions; }
void ClearUserTransactionEditForm() { int uId = new UserService(Server).GetUserByLogin(transactionUser.Text); UserTransactions = new UserTransactionService(Server).GetUserTransactions(uId); ClearEditForm(userTransactionForm); userTransactionList.DataSource = typeof(List<UserTransactionDTO>); userTransactionList.DataSource = UserTransactions; }