Ejemplo n.º 1
0
 private void txt_UserName_Leave(object sender, EventArgs e)
 {
     if (txt_UserName.Text != "")
     {
         if (!ub.checkUserNemeBll(txt_UserName.Text.Trim(), "checkUserNeme"))
         {
             lb_usersCheck.Text      = "√";
             lb_usersCheck.ForeColor = Color.Green;
             checkUserName           = true;
         }
         else
         {
             lb_usersCheck.Text      = "用户名已存在!";
             lb_usersCheck.ForeColor = Color.Red;
             checkUserName           = false;
         }
     }
     else
     {
         lb_usersCheck.Text      = "请输入用户名";
         lb_usersCheck.ForeColor = Color.Red;
     }
 }