private void frmAbonados_FormClosed(object sender, FormClosedEventArgs e) { this.Hide(); fpr = (Principal)this.Owner; fpr.Pri_Load(usu); fpr.Show(); }
/// <summary> /// Evento click del boton aceptar /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnAceptar_Click(object sender, EventArgs e) { usu = new Usuario(); //pr = new Principal(usu); pr = (Principal) this.Owner; if (txtPassword.Text.Trim() == "" || txtUser.Text.Trim() == "") { MessageBox.Show(this, "Campos en blanco detectados, verifique!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { usu.Name = txtUser.Text.Trim(); usu.Password = txtPassword.Text.Trim(); con = new Connection(usu); if (con.Conexion()) { this.Hide(); pr.Pri_Load(usu); pr.Show(); } else { MessageBox.Show(this, "Usuario o contraseña incorrectos, Verifique!", "Advertencia!", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }
private void btnOut_Click(object sender, EventArgs e) { this.Hide(); fpr = (Principal)this.Owner; fpr.Pri_Load(usu); fpr.Show(); }
private void frmPrevistas_FormClosed(object sender, FormClosedEventArgs e) { fpr = (Principal)this.Owner; fpr.Pri_Load(user); fpr.Show(); }