public void PopulateData() { int id = Int32.Parse(Session["id"].ToString()); tableCart.DataSource = CartHandler.GetCarts(id); tableCart.DataBind(); if (tableCart.DataSource != null) { grandTotalTxt.Text = CartHandler.GetGrandTotal(id).ToString(); } else { grandTotalTxt.Text = "0"; } }
public static int GetGrandTotal(int userId) { int total = CartHandler.GetGrandTotal(userId); return(total); }