예제 #1
0
        public JsonResult GetCatalogData(DataTableFilter dtFilter, CatalogFilter filter)
        {
            var data = DTOCatalog.MapToDTO(new CatalogRepository().GetData(dtFilter, filter));

            return(Json(new {
                recordsTotal = data.Count,
                recordsFiltered = data.Count,
                data = data.Data
            }, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public JsonResult GetCatalog(int id)
        {
            var data = DTOCatalog.MapToDTO(new CatalogRepository().GetIndividual(id));

            return(Json(data));
        }