public JsonResult FiscalPeriodDropList(string filterExpression) { FiscalPeriodRepository rep = new FiscalPeriodRepository(); if (HttpContext.Cache["FiscalPeriodDropList"] == null) { DataTable list = rep.GetDropListSource(); HttpContext.Cache.Add("FiscalPeriodDropList", list, null, DateTime.Now.AddMinutes(5), TimeSpan.Zero, CacheItemPriority.High, null); } DataTable source = (DataTable)HttpContext.Cache["FiscalPeriodDropList"]; filterExpression = DFT.HandleExpress(filterExpression); List <DropListSource> dropList = rep.DropList(source, filterExpression); return(DropListJson(dropList)); }
public ListModel() { Repository = new FiscalPeriodRepository(); }
protected override IMasterFactory CreateRepository() { Repository = new FiscalPeriodRepository(); return(new MasterRepositoryFactory <FiscalPeriodRepository>(Repository)); }