private void btnNext_Click(object sender, EventArgs e) { string account = this.txtAccount.Text; string pwd = this.txtPwd.Text; string password = this.txtPassword.Text; if (string.IsNullOrEmpty(account)) { //MessageBox.Show("请输入账号!"); lblMsg.Text = "请输入账号!"; return; } if (string.IsNullOrEmpty(pwd)) { //MessageBox.Show("请输入密码!"); lblMsg.Text = "请输入密码!"; return; } if (string.IsNullOrEmpty(password)) { //MessageBox.Show("请输入确认密码"); lblMsg.Text = "请输入确认密码!"; return; } if (pwd != password) { //MessageBox.Show("两次密码输入不同,请重新输入确认密码"); lblMsg.Text = "两次密码输入不同,请重新输入确认密码!"; this.txtPassword.Text = ""; return; } ScreeningServiceClient client = new ScreeningServiceClient(); bool isSucess = client.GetUserInfoByAccount(txtAccount.Text); if (isSucess) { //MessageBox.Show("账号已存在"); lblMsg.Text = "账号已存在"; return; } else { var registStep3Form = new registSetp3(account, pwd, ""); registStep3Form.TopMost = false; registStep3Form.Show(); this.Close(); } }
//private ScreeningServiceClient _client = null; //private void btnGetCode_Click(object sender, EventArgs e) //{ // string mobile = this.txtPhone.Text; // if (string.IsNullOrEmpty(mobile)) // { // //MessageBox.Show("请输入手机号!"); // lblMsg.Text = "请输入手机号!"; // return; // } // string _Pattern = "^1\\d{10}$"; // if (!Regex.IsMatch(mobile, _Pattern, RegexOptions.IgnoreCase)) // { // //MessageBox.Show("请输入正确格式的手机号码!"); // lblMsg.Text = "请输入正确格式的手机号码!"; // return; // } // _client = new ScreeningServiceClient(); // M_Msg message = _client.GetSmsValidCode(mobile); // if (message.IsSuccss) // { // //MessageBox.Show("发送验证码成功!"); // lblMsg.Text = "发送验证码成功!"; // txtCode.Focus(); // } //} private void btnNext_Click(object sender, EventArgs e) { //client = new ScreeningServiceClient(); //string code = this.txtCode.Text; string mobile = this.txtPhone.Text.Trim(); //账号、密码 string account = this.txtAccount.Text.Trim(); string pwd = this.txtPwd.Text.Trim(); //string password = this.txtPassword.Text; if (string.IsNullOrEmpty(mobile)) { //MessageBox.Show("请输入手机号!"); lblMsg.Text = "请您输入手机号!"; return; } if (!Regex.IsMatch(mobile, pattern, RegexOptions.IgnoreCase) && !Regex.IsMatch(mobile, phone, RegexOptions.IgnoreCase) && !Regex.IsMatch(mobile, xiaoLt, RegexOptions.IgnoreCase)) { lblMsg.Text = "请您输入正确的手机号码、固定电话或小灵通!"; return; } if (string.IsNullOrEmpty(account)) { //MessageBox.Show("请输入账号!"); lblMsg.Text = "请您输入账号!"; return; } if (string.IsNullOrEmpty(pwd)) { //MessageBox.Show("请输入密码!"); lblMsg.Text = "请您输入密码!"; return; } //if (string.IsNullOrEmpty(password)) //{ // //MessageBox.Show("请输入确认密码"); // lblMsg.Text = "请输入确认密码!"; // return; //} //if (pwd != password) //{ // //MessageBox.Show("两次密码输入不同,请重新输入确认密码"); // lblMsg.Text = "两次密码输入不同,请重新输入确认密码!"; // this.txtPassword.Text = ""; // return; //} //bool isSucess = client.GetUserInfoByAccount(account); bool isSucess = screenWebapiClient.GetUserInfoByAccount(account); if (isSucess) { //MessageBox.Show("账号已存在"); lblMsg.Text = "登录账号已存在"; return; } else { var registStep3Form = new registSetp3(account, pwd, mobile); registStep3Form.TopMost = false; registStep3Form.Show(); this.Close(); } //if (string.IsNullOrEmpty(code)) //{ // //MessageBox.Show("请输入验证码!"); // lblMsg.Text = "请输入验证码!"; // return; //} //if (cbCheck.Checked) //{ //_client = new ScreeningServiceClient(); //M_Msg result=_client.CheckSmsValidCode(mobile, code); //if (result.IsSuccss) //{ //去往第二个页面 //RegistStep2Form registStep2Form = new RegistStep2Form(mobile); //registStep2Form.TopMost = false; //registStep2Form.Show(); //this.Close(); //} //else //{ // //MessageBox.Show("验证码验证失败!"); // lblMsg.Text = "验证码验证失败!"; //} //} //else //{ // MessageBox.Show("您是否同意注册条款?"); // lblMsg.Text = "您是否同意注册条款?"; // return; //} }