Esempio n. 1
0
    public HttpResponseMessage Get(string searchString, int pageIndex, int pageSizeSelected, string sortKey, string asc)
    {
        RestService service = new RestService();
        FatcaDTO    dto     = new FatcaDTO();

        dto = service.GetFatcaDTO(searchString, pageIndex, pageSizeSelected, sortKey, asc);

        HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, dto);

        return(response);
    }
Esempio n. 2
0
        public FatcaDTO GetFatcaDTO(string SearchString, int pageIndex, int pageSelected, string sortKey, string asc)
        {
            DataDAO dao = new DataDAO();

            FatcaDTO dto = new FatcaDTO
            {
                DataList  = dao.GetData(SearchString.Replace("undefined", ""), pageIndex, pageSelected, sortKey, asc),
                RowsCount = dao.GetRowsCount(SearchString)
            };

            //return JsonConvert.SerializeObject(dto, new JsonSerializerSettings() { DateFormatString = "dd.MM.yyyy" });

            return(dto);
        }