/// <summary> /// ListAccountsByEmployee business method. /// </summary> /// <param name="startRowIndex">A startRowIndex value.</param> /// <param name="maximumRows">A maximumRows value.</param> /// <param name="sortExpression">A sortExpression value.</param> /// <param name="employee">A employee value.</param> /// <param name="category">A category value.</param> /// <param name="status">A status value.</param> /// <returns>Returns a List<Account> object.</returns> public List<Account> ListAccountsByEmployee(int maximumRows, int startRowIndex, string sortExpression, string employee, AccountCategories? category, AccountStatuses? status, out int totalRowCount) { List<Account> result = default(List<Account>); if (string.IsNullOrWhiteSpace(sortExpression)) sortExpression = "DateSubmitted DESC"; // Data access component declarations. var AccountDAC = new AccountDAL(); // Step 1 - Calling Select on AccountDAC. result = AccountDAC.Select(maximumRows, startRowIndex, sortExpression, employee, category, status); // Step 2 - Get count. totalRowCount = AccountDAC.Count(employee, category, status); return result; }