private void button7_Click(object sender, EventArgs e) { frmMenuRH M = new frmMenuRH(); M.Visible = true; this.Close(); }
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); } }