public HttpResponseMessage GetColorPaletteList(int pageIndex) { var databaseInteractionHandler = new DomainInstance(); var response = new HttpResponseMessage(); List <Tuple <ColorMapFilters, string> > filters = buildFilters <ColorMapFilters>(Request.GetQueryNameValuePairs()); response.Content = new StringContent( databaseInteractionHandler.GetColorPaletes( filters, pageIndex, ChosePaletteViewModel.ColorPalettesPerPage )?.JSONSerialize()); response.Content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"); return(response); }
public ActionResult GetColorPalettePage() { try { DomainInstance databaseInteractionHandler = new DomainInstance(); return(View("~/Views/Home/Points Settings Content/ChosePalette.cshtml", new ChosePaletteViewModel(databaseInteractionHandler.GetColorPaletes( new List <Tuple <Core.Database.ColorMapFilters, string> >() { new Tuple <Core.Database.ColorMapFilters, string>(Core.Database.ColorMapFilters.None, string.Empty) }, 0, ChosePaletteViewModel.ColorPalettesPerPage )))); } catch { return(View()); } }