Пример #1
0
 public IDataResult <List <Order> > GetOrders(int customerId)
 {
     try
     {
         return(new SuccessDataResult <List <Order> >(_orderDal.GetList(o => o.CustomerId == customerId)));
     }
     catch (Exception)
     {
         return(new ErrorDataResult <List <Order> >(Messages.ErrorWhileGettingEntity));
     }
 }
Пример #2
0
 public IEnumerable <OrderOnListModel> GetList(string keyword, short status, short sourceType, short deliveryStatus, short orderType, DateTime?fromCreatedDate, DateTime?toCreatedDate, short requestType, out int totalRows, int?pageIndex = 1, int?pageSize = 15)
 {
     try
     {
         var result = new List <OrderOnListModel>();
         var lst    = _orderDal.GetList(keyword, status, sourceType, deliveryStatus, orderType, fromCreatedDate, toCreatedDate, requestType, out totalRows, pageIndex, pageSize);
         if (lst != null && lst.Any())
         {
             result = lst.Select(x => new OrderOnListModel(x)).ToList();
         }
         return(result);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         totalRows = 0;
         return(new List <OrderOnListModel>());
     }
 }
Пример #3
0
 public IList <Order> GetAll()
 {
     try
     {
         List <Order> list = _orderDal.GetList().ToList();
         return(list);
     }
     catch (Exception msg)
     {
         throw;
     }
 }
Пример #4
0
 public List <Order> GetAll()
 {
     return(_orderDal.GetList());
 }
Пример #5
0
 public List <Order> GetOrdersByUserId(string UserId)
 {
     return(_orderDal.GetList(o => o.UserId == UserId));
 }
 public List <Orders> GetAllInclude()
 {
     return(_orderDal.GetList());
 }
Пример #7
0
 public List <Order> GetOrder(string accountId)
 {
     return(_orderDal.GetList(a => a.AccountId == accountId));
 }
Пример #8
0
 public List <Order> GetByDateRange(DateTime startDate, DateTime endDate)
 {
     return(_orderDal.GetList(p => p.OrderDate < endDate && p.OrderDate > startDate).ToList());
 }