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