Пример #1
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            if (this.txtUserName.Value.Trim() == "")
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('请输入用户名!');", true);
                //MessageBox.Show(this, "请输入用户名!");
                return;
            }
            if (this.txtUserName.Value.Trim() == "用户名")
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('请输入用户名!');", true);
                //MessageBox.Show(this, "请输入用户名!");
                return;
            }
            if (this.txtPwd.Value.Trim() == "")
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('请输入密码!');", true);
                //MessageBox.Show(this, "请输入密码!");
                return;
            }
            if (this.txtVa.Value.Trim() == "")
            {
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('验证码不能为空!');", true);
                return;
            }

            if (this.txtVa.Value.Trim().ToLower() != Session["CheckCode"].ToString().ToLower())
            {
                WriteDBLog("验证码错误:" + this.txtVa.Value, 1);
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('验证码错误!');", true);
                return;
            }

            if (!ExistsAdmin(txtUserName.Value.Trim(), PageValidate.GetMd5(txtPwd.Value.Trim())))
            {
                WriteDBLog("账号或密码错误:" + txtPwd.Value, 1);
                ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('账号或密码错误!');", true);
                //MessageBox.Show(this, "账号或密码错误");
                return;
            }

            WriteDBLog("登录成功", 0);

            //string xd = Session["CheckCode"] != null && Session["CheckCode"].ToString() != "" ? Session["CheckCode"].ToString() : "";
            //if (xd.ToLower() != txtfield.Text.ToLower())
            //{
            //    MessageBox.Show(this, "验证码错误");
            //    return;
            //}
            lgk.Model.tb_admin admin = adminBLL.GetModel(txtUserName.Value.Trim());
            //if (admin.Limits == null)
            //{
            //    MessageBox.Show(this, "您的权限不足,请联系超级管理员");
            //    return;
            //}
            UserUtil.Login(this.txtUserName.Value.Trim(), "A128076_admin", false);
            //放入cookie
            HttpCookie UserCookie = new HttpCookie("A128076_admin");
            DataSet    ds         = GetAdminModel(txtUserName.Value, PageValidate.GetMd5(txtPwd.Value));

            UserCookie["Id"]   = ds.Tables[0].Rows[0]["ID"].ToString();
            UserCookie["name"] = Convert.ToString(txtUserName.Value);
            Response.AppendCookie(UserCookie);
            Response.Redirect("admin/index.aspx");
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //long iUserID = Convert.ToInt64(Request["UserID"]);

            if (!IsPostBack)
            {
                //validatedCode v = new validatedCode();
                //string code = v.CreateVerifyCode();
                ////ImgCheck.ImageUrl = code;
                //v.CreateImageOnPage(code, this.Context);
                //Session["CheckCode"] = code;
                string host = Request.Url.Host;
                if (Request["name"] != null)
                {
                    //登录另一个域名
                    string            UserName = Request.QueryString["name"];
                    lgk.Model.tb_user uModel   = userBLL.GetModel(GetUserID(UserName));
                    if (uModel.Password != PageValidate.GetMd5(Request.QueryString["pwd"]))
                    {
                        return;//密码不对
                    }

                    UserUtil.Login(UserName, "A128076_user", false);
                    //放入cookie
                    HttpCookie UserCookie = new HttpCookie("A128076_user");
                    if (Request["id"] == null)
                    {
                        UserCookie["Id"] = GetUserID(UserName).ToString();
                    }
                    else
                    {
                        UserCookie["Id"] = Request.QueryString["id"];
                    }

                    UserCookie["name"] = UserName;
                    Response.AppendCookie(UserCookie);
                    HttpCookie CultureCookie = new HttpCookie("Culture");
                    CultureCookie.Value = Request.QueryString["lan"];
                    //CultureCookie.Value = "zh-cn";
                    Response.AppendCookie(CultureCookie);
                    //Response.Redirect("/HTMLPage1.htm");
                    //Response.Redirect("http://" + host.Replace("www.", "vip.") + "/user/index.aspx");//跳转到会员中心
                    Response.Redirect("/user/index.aspx");
                }


                // if (host.IndexOf("www.") == 0)
                // {
                ////     //Response.Redirect("/HTMLPage1.htm");
                ////     //Response.Redirect("http://" + host + "/user/shop/index.aspx");//用www访问跳转到商城
                //     Response.Redirect("/user/shop/index.aspx");
                // }
                if (string.IsNullOrEmpty(Request["adminid"]) == false)
                {
                    //Security sec = new Security();//解密传递过来的参数
                    string admin  = Request["adminid"].ToString();              //sec.DecryptQueryString(Request["adminid"].ToString());
                    long   userid = Convert.ToInt64(Request["uid"].ToString()); //Convert.ToInt32(sec.DecryptQueryString(Request["uid"].ToString()));//
                    //RegexR reg = new RegexR();
                    //if (reg.Nums(admin) == true)
                    //{
                    AdminEnter(admin, userid);
                    //}
                    //else
                    //{
                    //    bindLogin();
                    //}
                }
                //if (Request.Cookies["Culture"] == null || Request.Cookies["Culture"].Value.ToString() == "zh-cn")
                //{
                //    this.rdoZH.Checked = true;
                //}
                //else
                //{
                //    this.rdoEn.Checked = true;
                //}
            }
        }
