public async Task GetCustomerActionsTest()
        {
            var actions = await _customerActionService.GetCustomerActions();

            Assert.IsNotNull(actions);
            Assert.IsTrue(actions.Count > 0);
        }
Beispiel #2
0
        public void GetCustomerActionsTest()
        {
            var actions = _customerActionService.GetCustomerActions();

            Assert.IsNotNull(actions);
            Assert.IsTrue(actions.Count > 0);
        }
 public async Task<IActionResult> List(DataSourceRequest command)
 {
     var customeractions = await _customerActionService.GetCustomerActions();
     var actions = await _customerActionService.GetCustomerActionType();
     var gridModel = new DataSourceResult
     {
         Data = customeractions.Select(x => new { Id = x.Id, Name = x.Name, Active = x.Active, ActionType = actions.FirstOrDefault(y=>y.Id == x.ActionTypeId)?.Name }),
         Total = customeractions.Count()
     };
     return Json(gridModel);
 }
Beispiel #4
0
        public IActionResult List(DataSourceRequest command)
        {
            var customeractions = _customerActionService.GetCustomerActions();
            var gridModel       = new DataSourceResult
            {
                Data  = customeractions.Select(x => new { Id = x.Id, Name = x.Name, Active = x.Active, ActionType = _customerActionService.GetCustomerActionTypeById(x.ActionTypeId).Name }),
                Total = customeractions.Count()
            };

            return(Json(gridModel));
        }