예제 #1
0
        public virtual ActionResult GetOpenBox([DataSourceRequest] DataSourceRequest request, long styleId)
        {
            LogI("GetOpenBox, styleId=" + styleId);

            var items = OpenBoxViewModel.GetAll(Db,
                                                styleId,
                                                includeArchive: AccessManager.IsAdmin).ToList();
            var dataSource = items.ToDataSourceResult(request);

            return(new JsonResult {
                Data = dataSource, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
예제 #2
0
        public virtual ActionResult GetAll([DataSourceRequest] DataSourceRequest request)
        {
            LogI("GetOpenBox");

            var items = OpenBoxViewModel.GetAll(Db,
                                                null,
                                                includeArchive: true).ToList();

            var data = new GridResponse <OpenBoxViewModel>(items, items.Count, Time.GetAppNowTime());

            return(new JsonResult {
                Data = data, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }