Se agrega comilla simple cuando contenga una
This commit is contained in:
@@ -1819,15 +1819,19 @@ Partial Class RegPoliza
|
|||||||
|
|
||||||
Dim Referencia As String = Row("Referencia").ToString
|
Dim Referencia As String = Row("Referencia").ToString
|
||||||
Dim Cuenta As String = Row("Código Cuenta").ToString + " - " + Row("Nombre Cuenta").ToString
|
Dim Cuenta As String = Row("Código Cuenta").ToString + " - " + Row("Nombre Cuenta").ToString
|
||||||
|
Dim Cuenta2 = AgregaComilla(Cuenta) 'Agregar otra comilla simple adicional cuando contenga una
|
||||||
|
|
||||||
Dim CveCuenta As String = ""
|
Dim CveCuenta As String = ""
|
||||||
If DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta & "'") IsNot Nothing Then
|
If DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta2 & "'") IsNot Nothing Then
|
||||||
CveCuenta = DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta & "'")("Id").ToString
|
CveCuenta = DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta2 & "'")("Id").ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim SegNeg As String = Row("SegNeg").ToString
|
Dim SegNeg As String = Row("SegNeg").ToString
|
||||||
|
Dim SegNeg2 = AgregaComilla(SegNeg) 'Agregar otra comilla simple adicional cuando contenga una
|
||||||
|
|
||||||
Dim IdSegNeg As String = ""
|
Dim IdSegNeg As String = ""
|
||||||
If DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg & "'") IsNot Nothing Then
|
If DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg2 & "'") IsNot Nothing Then
|
||||||
IdSegNeg = DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg & "'")("Id").ToString
|
IdSegNeg = DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg2 & "'")("Id").ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Concepto As String = Row("Nombre/Concepto").ToString
|
Dim Concepto As String = Row("Nombre/Concepto").ToString
|
||||||
@@ -1884,4 +1888,18 @@ Partial Class RegPoliza
|
|||||||
DescargarFormato()
|
DescargarFormato()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function AgregaComilla(str As String) As String
|
||||||
|
If str.Contains("'") Then
|
||||||
|
Dim arr = Split(str, "'")
|
||||||
|
str = ""
|
||||||
|
For i = 0 To arr.Length() - 1
|
||||||
|
If i = arr.Length - 1 Then
|
||||||
|
str += arr(i)
|
||||||
|
Else
|
||||||
|
str += arr(i) + "''"
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Return str
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user