Ejemplo n.º 1
0
 private void Add_Click(object sender, EventArgs e)
 {
     if (Password.Text.Trim() != ConfirmPass.Text.Trim())
     {
         Tip.Text = "两次密码输入不一致,请重新输入";
     }
     else
     {
         string       uName        = UserName.Text.Trim();
         string       Pass         = Password.Text.Trim();
         LoginManager loginManager = new LoginManager();
         if (loginManager.AddLoginUser(uName, Pass) > 0)
         {
             MessageBox.Show("系统提示", "用户添加成功!");
         }
         else
         {
             MessageBox.Show("系统提示", "用户添加失败!");
         }
     }
 }