public IList <OrdersGoodsTmpInfo> Get_Orders_Carts(int Orders_ID) { IList <OrdersGoodsInfo> OrderGoods = MyOrders.GetGoodsListByOrderID(Orders_ID); OrdersGoodsTmpInfo cart; IList <OrdersGoodsTmpInfo> Cartinfos = null; if (OrderGoods != null) { Cartinfos = new List <OrdersGoodsTmpInfo>(); foreach (OrdersGoodsInfo goods in OrderGoods) { cart = new OrdersGoodsTmpInfo(); cart.Orders_Goods_ID = goods.Orders_Goods_ID; cart.Orders_Goods_BuyerID = goods.Orders_Goods_ID; cart.Orders_Goods_Amount = goods.Orders_Goods_Amount; cart.Orders_Goods_ParentID = goods.Orders_Goods_ParentID; cart.Orders_Goods_Product_BrandID = goods.Orders_Goods_Product_BrandID; cart.Orders_Goods_Product_CateID = goods.Orders_Goods_Product_CateID; cart.Orders_Goods_Product_ID = goods.Orders_Goods_Product_ID; cart.Orders_Goods_Product_IsFavor = goods.Orders_Goods_Product_IsFavor; cart.Orders_Goods_Product_Price = goods.Orders_Goods_Product_Price; cart.Orders_Goods_Type = goods.Orders_Goods_Type; Cartinfos.Add(cart); cart = null; } } return(Cartinfos); }
//获取合同附加订单(打印) public string GetPrintContractOrdersByContractsID(int Contract_ID) { string strHTML = ""; int i = 0; strHTML += "<table border=\"0\" width=\"100%\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>"; strHTML += "<table border=\"0\" width=\"608\" align=\"right\" class=\"list_tab\" style=\"border:1px solid #000000;\" cellpadding=\"0\" cellspacing=\"0\">"; strHTML += " <tr bgcolor=\"#ffffff\">"; strHTML += " <td align=\"center\" style=\"height:25px;\" width=\"50\">序号</td>"; strHTML += " <td align=\"center\">订单编号</td>"; strHTML += " <td align=\"center\">商品种类</td>"; strHTML += " <td align=\"center\">数量</td>"; strHTML += " <td align=\"center\">订单金额</td>"; strHTML += " <td align=\"center\">下单时间</td>"; strHTML += " </tr>"; int Goods_Amount = 0; double Goods_Sum = 0; IList <OrdersGoodsInfo> GoodsListAll = null; ContractInfo Contract = GetContractByID(Contract_ID); if (Contract != null) { IList <OrdersInfo> ordersinfos = MyOrders.GetOrderssByContractID(Contract_ID); if (ordersinfos != null) { foreach (OrdersInfo ordersinfo in ordersinfos) { Goods_Sum = 0; Goods_Amount = 0; i = i + 1; GoodsListAll = MyOrders.GetGoodsListByOrderID(ordersinfo.Orders_ID); if (GoodsListAll != null) { foreach (OrdersGoodsInfo good in GoodsListAll) { if ((good.Orders_Goods_ParentID == 0 && good.Orders_Goods_Type != 2) || good.Orders_Goods_ParentID > 0) { Goods_Amount = Goods_Amount + 1; Goods_Sum = Goods_Sum + good.Orders_Goods_Amount; } } } strHTML += " <tr bgcolor=\"#ffffff\">"; strHTML += " <td align=\"left\">" + i + "</td>"; strHTML += " <td align=\"left\">" + ordersinfo.Orders_SN + "</td>"; strHTML += " <td align=\"left\">" + Goods_Amount + "</td>"; strHTML += " <td align=\"left\">" + Goods_Sum + "</td>"; strHTML += " <td align=\"left\">" + Public_Class.DisplayCurrency(ordersinfo.Orders_Total_AllPrice) + "</td>"; strHTML += " <td align=\"left\">" + ordersinfo.Orders_Addtime + "</td>"; strHTML += " </tr>"; } } } strHTML += " </table></td></tr></table>"; return(strHTML); }