Ejemplo n.º 1
0
        public async Task <object> GetCustomerByGroup(string group)
        {
            //List<object> Groups = await customergroupRepository.GetCustomerGroupByGroup(group);
            //return Ok(Groups);
            List <CustomerGroup> list = await customergroupRepository.GetCustomerGroups();

            var customerilist = list.Where(item => item.Group == group).Select(item => item.Customer).Distinct();

            return(Ok(customerilist));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Lấy tất cả danh sách nhóm khách hàng.
        /// </summary>
        /// <returns>Danh sách nhóm khách hàng.</returns>
        public IEnumerable <CustomerGroup> GetCustomerGroups()
        {
            var customerGroups = _customerGroupRepository.GetCustomerGroups();

            return(customerGroups);
        }
Ejemplo n.º 3
0
        public async Task <object> GetCustomerGroup()
        {
            List <CustomerGroup> list = await customergroupRepository.GetCustomerGroups();

            return(Ok(list));
        }