Beispiel #1
0
        public List <CustomerForSelectionVwMdl> getCustomerList()
        {
            var result = new List <CustomerForSelectionVwMdl>();

            if (!Initialized)
            {
                return(result);
            }
            var customers = new GETCore.Classes.CustomerManagement().getListOfActiveCustomersForLoggedInUser(userTableId);

            return(customers.Select(m => new CustomerForSelectionVwMdl {
                Id = longNullableToint(m.customerId), Title = m.customerName
            }).ToList());
        }
Beispiel #2
0
        public List <CustomerForSelectionVwMdl> getCustomerListForSelection(int PageNo, int PageSize)
        {
            PageNo = PageNo <= 1 ? 0 : PageNo - 1;
            var result = new List <CustomerForSelectionVwMdl>();

            if (!Initialized)
            {
                return(result);
            }
            var customers = new GETCore.Classes.CustomerManagement().getListOfActiveCustomersForLoggedInUser(userTableId);

            return(customers.Select(m => new CustomerForSelectionVwMdl {
                Id = longNullableToint(m.customerId), Title = m.customerName
            }).GroupBy(m => m.Id).Select(m => m.First()).Skip(PageNo * PageSize).Take(PageSize).OrderBy(m => m.Title).ToList());
        }