Пример #3
0
        /// <summary>
        /// 提交
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (RegValidate())
            {
                lgk.Model.tb_user userInfo      = new lgk.Model.tb_user();
                lgk.Model.tb_user recommendInfo = userBLL.GetModel(GetUserID(this.txtRecommendCode.Value.Trim()));//推荐用户


                userInfo.UserCode        = txtUserCode.Value.Trim();                           //会员编号
                userInfo.LevelID         = 1;
                userInfo.RecommendID     = recommendInfo.UserID;                               //推荐人ID
                userInfo.RecommendCode   = recommendInfo.UserCode;                             //推荐人编号
                userInfo.RecommendPath   = recommendInfo.RecommendPath;                        //路径
                userInfo.RecommendGenera = Convert.ToInt32(recommendInfo.RecommendGenera + 1); //(推荐代数)第几代

                userInfo.ParentID      = 0;                                                    //父节点ID
                userInfo.ParentCode    = "-";                                                  //父节点編號
                userInfo.UserPath      = "-";                                                  //路径
                userInfo.Layer         = 0;                                                    //属于多少层
                userInfo.LeftBalance   = 0;
                userInfo.LeftNewScore  = 0;
                userInfo.RightBalance  = 0;
                userInfo.RightNewScore = 0;
                userInfo.LeftScore     = 0;
                userInfo.RightScore    = 0;

                userInfo.Location = 0;

                userInfo.IsOpend  = 0;                                                       //是否启用 0-未激活,1-新注册, 2-已激活
                userInfo.IsLock   = 0;                                                       //是否被冻結(0-否,1-冻結)
                userInfo.IsAgent  = 0;                                                       //是否报單中心(0-否,1-是)
                userInfo.User006  = "" /*txtAgentCode.Value.Trim()*/;
                userInfo.AgentsID = 0 /*agentBLL.GetAgentsID(txtAgentCode.Value.Trim(),1)*/; //
                //userInfo.QQnumer = txtQQnumer.Value.Trim();//QQ
                //userInfo.Email = txtEmail.Value.Trim();//电子邮箱

                userInfo.Emoney          = 0;                                                       //云盾
                userInfo.BonusAccount    = 0;                                                       //现金积分
                userInfo.AllBonusAccount = 0;                                                       //累计现金积分账户
                userInfo.StockAccount    = 0;                                                       //复投积分
                userInfo.ShopAccount     = 0;                                                       //云图
                userInfo.StockMoney      = 0;                                                       //投资积分

                userInfo.RegTime = DateTime.Now;                                                    //注册時間
                //userInfo.OpenTime = DateTime.Now;//注册時間
                userInfo.GLmoney        = 0;                                                        //
                userInfo.BillCount      = 1;                                                        //
                userInfo.Password       = PageValidate.GetMd5(this.txtPassword.Value.Trim());       //一级密码
                userInfo.SecondPassword = PageValidate.GetMd5(this.txtSecondPassword.Value.Trim()); //二级密码
                userInfo.ThreePassword  = PageValidate.GetMd5(Util.CreateNo());

                userInfo.BankAccount     = "";                                            //this.txtBankAccount.Value.Trim();// "銀行賬號";
                userInfo.BankAccountUser = "";                                            // this.txtBankAccountUser.Value.Trim();// "開户姓名";
                userInfo.BankName        = "";                                            // this.dropBank.SelectedValue;// "開户銀行";
                userInfo.BankBranch      = "";                                            // this.txtBankBranch.Value.Trim();// "支行名稱";
                userInfo.BankInProvince  = "";                                            // dropProvince.SelectedItem.Text;// "銀行所在省份";
                userInfo.BankInCity      = "";                                            // "銀行所在城市";

                userInfo.NiceName = string.Empty; /*string.Empty;*/                       //昵称
                userInfo.TrueName = "";                                                   // "姓名";
                userInfo.IdenCode = "";                                                   // "身份证號";
                string strPhoneNum = this.txtUserCode.Value.Trim();
                userInfo.PhoneNum = string.IsNullOrEmpty(strPhoneNum) ? "" : strPhoneNum; // "手机號碼";
                userInfo.Address  = "" /*txtAddress.Value*/;                              //聯系地址

                userInfo.User001 = 0;                                                     //---
                userInfo.User002 = 0;                                                     //注册人ID
                userInfo.User003 = 0;                                                     //推荐人数
                userInfo.User004 = 0;                                                     //投资单数标识
                userInfo.User005 = "";                                                    //资料修改标识
                userInfo.User007 = "";
                userInfo.User009 = "";
                userInfo.User010 = Util.GetUniqueIndentifier(20);//聚元交易地址
                userInfo.Gender  = sex1.Checked == true ? 1 : 2;
                // int iQuestion = 0;
                //int.TryParse(dropQuestion.SelectedValue, out iQuestion);
                //string strQuestion = iQuestion > 0 && iQuestion <= 3 ? dropQuestion.SelectedItem.Text : string.Empty;
                //userInfo.SafetyCodeQuestion = strQuestion;//密保问题
                //userInfo.SafetyCodeAnswer = string.IsNullOrEmpty(strQuestion) ? string.Empty : txtAnswer.Text.Trim();//密保答案
                userInfo.User011 = 0;
                userInfo.User013 = 0; //
                userInfo.User018 = 1; // 推广链接注册

                userInfo.RegMoney = 0;

                if (userBLL.Exists(txtUserCode.Value.Trim()))
                {
                    MessageBox.ShowBox(this.Page, "", "该会员编号已存在,请重新注册!", Library.Enums.ModalTypes.success); //注册成功
                    //ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("RegistrationFails") + "');", true);//注册失败,该会员编号已存在,请重新注册!
                }
                else
                {
                    if (userBLL.Add(userInfo) > 0)
                    {
                        long userid = GetUserID(userInfo.UserCode);
                        int  statusCode;
                        var  api  = new EaseMobAPIHelper();
                        var  data = api.AccountCreate(userInfo.UserCode, userInfo.ThreePassword, out statusCode);

                        if (statusCode == 200)
                        {
                            var emResult = JsonConvert.DeserializeObject <APPService.EaseMobResult>(data);
                            if (!string.IsNullOrEmpty(emResult.error) || emResult.error == null)
                            {
                                int flag = flag_ActivationUser(GetUserID(userInfo.UserCode), 0);
                                if (flag != 0)
                                {
                                    userBLL.Delete(userid);

                                    if (flag == -1)
                                    {
                                        userBLL.Delete(userid);
                                        MessageBox.ShowBox(this.Page, "", GetLanguage("ActivationUserFail"), Library.Enums.ModalTypes.error);//激活会员失败
                                    }
                                    else
                                    {
                                        userBLL.Delete(userid);
                                        MessageBox.ShowBox(this.Page, "", GetLanguage("RegOpenMust"), Library.Enums.ModalTypes.error);//云盾不足
                                    }
                                }
                                else
                                {
                                    MessageBox.ShowBox(this.Page, "", "注册成功", Library.Enums.ModalTypes.success);//注册成功
                                    return;
                                }
                            }
                            else
                            {
                                userBLL.Delete(userid);
                                MessageBox.ShowBox(this.Page, "", "网络繁忙,注册失败.", Library.Enums.ModalTypes.error);//注册失败
                            }
                        }
                        else
                        {
                            userBLL.Delete(userid);
                            LogHelper.SaveLog(data, "LinkRegister");
                            MessageBox.ShowBox(this.Page, "", "网络异常,注册失败", Library.Enums.ModalTypes.error);//注册失败
                        }
                    }
                }
            }
        }
