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)); } }
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>()); } }
public IList <Order> GetAll() { try { List <Order> list = _orderDal.GetList().ToList(); return(list); } catch (Exception msg) { throw; } }
public List <Order> GetAll() { return(_orderDal.GetList()); }
public List <Order> GetOrdersByUserId(string UserId) { return(_orderDal.GetList(o => o.UserId == UserId)); }
public List <Orders> GetAllInclude() { return(_orderDal.GetList()); }
public List <Order> GetOrder(string accountId) { return(_orderDal.GetList(a => a.AccountId == accountId)); }
public List <Order> GetByDateRange(DateTime startDate, DateTime endDate) { return(_orderDal.GetList(p => p.OrderDate < endDate && p.OrderDate > startDate).ToList()); }