예제 #1
0
        // GET: ExpenseReports
        public IActionResult Index(string searchString)
        {
            var reports = expDataAccess.GetAllExpenses().ToList();

            if (!string.IsNullOrEmpty(searchString))
            {
                reports = expDataAccess.GetSearchResult(searchString).ToList();
            }
            return(View(reports));
        }
        public IActionResult Index(string searchstring)
        {
            List <ExpenseReport> lstEmployee = new List <ExpenseReport>();

            lstEmployee = expensesDataAccessLayer.GetAllExpenses().ToList();

            if (!String.IsNullOrEmpty(searchstring))
            {
                lstEmployee = expensesDataAccessLayer.SearchExpenses(searchstring).ToList();
            }
            return(View(lstEmployee));
        }