public List <BLManagerOrders> CompleteOrderList() { List <BLManagerOrders> OrderList = new List <BLManagerOrders>(); DAOClientOrders DaoOrder = new DAOClientOrders(); foreach (ClientOrder clientorder in DaoOrder.listOrder()) { BLManagerOrders Order = new BLManagerOrders(clientorder.OrderCode, clientorder.OrderState, clientorder.TotalPrice, clientorder.DateHourIn, clientorder.DeliveryAddress, clientorder.ClientEmail); OrderList.Add(Order); } return(OrderList); }
public List <BLManagerOrders> ListByDate(DateTime Initialdate, DateTime finalDate) { List <BLManagerOrders> ListDate = new List <BLManagerOrders>(); DAOClientOrders DaoOrder = new DAOClientOrders(); foreach (ClientOrder clientorder in DaoOrder.listOrder()) { if ((clientorder.DateHourIn >= Initialdate) && (clientorder.DateHourOut <= finalDate)) { BLManagerOrders Order = new BLManagerOrders(clientorder.OrderCode, clientorder.OrderState, clientorder.TotalPrice, clientorder.DateHourIn, clientorder.DeliveryAddress, clientorder.ClientEmail); ListDate.Add(Order); } } return(ListDate); }
public List <BLManagerOrders> ListByOrderStatus(string status) { List <BLManagerOrders> ListByStatus = new List <BLManagerOrders>(); DAOClientOrders DaoOrder = new DAOClientOrders(); foreach (ClientOrder clientorder in DaoOrder.listOrder()) { if (clientorder.OrderState.Equals(status)) { BLManagerOrders Order = new BLManagerOrders(clientorder.OrderCode, clientorder.OrderState, clientorder.TotalPrice, clientorder.DateHourIn, clientorder.DeliveryAddress, clientorder.ClientEmail); ListByStatus.Add(Order); } } return(ListByStatus); }