예제 #1
0
파일: Trade.svc.cs 프로젝트: wshPrt/trading
        public Result <List <Order> > ListOrderCancellable(int unit_id)
        {
            if (unit_id <= 0)
            {
                return(Result <List <Order> >(ApiResultEnum.Parameter_Error, null));
            }

            IEnumerable <Order> lst = OrderRA.List4Unit(unit_id);

            lst = lst.Where(o => o.state_enum == OrderStatusEnum.Success && o.deal_count + o.cancel_count < o.count).ToList();
            DataBiz.OrderMerge(ref lst);
            return(Result(lst.ToList()));
        }
예제 #2
0
파일: Trade.svc.cs 프로젝트: wshPrt/trading
        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()));
        }