/// <summary> /// Metodo que crea un nuevo registro /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnNuevo_Click(object sender, EventArgs e) { frmEdicionUsuario ofrmEdicion = new frmEdicionUsuario(); ofrmEdicion.ShowDialog(); if (ofrmEdicion.Aceptar) { UsuarioD oUsuarioD = new UsuarioD(this.cnx); oUsuarioD.agregarUsuario(ofrmEdicion.OUsuarioL); if (oUsuarioD.Error) { MessageBox.Show("Error agregando los datos:" + oUsuarioD.ErrorDescription); } else { MessageBox.Show("Usuario agregado!!!"); this.cargarGrid(); } } }