예제 #1
0
 public static void GetAutoBatchOrdersIdList()
 {
     System.Data.DataSet autoBatchOrdersIdList = new OrderDao().GetAutoBatchOrdersIdList();
     if (autoBatchOrdersIdList.Tables.Count == 2)
     {
         System.Data.DataTable dataTable = autoBatchOrdersIdList.Tables[0];
         for (int i = 0; i < dataTable.Rows.Count; i++)
         {
             OrderInfo    orderInfo    = new OrderDao().GetOrderInfo(dataTable.Rows[i]["OrderID"].ToString());
             LineItemInfo lineItemInfo = new LineItemInfo();
             Dictionary <string, LineItemInfo> lineItems = orderInfo.LineItems;
             orderInfo.CloseReason = "到期自动关闭";
             MemberProcessor.CancelOrder(orderInfo);
         }
         dataTable = autoBatchOrdersIdList.Tables[1];
         for (int i = 0; i < dataTable.Rows.Count; i++)
         {
             OrderInfo orderInfo = new OrderDao().GetOrderInfo(dataTable.Rows[i]["OrderID"].ToString());
             Dictionary <string, LineItemInfo> lineItems = orderInfo.LineItems;
             LineItemInfo lineItemInfo = new LineItemInfo();
             orderInfo.CloseReason = "订单自动完成";
             if (MemberProcessor.ConfirmOrderFinish(orderInfo))
             {
                 DistributorsBrower.UpdateCalculationCommission(orderInfo);
                 foreach (LineItemInfo current in orderInfo.LineItems.Values)
                 {
                     if (current.OrderItemsStatus.ToString() == OrderStatus.SellerAlreadySent.ToString())
                     {
                         ShoppingProcessor.UpdateOrderGoodStatu(orderInfo.OrderId, current.SkuId, 5, current.ID);
                     }
                 }
             }
         }
     }
 }
예제 #2
0
        public static void GetAutoBatchOrdersIdList()
        {
            DataSet autoBatchOrdersIdList = new OrderDao().GetAutoBatchOrdersIdList();

            if (autoBatchOrdersIdList.Tables.Count == 2)
            {
                DataTable table = autoBatchOrdersIdList.Tables[0];
                OrderInfo order = null;
                for (int i = 0; i < table.Rows.Count; i++)
                {
                    order = new OrderDao().GetOrderInfo(table.Rows[i]["OrderID"].ToString());
                    new LineItemInfo();
                    Dictionary <string, LineItemInfo> lineItems = order.LineItems;
                    order.CloseReason = "到期自动关闭";
                    CancelOrder(order);
                }
                table = autoBatchOrdersIdList.Tables[1];
                for (int j = 0; j < table.Rows.Count; j++)
                {
                    order = new OrderDao().GetOrderInfo(table.Rows[j]["OrderID"].ToString());
                    Dictionary <string, LineItemInfo> dictionary2 = order.LineItems;
                    new LineItemInfo();
                    order.CloseReason = "订单自动完成";
                    if (ConfirmOrderFinish(order))
                    {
                        DistributorsBrower.UpdateCalculationCommission(order);
                        foreach (LineItemInfo info2 in order.LineItems.Values)
                        {
                            if (info2.OrderItemsStatus.ToString() == OrderStatus.SellerAlreadySent.ToString())
                            {
                                ShoppingProcessor.UpdateOrderGoodStatu(order.OrderId, info2.SkuId, 5, info2.ID);
                            }
                        }
                    }
                }
            }
        }