Code Snippet
If ModoEdicion = False Then
'agregar registro
db = New SolicitantesDataDataContext()
Dim NewSolicitud As New tblSolicitantes With { _
.txtCedulaSolicitante = Me.TxtCedulaSolicitante.Text, _
.intCodSexo = Me.CboSexo.SelectedValue, _
.intCodEdoCivil = Me.CboEdoCivil.SelectedValue, _
.txtPrimerNombre = Me.TxtPrimerNombre.Text, _
.txtSegundoNombre = Me.TxtSegundoNombre.Text, _
.txtPrimerApellido = Me.TxtPrimerApellido.Text, _
.txtSegundoApellido = Me.TxtSegundoApellido.Text, _
.txtLugarNacimiento = Me.TxtLugarNacimiento.Text, _
.intCodPais = Me.CboPais.SelectedValue, _
.intCodDepartamento = Me.CboDepartamento.SelectedValue, _
.intCodMunicipio = Me.CboMunicipio.SelectedValue, _
.txtDireccionResd = Me.TxtDireccionResd.Text, _
.bolComparteJefatura = Me.ChkComparteJefatura.Checked, _
.bolEsDiscapacitado = Me.ChkEsDiscapacitado.Checked, _
.bolMayorEdad = Me.ChkMayorEdad.Checked, _
.intCodOcupacion = Me.CboOcupacion.SelectedValue, _
.txtNombreEmpleador = Me.TxtNombreEmpleador.Text, _
.txtDireccionEmpleador = Me.TxtDireccionEmpleador.Text, _
.txtObservaciones = Me.TxtObservaciones.Text, _
.intIngresoFamiliar = Me.TxtIngresoFamiliar.Text, _
.intPagoAlquiler = Me.TxtPagoAlquiler.Text, _
.intPagoAgua = Me.TxtPagoAgua.Text, _
.intPagoEnergia = Me.TxtPagoEnergia.Text, _
.bolTieneVehiculo = Me.ChkTieneVehiculo.Checked, _
.bolFamiliarTieneViviendaPropia = Me.ChkFamiliarTieneViviendaPropia.Checked, _
.bolTieneViviendaPropia = Me.ChkTieneViviendaPropia.Checked, _
.bolHaSidoBeneficiado = Me.ChkHaSidoBeneficiado.Checked}
db.tblSolicitantes.Add(NewSolicitud)
Try
db.SubmitChanges()
Catch
' Handle exception.
End Try
End If
End Sub