Exemple #1
0
        /// <summary>
        /// 注册页面第二步
        /// </summary>
        /// <returns></returns>
        public ActionResult Register_Step2()
        {
            //第一步跳转过来传的参数
            if (!string.IsNullOrEmpty(Request.Params["phone"]))
            {
                ViewBag.phone = Request.Params["phone"];
            }
            if (!string.IsNullOrEmpty(Request.Params["jyCode"]))
            {
                ViewBag.jyCode = Request.Params["jyCode"];
            }
            List <IndustryInfo> models = IndustryInfoBll.GetList().ToList();

            ViewBag.modes = models;
            //第二步保存提交的参数
            string cname    = string.Empty;
            string pwd      = string.Empty;
            string contact  = string.Empty;
            string telphone = string.Empty;
            string industry = string.Empty;
            string jyCode   = string.Empty;//验证码

            if (!string.IsNullOrEmpty(Request.Form["cname"]))
            {
                cname = Request.Form["cname"];
            }
            if (!string.IsNullOrEmpty(Request.Form["pwd"]))
            {
                pwd = Request.Form["pwd"];
            }
            if (!string.IsNullOrEmpty(Request.Form["contact"]))
            {
                contact = Request.Form["contact"];
            }
            if (!string.IsNullOrEmpty(Request.Form["Tel_phone"]))
            {
                telphone = Request.Form["Tel_phone"];
            }
            if (!string.IsNullOrEmpty(Request.Form["industry"]))
            {
                industry = Request.Form["industry"];
            }
            if (!string.IsNullOrEmpty(Request.Form["rs2_jyCode"]))
            {
                jyCode = Request.Form["rs2_jyCode"];
            }
            if (!string.IsNullOrEmpty(cname) && !string.IsNullOrEmpty(pwd))
            {
                //Response.Redirect("/UserCenter/Register_Step3?name=");

                int    sellerId = 0;
                string error    = string.Empty;
                if (SellerInfoBll.RequestRegisterNewUser(cname, pwd, contact, telphone, int.Parse(industry), jyCode, out sellerId, out error))
                {
                    SellerInfo model = SellerInfoBll.GetModel(sellerId, out error);
                    if (string.IsNullOrEmpty(error))
                    {
                        Response.Redirect("/UserCenter/Register_Step3?name=" + model.LoginName);
                    }
                }
                else
                {
                    Response.Write("<script>alert('" + error + "');</script>");
                    Response.Redirect("/UserCenter/Register");
                }
            }
            return(View());
        }
Exemple #2
0
        /// <summary>
        /// 行业列表
        /// </summary>
        /// <returns></returns>
        public string GetInsudtryList()
        {
            List <IndustryInfo> list = IndustryInfoBll.GetList().ToList();

            return(JsonConvert.SerializeObject(list));
        }