Пример #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form_Log fl = new Form_Log();

            fl.Show();
        }
Пример #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (txtNowpwd.Text.Length < 6)
     {
         MessageBox.Show("密码长度小于6位,请重新输入!", "提醒信息", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         if (txtNowpwd.Text == txtReNowPwd.Text)
         {
             string        sql  = "update users set spassword = '******' where sno = '" + txtID.Text + "'";
             SqlConnection conn = new SqlConnection(connstr);
             conn.Open();
             SqlCommand    sc   = new SqlCommand(sql, conn);
             SqlDataReader msDr = sc.ExecuteReader();
             conn.Close();
             MessageBox.Show("修改成功!");
             this.Close();
             Form_Log fl = new Form_Log();
             fl.Show();
         }
         else
         {
             MessageBox.Show("密码输入信息不一致,请重新输入!", "提醒信息", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Пример #3
0
        private void Button_back_Click(object sender, EventArgs e)
        {
            Form_Log frm = new Form_Log();

            frm.Show();
            this.Close();
        }
Пример #4
0
        private void Form_FindPas_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Hide();
            Form_Log fl = new Form_Log();

            fl.Show();
        }
Пример #5
0
 private void Button_register_Click(object sender, EventArgs e)
 {
     if (ju.Enroll(User_name.Text, User_password.Text, Tell.Text, Email.Text, txtRePassword.Text))
     {
         MessageBox.Show("注册成功!");
         Form_Log frm = new Form_Log();
         frm.Show();
         this.Close();
     }
     else
     {
         if (User_password.Text.Length < 6)
         {
             MessageBox.Show("密码长度小于6位", "提醒信息", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else if (Tell.Text.Length != 11)
         {
             MessageBox.Show("电话号码输入错误", "提醒信息", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else if (User_password.Text != txtRePassword.Text)
         {
             MessageBox.Show("两次密码信息不一致,请重新输入", "提醒信息", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else if (!reg.IsMatch(Email.Text))
         {
             MessageBox.Show("邮箱格式输入有误,请重新输入\n1.只允许英文字母、数字、下划线、英文句号、以及中划线组成\n" +
                             "2.结尾是qq.com或163.com或126.com",
                             "提醒信息", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }