#region Get Cart
if (Session["MyCart"] != null)
{
if (Session["MyCart"].GetType().Name.StartsWith("List"))
{
cart = (List<Cart>)Session["MyCart"];
}
}
city.ShippingCharges = Common.ConvertToDecimal(ordersAddress.ShippingCity);
liCity = (from sc in liCity where sc.ShippingCharges.Equals(city.ShippingCharges)select sc).ToList();
//liCity = (from sc in liCity where sc.Name.Equals(ordersAddress.ShippingCity) && sc.StateID.Equals(ordersAddress.ShippingStateID) select sc).ToList();
int TotalItem = 0;
foreach (Cart c in cart)
{
TotalItem = TotalItem + c.Quantity;
c.ShippingCharges = (Single)(c.Quantity * (decimal)liCity[0].ShippingCharges);
c.NetAmount = ((c.Amount - c.PromotionAmount) + c.TaxAmount1 + c.TaxAmount2 + (Single)(liCity[0].ShippingCharges) + c.HandlingCharges);
}
#endregion Get Cart
yatin chauhan 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.