| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 706 人关注过本帖
标题:求助 '=' 附近有语法错误
只看楼主 加入收藏
编程学者989
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-4-30
结帖率:0
收藏
已结贴  问题点数:20 回复次数:5 
求助 '=' 附近有语法错误
图片附件: 游客没有浏览图片的权限,请 登录注册

购物车中去付款的代码:
protected void Button1_Click(object sender, EventArgs e)
        {

            Maticsoft.BLL.ShoppingCart cart = Session["ShoppingCart"] as Maticsoft.BLL.ShoppingCart;
            if (cart != null)
            {
                Maticsoft.Model.Users user = Session["user"] as Maticsoft.Model.Users;
                Maticsoft.BLL.Order orders = new Maticsoft.BLL.Order();
                if (user != null)
                {
                    string strWhere = string.Format("Uid={0}", user.id);
                    Maticsoft.BLL.Site siteBll = new Maticsoft.BLL.Site();

                    List<Maticsoft.Model.Site> userSiteList = siteBll.GetModelList(strWhere);

                    if (RadioButtonList1.SelectedIndex > -1)
                    {
                        int i = RadioButtonList1.SelectedIndex;
                        string nameStr = userSiteList[i].ReceiverName;
                        string phoneStr = userSiteList[i].Phone;
                        string addressStr = userSiteList[i].Address;
                        int j = DropDownList1.SelectedIndex;
                        int fight;
                        string express;
                        if (j == 0)
                        {
                            fight = 5;
                            express = "快递";
                        }
                        else if (j == 1)
                        {
                            fight = 10;
                            express = "平邮";
                        }
                        else
                        {
                            fight = 15;
                            express = "EMS";
                        }

                        // Label1.Text = "You selected: " + RadioButtonList1.SelectedItem.Text + "INDEX:" + RadioButtonList1.SelectedIndex+"****"+fight+"****"+express;
                        //Maticsoft.BLL.ShoppingCart cart = Session["ShoppingCart"] as Maticsoft.BLL.ShoppingCart;
                        Maticsoft.Model.Order order = new Model.Order();
                        decimal money1 = order.Total + fight;
                        if (money1 > user.Ubalance)
                        {
                            (this, "请先充值", "UserCenter.aspx");
                            return;
                        }
                        BLL.Order oder = new BLL.Order();
                       
                        bool bool1 = oder.CheckOut(user.id,order.Total,cart,nameStr,phoneStr,addressStr,fight,express);
                        //bool bool1 =  oder.CheckOut(user.id, cart.Total, cart, nameStr, phoneStr, addressStr, fight, express);
                        if (bool1 == true)
                        {
                            // Label1.Text = "购物成功";
                            (this, "购物成功");
                        }

                    }
                }
            }
                    else
                    {
                        (this, "请先加载购物车");
                    }
                }

        
图片附件: 游客没有浏览图片的权限,请 登录注册
搜索更多相关主题的帖子: 购物车 null 
2014-04-30 15:11
xydddaxia
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:贵宾
威 望:33
帖 子:466
专家分:2307
注 册:2009-3-20
收藏
得分:7 
sql错了,

站在春哥的肩膀上
2014-05-05 08:31
神奈创
Rank: 3Rank: 3
等 级:论坛游侠
威 望:3
帖 子:67
专家分:191
注 册:2013-3-31
收藏
得分:7 
应该是你定义的sql操作字符串有问题,可能是不支持那样子的语法也可能是你要你的语句里面的元素是错的
2014-05-08 12:02
ligao68
Rank: 1
等 级:新手上路
帖 子:1
专家分:7
注 册:2014-5-5
收藏
得分:7 
请问你这图片如何弄上去的啊!谢谢。。
2014-05-10 08:28
编程学者989
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-4-30
收藏
得分:0 
回复 4 楼 ligao68
有添加图片的功能呀。上面工具栏里有的。
2014-05-20 10:49
编程学者989
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-4-30
收藏
得分:0 
回复 3 楼 神奈创
谢谢~
2014-05-20 10:50
快速回复:求助 '=' 附近有语法错误
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.038897 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved