Пример #1
0
 private void LoginButton_Click_1(object sender, EventArgs e)
 {
     if (db.GetPassword(textBox1.Text, type) == textBox2.Text)
     {
         if (radioButton1.Checked)
         {
             MenuCreate man = new MenuCreate(this);
             this.Hide();
             man.ShowDialog();
         }
         if (radioButton2.Checked)
         {
             WaiterSystem waiter = new WaiterSystem(this);
             this.Hide();
             waiter.ShowDialog();
         }
         if (radioButton3.Checked)
         {
             Uid = textBox1.Text;
             CustomerSystem customer = new CustomerSystem(this, Uid);
             this.Hide();
             customer.ShowDialog();
             this.Close();
         }
     }
     else
     {
         MessageBox.Show("用户名或密码错误");
     }
 }
Пример #2
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("用户名已存在");
     }
 }
Пример #3
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("用户名已存在");
         }
     }
 }
Пример #4
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;
     }
 }