Guest User

Untitled

a guest
Dec 9th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. Imports Oracle.DataAccess.Client
  2. Imports SIMULADOR_DAO
  3.  
  4. Public Class Registrar
  5. Inherits System.Web.UI.Page
  6.  
  7.  
  8. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  9.  
  10. End Sub
  11.  
  12. Protected Sub btnRegistrar_Click(sender As Object, e As EventArgs) Handles btnRegistrar.Click
  13.  
  14. Dim clRegistrar As New SIMULADOR_LOG.clsExamenLOG
  15. Dim User As New SIMULADOR_ENT.clsUsuarioSim
  16. With User
  17. .dni_user = txtDNI.Text
  18. .ape_pat_user = txtApellidoPaterno.Text
  19. .ape_mat_user = txtApellidoMaterno.Text
  20. .nombre_user = txtNombres.Text
  21. .direccion_user = txtDireccion.Text
  22. .celular_user = txtCelular.Text
  23. .correo_user = txtCorreo.Text
  24. '.ubigeo =
  25. .fech_nacimiento = txtFechaNacimiento.Text
  26. End With
  27.  
  28. Dim mensajeLog As String = clRegistrar.RegistrarUsuario(User)
  29.  
  30. Dim Mensaje As String = "<script type=""text/javascript"">" &
  31. "Message('El sistema dice: " & mensajeLog & "')</script>"
  32.  
  33. ClientScript.RegisterStartupScript(Me.GetType, "msg", Mensaje)
  34.  
  35. End Sub
  36.  
  37. Protected Sub cmbDepartamento_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbDepartamento.SelectedIndexChanged
  38.  
  39. End Sub
  40.  
  41. Protected Sub cmbProvincia_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbProvincia.SelectedIndexChanged
  42.  
  43. End Sub
  44.  
  45. Protected Sub cmbDistrito_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbDistrito.SelectedIndexChanged
  46.  
  47. End Sub
  48.  
  49. Function Consultar(strSQL As String) As DataSet
  50.  
  51. Dim strConn As String = "User Id=WEB;Password=1Ytop6;Data Source=DES;Pooling=False"
  52.  
  53. Dim conexion As New OracleConnection(strConn)
  54.  
  55. Dim cmd As New OracleCommand("SELECT DISTINCT dpto FROM up100.UBIGEO;", conexion)
  56.  
  57. cmd.CommandType = CommandType.Text
  58. conexion.Open()
  59.  
  60. Dim oda As New OracleDataAdapter(cmd)
  61.  
  62. Dim ds As New DataSet
  63. oda.Fill(ds)
  64.  
  65. conexion.Close()
  66.  
  67. Return ds
  68.  
  69. End Function
  70.  
  71. End Class
Add Comment
Please, Sign In to add comment