Beispiel #1
0
        public Result <List <Order> > ListOrder(SearchUnit model)
        {
            if (model.unit_id <= 0)
            {
                return(Result <List <Order> >(ApiResultEnum.Parameter_Error, null));
            }

            IEnumerable <Order> lst = new List <Order>();

            if (model.from_dt.Date < DateTime.Now.Date)
            {
                lst = lst.Union(OrderDA.List(model));
            }
            if (model.from_dt.Date <= DateTime.Now.Date && model.to_dt.Date >= DateTime.Now.Date)
            {
                lst = lst.Union(OrderRA.List4Unit(model.unit_id));
            }

            DataBiz.OrderMerge(ref lst);
            return(Result(lst.ToList()));
        }
Beispiel #2
0
        public Result <List <Order> > ListOrder(SearchOrderStatus model)
        {
            IEnumerable <Order> lst = new List <Order>();

            if (model.from_dt.Date < DateTime.Now.Date)
            {
                lst = lst.Union(OrderDA.List(model));
            }
            if (model.from_dt.Date <= DateTime.Now.Date && model.to_dt.Date >= DateTime.Now.Date)
            {
                if (model.status == OrderStatusEnum.Success)
                {
                    lst = lst.Union(OrderRA.List4In());
                }
                else
                {
                    lst = lst.Union(OrderRA.List4Failed(model));
                }
            }
            DataBiz.OrderMerge(ref lst);
            return(Result(lst.ToList()));
        }