Пример #4
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            if (setBLL.GetModel(1).IsOpenWeb == 0)
            {
                MessageBox.ShowAndRedirect(this, setBLL.GetModel(1).CloseWebRemark, "login.aspx");
            }
            else
            {
                if (this.Phone.Value.Trim() == "")
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("PleaseNmae") + "');", true);
                    return;
                    //MessageBox.ShowBox(this.Page, GetLanguage("PleaseNmae"), Library.Enums.ModalTypes.warning);//请输入用户名

                    //return;
                }
                //if (this.TBUserName.Value.Trim() == "用户名")
                //{
                //    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('请输入用户名!');", true);
                //    return;
                //}

                //if (this.TBPassWord.Value.Trim() == "密码")
                //{
                //    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('请输入密码!');", true);
                //    return;
                //}
                if (this.TBCode.Value.Trim() == "")
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("Verification") + "');", true);
                    return;
                    //MessageBox.ShowBox(this.Page, GetLanguage("Verification"), Library.Enums.ModalTypes.warning);//验证码不能为空
                    //return;
                }

                string xd = Session["CheckCode"] != null && Session["CheckCode"].ToString() != "" ? Session["CheckCode"].ToString() : "";
                if (xd.ToLower() != TBCode.Value.Trim().ToLower())
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("VerificationError") + "');", true);
                    return;
                    //MessageBox.ShowBox(this.Page, GetLanguage("VerificationError"), Library.Enums.ModalTypes.error);//验证码错误

                    //return;
                }
                lgk.Model.tb_user user = userBLL.GetModel(GetUserID(Phone.Value.Trim()));
                if (user == null)
                {
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("AccountError") + "');", true);
                    return;
                    //MessageBox.ShowBox(this.Page, GetLanguage("AccountError"), Library.Enums.ModalTypes.error);//账号或密码错误
                    //return;
                }
                if (Text2.Value.Trim() != "")
                {
                    string regSwitch = ConfigurationManager.AppSettings["SMS_SWITCH"];//注册短信开关
                    if (regSwitch.Equals("Open"))
                    {
                        if (CheckSMSCode(this.Phone.Value.Trim(), Text2.Value.Trim().ToString(), 2) < 0)
                        {
                            ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('短信验证码错误');", true);
                            return;
                            //MessageBox.ShowBox(this.Page,"短信验证码错误", Library.Enums.ModalTypes.error);//账号或密码错误
                            //return;
                        }
                    }
                }
                else
                {
                    if (this.TBPassWord.Value.Trim() == "")
                    {
                        ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("PleaseEnter") + "');", true);
                        return;
                        //MessageBox.ShowBox(this.Page, GetLanguage("PleaseEnter"), Library.Enums.ModalTypes.warning);//请输入密码

                        //return;
                    }
                    string pwd      = user.Password;
                    string loginPwd = PageValidate.GetMd5(TBPassWord.Value);

                    //安卓端注册时偶尔会出现传递的md5密码少第一个字符,只传递了31个字符,为了兼容多端登录需要做一下特殊处理
                    if (user.Password.Length != 32 || loginPwd.Length != 32)
                    {
                        if (user.Password.Length == 32)
                        {
                            pwd = user.Password.Substring(1, user.Password.Length - 1);
                        }
                        if (loginPwd.Length == 32)
                        {
                            loginPwd = loginPwd.Substring(1, loginPwd.Length - 1);
                        }
                    }

                    if (pwd != loginPwd)
                    {
                        ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('" + GetLanguage("AccountError") + "');", true);
                        return;
                        //MessageBox.ShowBox(this.Page, GetLanguage("AccountError"), Library.Enums.ModalTypes.error);//账号或密码错误
                        //return;
                    }
                }
                //if (user.IsOpend == 4 || user.IsLock == 1)
                //{
                //    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('账号已冻结不能登录!');", true);
                //    return;
                //}
                //if (user.IsOpend == 0 || user.IsOpend == 4 || user.IsLock == 1)
                //{
                //    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('账号未开通或已冻结不能登录!');", true);
                //    return;
                //}
                string UserName = this.Phone.Value.Trim();
                UserUtil.Login(UserName, "A128076_user", false);
                //放入cookie
                HttpCookie UserCookie = new HttpCookie("A128076_user");
                UserCookie["Id"]   = user.UserID.ToString();
                UserCookie["name"] = UserName;
                Response.AppendCookie(UserCookie);
                //HttpCookie CultureCookie = new HttpCookie("Culture");
                //CultureCookie.Value = "zh-cn";//中文
                //Response.AppendCookie(CultureCookie);
                HttpCookie Culture;

                if (HttpContext.Current.Request.Cookies["Culture"] == null)
                {
                    Culture = new HttpCookie("Culture");
                }
                else
                {
                    Culture = HttpContext.Current.Request.Cookies["Culture"];
                }

                if (LangType.Value != "2")
                {
                    Culture.Value = "zh-cn";//中文
                }
                else
                {
                    Culture.Value = "en-us";//英文
                }

                Response.AppendCookie(Culture);

                //登录系统
                Response.Redirect("/user/index.aspx");
            }
        }
