Esempio n. 1
0
        public JsonResult Get(DatatableModel dt, NotificationModel filters)
        {
            try
            {
                NotificationServices service = new NotificationServices();
                PagerModel           pager   = dt.ToPager();
                var collection = service.Get(pager, filters);

                return(Json(new
                {
                    status = UI.Status.Success,
                    sEcho = dt.sEcho,
                    iTotalRecords = pager.TotalRecords,
                    iTotalDisplayRecords = pager.TotalRecords,
                    aaData = collection
                }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(new JsonResult
                {
                    Data = new { status = UI.Status.Error, data = ex.Message },
                });
            }
        }