Ejemplo n.º 1
0
 public async Task AddList([FromBody] SavedFilterDto savedFilterDto)
 {
     try
     {
         _logger.Log(LoggingLevel.Info, "AddList started");
         await _savedFilterManager.AddSavedFilter(savedFilterDto);
     }
     catch (Exception ex)
     {
         _logger.Log(LoggingLevel.Error, "There was an error : ", ex);
     }
 }
Ejemplo n.º 2
0
        public async Task <ActionResult> AddList(string listName)
        {
            var token          = Session["token"].ToString();
            var userId         = int.Parse(Session["userId"].ToString());
            var count          = int.Parse(Session["countVal"].ToString());
            var datamartId     = int.Parse(Session["datamartId"].ToString());
            var savedFilterDto = new SavedFilterDto
            {
                ListName = listName,
                UserId   = userId,
                Count    = count,
                Datamart = datamartId
            };
            await caller.PostJsonWithAuthorization <SavedFilterDto>(apiMethods.ListsBaseUrl(), apiMethods.AddList, savedFilterDto, token);

            return(View("CompleteList"));
        }
 public async Task AddSavedFilter(SavedFilterDto savedFilterDto)
 {
     var savedFilter = _mapper.Map <SavedFilter>(savedFilterDto);
     await _repository.AddSavedFilter(savedFilter);
 }