コード例 #1
0
ファイル: OrderRepair.cs プロジェクト: damoOnly/e-commerce
        private void WriteBackOrders()
        {
            DataTable dtOrders       = ShoppingProcessor.GetNoWriteBackOrders();
            int       count          = dtOrders.Rows.Count;
            string    orderId        = string.Empty;
            string    gatewayOrderId = string.Empty;
            DateTime  payDate;

            for (int i = 0; i < count; i++)
            {
                orderId        = dtOrders.Rows[i]["OrderId"].ToString();
                gatewayOrderId = dtOrders.Rows[i]["GatewayOrderId"].ToString();
                payDate        = DateTime.Parse(dtOrders.Rows[i]["PayDate"].ToString());
                OrderInfo orderInfo = ShoppingProcessor.GetOrderInfo(orderId);
                if (orderInfo != null)
                {
                    PayOrder(orderInfo);
                }
            }
        }