public async Task <ActionResult> List() { int year = CommonHelper.GetValue <int>(Request["year"], 0); int pgnum = CommonHelper.GetValue <int>(Request["pgnum"], 1); int pgsize = CommonHelper.GetValue <int>(Request["pgsize"], 0); string sortcolumn = CommonHelper.GetValue(Request["sortcolumn"], OvertimerateHelper.DEFAULT_SORT_COLUMN); string sortdir = CommonHelper.GetValue(Request["sortdir"], OvertimerateHelper.DEFAULT_SORT_DIR); Sort sort = new Sort(sortcolumn, sortdir); Dictionary <string, object> filters = new Dictionary <string, object> { { "year", year } }; ListModel <Overtimerate> l = null; if (year == 0) { l = await OvertimerateHelper.GetAll(pgnum, pgsize, sort); } else { l = await OvertimerateHelper.GetFilterBy(filters, pgnum, pgsize, sort); } return(View("_list", l)); }
// // GET: /Admin/OvertimeRate/ public async Task <ActionResult> Index() { ListModel <Overtimerate> l = null; l = await OvertimerateHelper.GetAll(); return(View(l)); }