public static int ReadOrderSendPoint(int id) { int num = 0; foreach (OrderDetailInfo info in OrderDetailBLL.ReadOrderDetailByOrder(id)) { num += info.SendPoint * info.BuyCount; } return(num); }
public static decimal ReadOrderProductPrice(int id) { decimal num = 0M; foreach (OrderDetailInfo info in OrderDetailBLL.ReadOrderDetailByOrder(id)) { num += info.ProductPrice * info.BuyCount; } return(num); }
public static decimal ReadOrderShippingMoney(OrderInfo order) { decimal shippingMoney = order.ShippingMoney; ShippingInfo info = ShippingBLL.ReadShippingCache(order.ShippingID); ShippingRegionInfo info2 = ShippingRegionBLL.SearchShippingRegion(order.ShippingID, order.RegionID); switch (info.ShippingType) { case 1: return(info2.FixedMoeny); case 2: { decimal num2 = 0M; foreach (OrderDetailInfo info3 in OrderDetailBLL.ReadOrderDetailByOrder(order.ID)) { num2 += info3.ProductWeight * info3.BuyCount; } if (num2 <= info.FirstWeight) { return(info2.FirstMoney); } return(info2.FirstMoney + (Math.Ceiling((decimal)((num2 - info.FirstWeight) / info.AgainWeight)) * info2.AgainMoney)); } case 3: { int num3 = 0; foreach (OrderDetailInfo info3 in OrderDetailBLL.ReadOrderDetailByOrder(order.ID)) { if (info3.FatherID == 0) { num3 += info3.BuyCount; } } return(info2.OneMoeny + ((num3 - 1) * info2.AnotherMoeny)); } } return(shippingMoney); }