Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (db.GetPassword(textBox1.Text, type) == null)
     {
         if (textBox1.Text != "" && textBox2.Text != "")
         {
             if (type != "0")
             {
                 db.SetLogin(textBox1.Text, textBox2.Text, type);
                 MessageBox.Show("注册成功");
             }
             else
             {
                 MessageBox.Show("请选择用户类型");
             }
         }
         else
         {
             MessageBox.Show("密码或用户名不能为空");
         }
     }
     else
     {
         MessageBox.Show("用户名已存在");
     }
 }
Пример #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (radioButton1.Checked)
     {
         ps Ps = new ps();
         if (Ps.GetFlag() == 0)
         {
             Ps.Show();
         }
         else
         {
             MessageBox.Show("已被锁定无法注册");
             this.Close();
         }
     }
     if (radioButton2.Checked || radioButton3.Checked)
     {
         if (db.GetPassword(textBox1.Text, type) == null)
         {
             if (textBox1.Text != "" && textBox2.Text != "")
             {
                 if (type != "0")
                 {
                     db.SetLogin(textBox1.Text, textBox2.Text, type);
                     MessageBox.Show("注册成功");
                 }
                 else
                 {
                     MessageBox.Show("请选择用户类型");
                 }
             }
             else
             {
                 MessageBox.Show("密码或用户名不能为空");
             }
         }
         else
         {
             MessageBox.Show("用户名已存在");
         }
     }
 }
Пример #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (temp <= 5)
     {
         if (textBox1.Text != "888")
         {
             MessageBox.Show("密码错误");
             temp++;
         }
         else
         {
             Db = new DateBase();
             if (Db.GetPassword(textBox1.Text, "1") == null)
             {
                 if (Sup.textBox1.Text != "" && Sup.textBox2.Text != "")
                 {
                     Db.SetLogin(Sup.textBox1.Text, Sup.textBox2.Text, "1");
                 }
                 else
                 {
                     MessageBox.Show("密码或用户名不能为空");
                 }
             }
             else
             {
                 MessageBox.Show("用户名已存在");
             }
         }
     }
     else
     {
         MessageBox.Show("注册已被锁定,请联系开发人员");
         this.Close();
         flag = 1;
     }
 }