private void Inicializar() { try { Txt_Perfil.Text = ""; Txt_Perfil.Focus(); _codPerfilSel = 0; } catch (Exception ex) { throw ex; } }
private void Guardar() { try { if (_codPerfilSel == 1) { MessageBox.Show("El perfil administrador no puede ser modificado.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); Txt_Perfil.SelectAll(); return; } if (_gestionBLL.RegistrarPerfil(_codPerfilSel, Txt_Perfil.Text)) { MessageBox.Show("Perfil registrado correctamente.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); ListarPerfiles(); Inicializar(); } else { MessageBox.Show("No se pudo completar el proceso.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch (Exception ex) { throw ex; } }