private IList<Invoices> GetSearchInvoiceList() { InvoicesRepository repo = new InvoicesRepository(); IList<Invoices> list = new List<Invoices>(); if (!string.IsNullOrEmpty(Request.QueryString["type"]) && Request.QueryString["type"] == "search") { InvoicesSearchCriteria criteria = GetSearchCriteria(); list = repo.SearchInvoicesWithoutPage(criteria); } else if (!string.IsNullOrEmpty(Request.QueryString["type"]) && Request.QueryString["type"] == "future") { list = repo.GetFutureInvoices(int.Parse(WebConfig.FirstNumberFutureInvoice)); } else if (!string.IsNullOrEmpty(Request.QueryString["CompanyId"])) { int companyID = int.Parse(Request.QueryString["CompanyId"]); list = repo.GetUnpaidInvoicesOfCompany(companyID, false); } return list; }