public void Update(List <BLOrderDetail> products) { ProductsCart.DataSource = products; ProductsCart.DataBind(); UpdateSumCart(products); if (products == null || products.Count == 0) { ProductError.Text = "there is no products"; //error msg NumOfProducts.Text = ""; TotalPrice.Text = ""; return; } ProductError.Text = ""; }
public void Update(List <BLProduct> products) { ProductsCart.DataSource = products; Session["productsCart"] = products; ProductsCart.DataBind(); UpdateSumCart(products); if (products == null || products.Count == 0) { MSG.Text = "there is no products"; //error msg NumOfProducts.Text = ""; TotalPrice.Text = ""; return; } MSG.Text = ""; }
public void Update(List <BLOrderDetailsDB> orderDetails) { List <BLProduct> products = new List <BLProduct>(); if (orderDetails != null) { products.AddRange(orderDetails.Select(detail => BLProduct.GetProductById(detail.productId))); EmptyCart.Visible = true; } ProductsCart.DataSource = products; Session["orderDetails"] = orderDetails; ProductsCart.DataBind(); UpdateSumCart(orderDetails); if (orderDetails == null || orderDetails.Count == 0) { MSG.Text = "there is no products"; //error msg NumOfProducts.Text = ""; TotalPrice.Text = ""; OrderNow.Visible = false; return; } MSG.Text = ""; }