Example #1
0
    private void BindDataListShoppingRar()
    {
        DataSet set = new CartInfo().GetShoppingCartList(userID);

        if (set.Tables.Count > 0)
        {
            if (set.Tables[0].Rows.Count > 0)
            {
                ddlBindIndexShoppingCartInfo.DataSource = set.Tables[0];
                ddlBindIndexShoppingCartInfo.DataBind();
            }
            else
            {
                Response.Write(WebUnitily.AlertUrl("您的购物车中还没有产品,不能进行结算", "UserCard.aspx"));
                Response.End();
            }

            decimal proMoneyTotal, freightTotal;

            proMoneyTotal = WebUnitily.CheckMoney(set.Tables[1].Rows[0]["MoneyTotle"].ToString());
            freightTotal  = WebUnitily.CheckMoney(set.Tables[1].Rows[0]["FreightTotal"].ToString());

            moneyTotal         = string.Format("{0:C2}", proMoneyTotal + freightTotal);
            txtMoneyTotal.Text = moneyTotal.ToString();
        }
    }