// Ajax: Manufacturers by filters
        public ActionResult List()
        {
            var result = PopulateService.PopulateByFilters <ManufacturerListViewModel>(
                _context.Manufacturers.ProjectTo <ManufacturerListViewModel>(),
                Request.Params,
                typeof(ManufacturerListViewModel).GetProperties().Where(p => !p.GetCustomAttributes(false).Any(a => a is HiddenInputAttribute)).ToArray());

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        // Ajax: ShopTypes by filters
        public ActionResult List(jQueryDataTableParamModel param)
        {
            var result = PopulateService.PopulateByFilters <ShopTypeListViewModel>(
                _context.ShopTypes.ProjectTo <ShopTypeListViewModel>(),
                Request.Params,
                typeof(ShopTypeListViewModel).GetProperties().Where(p => !p.GetCustomAttributes(false).Any(a => a is HiddenInputAttribute)).ToArray());

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
        // Ajax: Users by filters
        public ActionResult List(jQueryDataTableParamModel param)
        {
            var result = PopulateService.PopulateByFilters <UserListViewModel>(
                _context.DomainUsers.Where(p => !p.Deleted).ProjectTo <UserListViewModel>(),
                Request.Params,
                typeof(UserListViewModel).GetProperties().Where(p => !p.GetCustomAttributes(false).Any(a => a is HiddenInputAttribute)).ToArray());

            foreach (var user in result.data)
            {
                user.StringCreationDate = user.CreationDate.ToString("dd/MM/yyyy");
            }

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Beispiel #4
0
        // Ajax: Users by filters
        public ActionResult List()
        {
            var result = PopulateService.PopulateByFilters(
                _context.ProductInShops.ProjectTo <ProductInShopListViewModel>(),
                Request.Params,
                typeof(ProductInShopListViewModel).GetProperties().Where(p => !p.GetCustomAttributes(false).Any(a => a is HiddenInputAttribute)).ToArray());

            foreach (var user in result.data)
            {
                user.StringCreationDate = user.CreationDate.ToString("dd/MM/yyyy");
            }

            return(Json(result, JsonRequestBehavior.AllowGet));
        }