public SalesOrderDataObjectList GetSalesOrdersForUser(Guid userID)
        {
            var user        = _userRepository.GetByKey(userID);
            var salesOrders = _salesOrderRepository.FindSalesOrdersByUser(user);
            var salesOrderDataObjectList = new SalesOrderDataObjectList();

            salesOrderDataObjectList.AddRange(salesOrders.Select(Mapper.Map <SalesOrder, SalesOrderDataObject>));
            return(salesOrderDataObjectList);
        }
        public SalesOrderDataObjectList GetAllSalesOrders()
        {
            var salesOrders = salesOrderRepository.FindAll(sort => sort.DateCreated, SortOrder.Descending);
            var result      = new SalesOrderDataObjectList();

            salesOrders
            .ToList()
            .ForEach(p => result.Add(Mapper.Map <SalesOrder, SalesOrderDataObject>(p)));
            return(result);
        }
        public SalesOrderDataObjectList GetSalesOrdersForUser(Guid userID)
        {
            var user        = userRepository.GetByKey(userID);
            var salesOrders = salesOrderRepository.FindSalesOrdersByUser(user);
            var salesOrderDataObjectList = new SalesOrderDataObjectList();

            foreach (var salesOrder in salesOrders)
            {
                salesOrderDataObjectList.Add(Mapper.Map <SalesOrder, SalesOrderDataObject>(salesOrder));
            }
            return(salesOrderDataObjectList);
        }
        public SalesOrderDataObjectList GetSalesOrders(string userName)
        {
            User user        = _userRepository.GetUserByName(userName);
            var  salesOrders = user.SalesOrders;
            var  result      = new SalesOrderDataObjectList();

            if (salesOrders != null)
            {
                result.AddRange(salesOrders.Select(Mapper.Map <SalesOrder, SalesOrderDataObject>));
            }
            return(result);
        }
        public SalesOrderDataObjectList GetSalesOrders(string userName)
        {
            User user        = userRepository.GetUserByName(userName);
            var  salesOrders = user.SalesOrders;
            SalesOrderDataObjectList result = new SalesOrderDataObjectList();

            if (salesOrders != null)
            {
                foreach (var so in salesOrders)
                {
                    result.Add(Mapper.Map <SalesOrder, SalesOrderDataObject>(so));
                }
            }
            return(result);
        }
 public SalesOrderDataObjectList GetAllSalesOrders()
 {
     var salesOrders = _salesOrderRepository.FindAll(sort => sort.DateCreated, SortOrder.Descending);
     var result = new SalesOrderDataObjectList();
     salesOrders
         .ToList()
         .ForEach(p => result.Add(Mapper.Map<SalesOrder, SalesOrderDataObject>(p)));
     return result;
 }
 public SalesOrderDataObjectList GetSalesOrdersForUser(Guid userID)
 {
     var user = _userRepository.GetByKey(userID);
     var salesOrders = _salesOrderRepository.FindSalesOrdersByUser(user);
     var salesOrderDataObjectList = new SalesOrderDataObjectList();
     salesOrderDataObjectList.AddRange(salesOrders.Select(Mapper.Map<SalesOrder, SalesOrderDataObject>));
     return salesOrderDataObjectList;
 }
Esempio n. 8
0
 public SalesOrderDataObjectList GetSalesOrdersForUser(Guid userID)
 {
     var user = userRepository.GetByKey(userID);
     var salesOrders = salesOrderRepository.FindSalesOrdersByUser(user);
     var salesOrderDataObjectList = new SalesOrderDataObjectList();
     foreach (var salesOrder in salesOrders)
         salesOrderDataObjectList.Add(Mapper.Map<SalesOrder, SalesOrderDataObject>(salesOrder));
     return salesOrderDataObjectList;
 }
Esempio n. 9
0
 public SalesOrderDataObjectList GetSalesOrders(string userName)
 {
     User user = userRepository.GetUserByName(userName);
     var salesOrders = user.SalesOrders;
     SalesOrderDataObjectList result = new SalesOrderDataObjectList();
     if (salesOrders != null)
     {
         foreach (var so in salesOrders)
         {
             result.Add(Mapper.Map<SalesOrder, SalesOrderDataObject>(so));
         }
     }
     return result;
 }
 public SalesOrderDataObjectList GetSalesOrders(string userName)
 {
     User user = _userRepository.GetUserByName(userName);
     var salesOrders = user.SalesOrders;
     var result = new SalesOrderDataObjectList();
     if (salesOrders != null)
     {
         result.AddRange(salesOrders.Select(Mapper.Map<SalesOrder, SalesOrderDataObject>));
     }
     return result;
 }