private void btnBack_Click(object sender, EventArgs e) { this.Hide(); FrMenu r = new FrMenu(); r.Visible = true; }
private void bunifuImageButton1_Click(object sender, EventArgs e) { FrMenu r = new FrMenu(); r.Visible = true; this.Hide(); }
private void btnLogin_Click_1(object sender, EventArgs e) { try { List <Usuario> TodaLaPeople = new List <Usuario>(); TodaLaPeople = BS.MantenimientoLogin._Instancia.Login(); int largo = Convert.ToInt32(TodaLaPeople.Count.ToString()); for (int i = 0; i < largo; i++) { String user = TodaLaPeople[i]._Username.ToString(); String pass = TodaLaPeople[i]._Pass.ToString(); String exUser = txtUsuario.Text; String exPass = txtPass.Text; if (exUser.Equals(user) && exPass.Equals(pass)) { if (exUser.Equals("admin")) { FrAdminMenu AM = new FrAdminMenu(); AM.Visible = true; this.Hide(); } else { FrMenu re = new FrMenu(); usuario = TodaLaPeople[i]._Nombre.ToString(); re._user = usuario; this.Hide(); re.Show(); } } else { lbIncorrecto.Visible = true; } } } catch (Exception) { throw; } }
private void btnRegistro_Click(object sender, EventArgs e) { try { getValues(true); user = txtNombre.Text; BS.MantenimientoLogin._Instancia.Insertar(usuario); FrMenu m = new FrMenu(); m._user = user; m.Visible = true; this.Close(); } catch (Exception) { lbExiste.Visible = true; } }