public CustomerListViewModel GetPaginatedCustomers(List <FilterValue> filters, int pageSize, int pageIndex, Guid idAccount)
        {
            var itemResult     = new CustomerListViewModel();
            var customers      = _customerDao.GetPaginatedCustomerList(filters, pageSize, pageIndex, idAccount);
            var countCustomers = _customerDao.GetPaginatedCustomersCount(filters, pageSize, pageIndex, idAccount);

            foreach (var customer in customers)
            {
                var cvm = new CustomerItemViewModel
                {
                    Code    = customer.Code,
                    Id      = customer.Id,
                    Contact = customer.Contact,
                    Email   = customer.Email,
                    Name    = customer.Name,
                    Phone   = customer.Phone,
                    Type    = customer.TypeCustomer.Name
                };
                itemResult.ItemsList.Add(cvm);
            }

            return(ConfigurePagination(itemResult, pageIndex, pageSize, filters, countCustomers));
        }
 public void Init(CustomerItemViewModel customerItem)
 {
 }
Exemplo n.º 3
0
 public void Execute(CustomerItemViewModel customer)
 {
 }