合并行权查询并且将认沽行权和认购行权合并

这边仅仅将control层的代码贴出来。

   public List<IntradayOrderViewModel> GetIntrdayOptionExercises(string customerCode, string customerAccountCode)
        {
            IntradayOptionOrderArguments arguments = new IntradayOptionOrderArguments
            {
                CustomerCode = customerCode,
                CustomerAccountCode = customerAccountCode,
                StockBusiness="406"
                                
            };
            List<IntradayOptionOrderInformation> orders = _orderManager.GetIntradayOptionExercises(arguments);

            IntradayOptionOrderArguments arguments2 = new IntradayOptionOrderArguments
            {
                CustomerCode = customerCode,
                CustomerAccountCode = customerAccountCode,
                StockBusiness = "407"

            };
            List<IntradayOptionOrderInformation> orders2 = _orderManager.GetIntradayOptionExercises(arguments2);

            List<IntradayOptionOrderInformation> ordersMerged = orders.Concat(orders2).ToList();

            var ordersMergedSort = from c in ordersMerged
                    orderby c.OrderTime descending
                                   select c;
            List<IntradayOptionOrderInformation> lst = ordersMergedSort.ToList();                                               
            List<IntradayOrderViewModel> results =
                Mapper.Map<List<IntradayOptionOrderInformation>, List<IntradayOrderViewModel>>(lst);

            return results;
        }


你可能感兴趣的:(合并行权查询并且将认沽行权和认购行权合并)