public IActionResult History(DataSourceRequest command, string customerActionId) { var history = _customerActionService.GetAllCustomerActionHistory(customerActionId, pageIndex: command.Page - 1, pageSize: command.PageSize); var gridModel = new DataSourceResult { Data = history.Select(_customerActionViewModelService.PrepareHistoryModelForList), Total = history.TotalCount }; return(Json(gridModel)); }
public async Task<IActionResult> History(DataSourceRequest command, string customerActionId) { var history = await _customerActionService.GetAllCustomerActionHistory(customerActionId, pageIndex: command.Page - 1, pageSize: command.PageSize); var items = new List<SerializeCustomerActionHistory>(); foreach (var item in history) { items.Add(await _customerActionViewModelService.PrepareHistoryModelForList(item)); } var gridModel = new DataSourceResult { Data = items, Total = history.TotalCount }; return Json(gridModel); }
public async Task GetAllCustomerActionHistoryTest() { var actionHistory = await _customerActionService.GetAllCustomerActionHistory(""); Assert.IsTrue(actionHistory.Count == 0); }
public void GetAllCustomerActionHistoryTest() { var actionHistory = _customerActionService.GetAllCustomerActionHistory(""); Assert.IsTrue(actionHistory.Count == 0); }