Пример #1
0
        //clears the login information and disables all controls on the panel.
        //Used when right username and password is provided in order to transition to the next panel.
        private void LoginClear()
        {
            attempts = 0;
            Username_txt.Clear();
            Password_txt.Clear();
            Username_txt.Enabled            = false;
            Password_txt.Enabled            = false;
            Login_submit.Enabled            = false;
            Incorrect_Login_Warning.Visible = false;
            SignInPage.Visible = false;

            //TODO: delete red outline on textboxes.
        }
Пример #2
0
 private void Aceptar_btn_Click(object sender, EventArgs e)
 {
     if (User_txt.Text.Length != 0)
     {
         string Usuario  = User_txt.Text;
         string Password = Password_txt.Text;
         bool   Log      = false;
         if (Password_txt.Text.Length != 0)
         {
             Conexiones Conexion = new Conexiones();
             Log = Conexion.Login(Usuario, Password);
             if (Log == true)
             {
                 //usuario anterior administrador rh
                 if (Usuario == "raul")
                 {
                     this.Hide();
                     User_txt.Clear();
                     Password_txt.Clear();
                     frmMenuRH M = new frmMenuRH(1, Usuario);
                     M.Show();
                 }
                 else
                 {
                 }
             }
         }
         else
         {
             MessageBox.Show("Introdusca su contraseña!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
     }
     else
     {
         MessageBox.Show("Introdusca su usuario!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Пример #3
0
 // Clear button funcionality
 private void ClearBtn_Click(object sender, RoutedEventArgs e)
 {
     Username_txt.Clear();
     Password_txt.Clear();
     Username_txt.Focus();
 }
 private void Password_txt_Click(object sender, EventArgs e)
 {
     Password_txt.Clear();
     Password_txt.ForeColor = Color.Black;
 }