示例#1
0
        private void EmailCheckBtn_Click(object sender, EventArgs e)
        {
            string email   = E_mailBox.Text;
            string dbEmail = "";
            string sql     = "SELECT USER_EMAIL FROM TBL_USER WHERE USER_EMAIL = " + "'" + email + "'";

            dt = db.GetDBTable(sql);

            foreach (DataRow dr in dt.Rows)
            {
                dbEmail = dr["user_email"].ToString();
            }

            if (email == dbEmail)
            {
                MessageBox.Show("이미 가입된 이메일 입니다.");
                E_mailBox.Text = "";
                E_mailBox.Focus();
                return;
            }
            else
            {
                MessageBox.Show("사용 가능한 이메일 입니다.");
            }
        }
示例#2
0
        private void E_mailBox_LostFocus(object sender, EventArgs e)
        {
            //MessageBox.Show("로스트포커스 함수 들어옴");
            email = E_mailBox.Text;

            int @count = countChar(email, "@");
            //MessageBox.Show(@count.ToString());

            int dotCount = countChar(email, ".");

            //MessageBox.Show(dotCount.ToString());

            if (@count != 1 || dotCount > 2)
            {
                MessageBox.Show("Email 양식에 맞지 않습니다.");
                E_mailBox.Text = "";
                E_mailBox.Focus();
            }
        }