AerolineaFrba.Registro_de_Usuario.Form1.registrarUsuario C# (CSharp) Method

registrarUsuario() private method

private registrarUsuario ( ) : void
return void
        private void registrarUsuario()
        {
            SQLManager manager = new SQLManager().generarSP("RegistrarUsuario")
                                                 .agregarStringSP("@Usuario", txtUsuario)
                                                 .agregarStringSP("@Contrasenia", Encriptador.encriptarSegunSHA256(txtPassword.Text));

            try
            {
                manager.ejecutarSP();
                MessageBox.Show("El usuario " + txtUsuario.Text + " ha sido registrado de forma correcta", "Registro exitoso", MessageBoxButtons.OK);
                this.Close();
            }
            catch(Exception e)
            {
                MessageBox.Show(e.Message, "Error en el registro", MessageBoxButtons.OK);
            }
        }