private bool AddItemToCart(int title_id, string sku, int quantity, out AddResponse result)
    {
        result = AddResponse.Failure;

        bool success = false; //Duncan Working
        CartDB db = new CartDB();

        DataSet ds = db.CartProductGetBySKU(sku);
        if (ds == null) return false;

        bool is_bulk = false, is_student = false;

        using (DataTableReader data = ds.CreateDataReader())
        {
            while (data.Read())
            {
                is_bulk = data.GetInt32(data.GetOrdinal("IsBulk")) == 1;
                is_student = data.GetInt32(data.GetOrdinal("IsStudent")) == 1;
                break;
            }
        }

        if (is_bulk)
        {
            result |= AddResponse.Bulk;
            return false;
        }

        success = db.CartAddSKU(CurrentCart.CartId, sku, quantity);

        if (success)
        {
            result = AddResponse.Success;
        }

        if (is_student)
        {
            result |= AddResponse.Student;
        }

        return success;
    }
    private DataTable BuildDataSource(CartItem[] items)
    {
        DataTable dt = CreateDataSource();
        CartDB db = new CartDB();

        foreach (CartItem item in items)
        {
            string title = "", pubname = "", puburl = "";

            DataSet ds = db.CartProductGetBySKU(item.ProductSKU);
            if (ds != null)
            {
                using (DataTableReader dtr = ds.CreateDataReader())
                {
                    while (dtr.Read())
                    {

                        title = Helper.IsString(dtr.GetValue(dtr.GetOrdinal("Title")), "");

                        pubname = Helper.IsString(dtr.GetValue(dtr.GetOrdinal("PubName")), "");

                        puburl = Helper.IsString(dtr.GetValue(dtr.GetOrdinal("PubUrl")), "");
                    }
                    dtr.Close();
                }
            }

            DataRow row = dt.NewRow();
            row["CartItemId"] = item.CartItemId;
            row["ProductTitleId"] = item.ProductTitleId;
            row["ProductSKU"] = item.ProductSKU;
            row["Title"] = "<a href=\"product.aspx?p=" + item.ProductTitleId + "&s=" + item.ProductSKU + "\">" + title + "</a>";
            completeNames += title + "|";
            row["PubName"] = pubname;
            row["PubURL"] = puburl;
            row["Quantity"] = item.Quantity;
            completeQty += item.Quantity.ToString()+"|";
            row["UnitPrice"] = item.UnitPrice;
            row["SubTotal"] = item.SubTotal;
            row["UnitPriceDollar"] = Helper.Dollar(item.UnitPrice);
            row["SubTotalDollar"] = Helper.Dollar(item.SubTotal);
            dt.Rows.Add(row);
        }

        dt.AcceptChanges();
        return dt;
    }