public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            string useremail = context.Request["user_email"];

            if ((useremail != null) || (useremail != ""))
            {
                if (OperData.ChkReEmail(useremail))
                {
                    context.Response.Write("Email address can be used");
                }
                else
                {
                    context.Response.Write("The email address already exsited ");
                }
            }
            else
            {
                context.Response.Write("Enqury error");
            }
        }
Ejemplo n.º 2
0
        private bool isUser()
        {
            string userName     = txt_firstName.Text.Trim();
            string surname      = txt_surName.Text.Trim();
            string companycode  = txt_companyCode.Text.Trim();
            string mail         = txt_usermail.Text.Trim();
            string password     = "******";// txt_password.Text.Trim();
            string workphonenum = txt_workPhoneNumber.Text.Trim();

            user_norm = HaveUser(userName, mail);

            if (userName == "")
            {
                // Response.Write("用户名不能为空");
                lbl_msg.Text = "Username cannot be empty";
                return(false);
            }
            if (surname == "")
            {
                lbl_msg.Text = "Surname cannot be empty";
                return(false);
            }
            if (password == "")
            {
                //Response.Write("密码不能为空");
                lbl_msg.Text = "Password cannot be empty";
                return(false);
            }
            if (companycode == "")
            {
                lbl_msg.Text = "Company code cannot be empty";
                return(false);
            }
            if (workphonenum == "")
            {
                // Response.Write("邮箱不能为空");
                lbl_msg.Text = "Work phnoe number cannot be empty";
                return(false);
            }
            if (mail == "")
            {
                // Response.Write("邮箱不能为空");
                lbl_msg.Text = "Email address cannot be empty";
                return(false);
            }
            if (userName == user_norm.firstName)
            {
                // Response.Write("用户名已存在");
                lbl_msg.Text = "Username already exists";
                return(false);
            }

            //检查邮箱是否已注册
            if (OperData.ChkReEmail(mail))
            //if (mail == user_norm.emailAddress)
            {
                //Response.Write("邮箱已存在");

                return(true);
            }
            else
            {
                userName     = "";
                surname      = "";
                companycode  = "";
                mail         = "";
                password     = "";
                workphonenum = "";
                lbl_msg.Text = "The mailbox already exists";
                return(false);
            }
        }