ASP.NET在线购物网站的设计(9)

来源:xiaoniu168.com 作者:本站原创 添加时间:2011-12-14 点击数:28145

计算机毕业设计用户注册功能介绍:

5.4  用户注册
此模块主要是提供新用户信息注册。用户注册信息时,判断帐号,真实姓名,初始预付金等是否为空,输入的密码和确认密码是否一致。然后输入密码、确认密码、联系电话、家庭地址、出生日期等,注册和返回操作。

以下是引用片段:

string ycj = "0";

        if (this.Textbox9.Text.Trim() != "")
            ycj = this.Textbox9.Text.Trim();

        string hydj = "普通会员";
        if (Convert.ToDecimal(ycj) >= 500)
            hydj = "VIP会员";

        if (Session["UserID"] == null)
        {
            //添加注册的会员信息到数据库中
            DataBase.ExecSql("insert into hyxx(hydlm,mm,xb,xm,dz,dh,sr,Email,ycj,ljycj,sfzh,hydj) " +
                        " values('" + this.TextBox1.Text.Trim() + "','" + this.Textbox5.Text.Trim() + "','" + this.txtxb.SelectedValue + "', " +
                        " '" + this.Textbox2.Text.Trim() + "','" + this.TextBox3.Text.Trim() + "'," +
                        " '" + this.TextBox4.Text.Trim() + "','" + this.Textbox7.Text.Trim() + "'," +
                        " '" + this.Textbox8.Text + "'," + ycj + "," + ycj + ",'" + Textbox10.Text.Trim() + "', '" + hydj + "')");

        }
        else
        {
            //更新当前的会员信息
            if (this.Textbox5.Text.Trim() != "********")
            {
                DataBase.ExecSql("update hyxx set mm='" + this.Textbox5.Text.Trim() + "'," +
                 " xm='" + this.Textbox2.Text.Trim() + "',dz='" + this.TextBox3.Text.Trim() + "', hydj = '" + hydj + "', " +
                  " dh='" + this.TextBox4.Text.Trim() + "',sr='" + this.Textbox7.Text.Trim() + "'," +
                 " email='" + this.Textbox8.Text + "' where hydlm= '" + Session["UserID"].ToString() + "'");
            }
            else
            {
                DataBase.ExecSql("update hyxx set " +
                 " xm='" + this.Textbox2.Text.Trim() + "',dz='" + this.TextBox3.Text.Trim() + "', hydj = '" + hydj + "', " +
                 " dh='" + this.TextBox4.Text.Trim() + "',sr='" + this.Textbox7.Text.Trim() + "'," +
                 " email='" + this.Textbox8.Text + "' where hydlm= '" + Session["UserID"].ToString() + "'");

            }
        }

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第10页为计算机毕业论文购物车功能介绍......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网