Пример #5
0
        /// <summary>
        /// 提交
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (RegValidate())
            {
                string phone = txtUserCode.Value.Trim().ToString();
                //if (CheckSMSCode(phone, txtVerifCode.Value.Trim().ToString(), 1) < 0)//验证短信验证码
                //{
                //    MessageBox.ShowBox(this.Page, "", GetLanguage("SMSVerificationError"), Library.Enums.ModalTypes.warning);//注册失败,该会员编号已存在,请重新注册!
                //    return;
                //}

                lgk.Model.tb_user userInfo      = new lgk.Model.tb_user();
                lgk.Model.tb_user recommendInfo = userBLL.GetModel(GetUserID(this.txtRecommendCode.Value.Trim()));//推荐用户
                //lgk.Model.tb_user parentInfo = userBLL.GetModel(GetUserID(this.txtParentCode.Value.Trim()));//父节点用户
                //lgk.Model.tb_user agentInfo = userBLL.GetModel(GetUserID(txtAgentCode.Value.Trim()));//报单会员

                userInfo.UserCode        = txtUserCode.Value.Trim();                           //会员编号
                userInfo.LevelID         = 1;
                userInfo.RecommendID     = recommendInfo.UserID;                               //推荐人ID
                userInfo.RecommendCode   = recommendInfo.UserCode;
                userInfo.RecommendPath   = recommendInfo.RecommendPath;                        //路径
                userInfo.RecommendGenera = Convert.ToInt32(recommendInfo.RecommendGenera + 1); //(推荐代数)第几代

                userInfo.LeftBalance   = 0;
                userInfo.LeftNewScore  = 0;
                userInfo.RightBalance  = 0;
                userInfo.RightNewScore = 0;
                userInfo.LeftScore     = 0;
                userInfo.RightScore    = 0;


                userInfo.User007 = ""; //m_user.Location == 1 ? "左区" : "右区";
                userInfo.IsOpend = 0;  //是否启用 0-未激活,1-新注册, 2-已激活
                userInfo.IsLock  = 0;  //是否被冻結(0-否,1-冻結)
                userInfo.IsAgent = 0;  //是否报單中心(0-否,1-是)

                //string a = Luodian();
                //if (a == "")
                //{
                //    MessageBox.ShowBox(this.Page, "", "落点失败!", Library.Enums.ModalTypes.error);//注册失败
                //    return;
                //}
                //string[] ID = a.Split('-');
                //var model_1 = userBLL.GetModel(long.Parse(ID[0]));


                userInfo.ParentID   = 0;      //父节点ID
                userInfo.ParentCode = "";     //父节点編號
                userInfo.UserPath   = "";     //路径
                userInfo.Layer      = 0;      //属于多少层

                userInfo.Emoney          = 0; //报单积分
                userInfo.BonusAccount    = 0; //拆分积分
                userInfo.AllBonusAccount = 0; //量子宝
                userInfo.StockAccount    = 0; //云积分
                userInfo.StockMoney      = 0; //公积金
                userInfo.GLmoney         = 0; //复投积分
                decimal dRegMoney = 0;
                userInfo.ShopAccount = 0;     //奖金币
                userInfo.RegMoney    = dRegMoney;

                userInfo.BillCount = 1;// getParamInt("reg" + ddlLevel.SelectedValue);//注册单数



                userInfo.Location = 0;                                                              //区域

                userInfo.RegTime        = DateTime.Now;                                             //注册時間
                userInfo.Password       = PageValidate.GetMd5(this.txtPassword.Value.Trim());       //一级密码
                userInfo.SecondPassword = PageValidate.GetMd5(this.txtSecondPassword.Value.Trim()); //二级密码
                userInfo.ThreePassword  = PageValidate.GetMd5(Util.CreateNo());

                userInfo.NiceName = txtNiceName.Value.Trim();
                userInfo.TrueName = "";                                                   // "姓名";
                userInfo.IdenCode = txtIDNumber.Value.Trim();                             // "身份证號";
                string strPhoneNum = this.txtUserCode.Value.Trim();
                userInfo.PhoneNum = string.IsNullOrEmpty(strPhoneNum) ? "" : strPhoneNum; // "手机號碼";
                userInfo.Address  = "";                                                   //聯系地址
                userInfo.NiceName = string.Empty;                                         //txtNickName.Value.Trim();//昵称
                userInfo.TrueName = string.Empty;                                         // "姓名";
                //userInfo.IdenCode = string.Empty;// "身份证號";
                string phoneNum = this.txtPhoneNum.Value.Trim();
                userInfo.PhoneNum = string.IsNullOrEmpty(phoneNum) ? "" : phoneNum; // "手机號碼";
                userInfo.Address  = string.Empty;                                   //聯系地址
                userInfo.QQnumer  = "";                                             //QQ
                userInfo.Email    = "";                                             //电子邮箱

                userInfo.User001  = 0;
                userInfo.User004  = 0;
                userInfo.User002  = 1; //
                userInfo.User003  = 0; //
                userInfo.User006  = Agent.Value.Trim();
                userInfo.Location = 0; /*radMarketOne.Checked == true ? 1 : 2*/
                userInfo.User007  = "";
                //int.TryParse(dropQuestion.SelectedValue, out q);
                //string question = q > 0 && q <= 3 ? dropQuestion.SelectedItem.Text : string.Empty;
                userInfo.User009 = ""; // question;//密保问题
                userInfo.User010 = ""; // string.IsNullOrEmpty(question) ? string.Empty : txtAnswer.Text.Trim();//密保答案
                userInfo.User011 = 0;
                userInfo.User015 = 0;  //购股币
                userInfo.User016 = 0;
                userInfo.User017 = 0;
                userInfo.User018 = 0;//--用户竞拍该扣未扣的奖金币

                //userInfo.User007 = Util.GetUniqueIndentifier(20);
                //userInfo.User008 = Util.GetUniqueIndentifier(4).ToUpper();//邀请码
                //userInfo.User010 = "";// txtAlipay.Value.Trim(); //支付宝

                long iUID = GetUserID(txtUserCode.Value.Trim());
                if (iUID > 0)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "hideloading", "hideloading();", true);
                    MessageBox.ShowBox(this.Page, GetLanguage("RegistrationFails"), Library.Enums.ModalTypes.error);//注册失败,该会员编号已存在,请重新注册!
                }
                else
                {
                    if (userBLL.Add(userInfo) > 0)
                    {
                        lgk.Model.tb_user model = userBLL.GetModel(GetUserID(userInfo.UserCode));

                        //model.UserPath = model.UserPath + "-" + model.UserID.ToString();
                        model.RecommendPath = model.RecommendPath + "-" + model.UserID.ToString();
                        model.RegMoney      = 0;
                        model.LeftScore     = 0;
                        model.RightScore    = 0;
                        model.RightNewScore = 0;
                        model.LeftNewScore  = 0;
                        userBLL.Update(model);

                        //写流水
                        MessageBox.ShowBox(this.Page, "", "注册成功!", Library.Enums.ModalTypes.success);//注册成功
                        return;
                    }
                    else
                    {
                        lgk.Model.tb_user model = userBLL.GetModel(GetUserID(userInfo.UserCode));
                        userBLL.Delete(model.UserID);//删除该会员资料
                        ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "info", "alert('异常错误,注册失败!');", true);
                        return;
                    }


                    //    string msg = userBLL.proc_RegisterUser(userInfo);
                    //if (msg == "ok")
                    //{
                    //    long userid = GetUserID(userInfo.UserCode);
                    //    int statusCode;
                    //    var api = new EaseMobAPIHelper();
                    //    if (System.Configuration.ConfigurationManager.AppSettings["ACCOUNTSYNC_SWITCH"] != "Open")
                    //    {
                    //        var data = api.AccountCreate(userInfo.UserCode, userInfo.ThreePassword, out statusCode);

                    //        if (statusCode == 200)
                    //        {
                    //            var emResult = JsonConvert.DeserializeObject<APPService.EaseMobResult>(data);
                    //            if (!string.IsNullOrEmpty(emResult.error) || emResult.error == null)
                    //            {
                    //                MessageBox.ShowBox(this.Page, "", "注册成功", Library.Enums.ModalTypes.success);//注册成功
                    //                return;
                    //            }
                    //            else
                    //            {
                    //                userBLL.Delete(userid);
                    //                MessageBox.ShowBox(this.Page, "", "网络繁忙,注册失败.", Library.Enums.ModalTypes.error);//注册失败
                    //            }
                    //        }
                    //        else
                    //        {
                    //            userBLL.Delete(userid);
                    //            LogHelper.SaveLog(data, "LinkRegister");
                    //            MessageBox.ShowBox(this.Page, "", "网络繁忙,请稍后重试", Library.Enums.ModalTypes.error);//注册失败
                    //        }
                    //    }
                    //    else
                    //    {
                    //        MessageBox.ShowBox(this.Page, "", "注册成功", Library.Enums.ModalTypes.success);//注册成功
                    //        return;
                    //    }
                    //}
                    //else
                    //{
                    //    MessageBox.ShowBox(this.Page, "", msg, Library.Enums.ModalTypes.error);//注册失败
                    //}
                }
            }
        }