Example #1
0
        public JsonResult BarcodeStyleDropList(string filterExpression)
        {
            BarcodeStyleRepository rep = new BarcodeStyleRepository();

            if (HttpContext.Cache["BarcodeStyleDropList"] == null)
            {
                DataTable list = rep.GetDropListSource();
                HttpContext.Cache.Add("BarcodeStyleDropList", list, null, DateTime.Now.AddMinutes(5), TimeSpan.Zero, CacheItemPriority.High, null);
            }
            DataTable source = (DataTable)HttpContext.Cache["BarcodeStyleDropList"];

            filterExpression = DFT.HandleExpress(filterExpression);
            List <DropListSource> dropList = rep.DropList(source, filterExpression);

            return(DropListJson(dropList));
        }
Example #2
0
 public ListModel()
 {
     Repository = new BarcodeStyleRepository();
 }
 protected override IMasterFactory CreateRepository()
 {
     Repository = new BarcodeStyleRepository();
     return(new MasterRepositoryFactory <BarcodeStyleRepository>(Repository));
 }