private void button1_Click(object sender, EventArgs e) { Form Interfaz = new WFormsMenu(); Interfaz.Show(); this.Hide(); }
private void btnAcceder_Click(object sender, EventArgs e) { try { lblLoad.Visible = true; bool login = Conexion.session(txtUser.Text, txtpass.Text); if (login) { lbMsgU.Visible = false; lbMsgP.Visible = false; this.Hide(); WFormsMenu Menu = new WFormsMenu(); Menu.Show(); } else { msgErrorP("Ingrese usuario correcto"); } lblLoad.Visible = false; //if (txtUser.Text != "Usuario") //{ // lbMsgU.Visible = false; // if (txtpass.Text != "ContraseƱa") // { // lbMsgP.Visible = false; // this.Hide(); // WFormsMenu Menu = new WFormsMenu(); // Menu.Show(); // } // else msgErrorP("Ingrese ContraseƱa"); //} //else msgErrorU("Ingrese Nombre de Usuario"); } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); lblLoad.Visible = false; } }