-option explicit
This commit is contained in:
@@ -152,6 +152,10 @@ Partial Class RegPoliza
|
|||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.LoadComplete
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.LoadComplete
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
Response.Redirect("/Contabilidad2/RegPrePolizaS.aspx")
|
||||||
|
End If
|
||||||
|
|
||||||
ViewState("Orden0") = ""
|
ViewState("Orden0") = ""
|
||||||
ViewState("Orden1") = ""
|
ViewState("Orden1") = ""
|
||||||
CvePrePoliza = -1
|
CvePrePoliza = -1
|
||||||
@@ -1612,7 +1616,7 @@ Partial Class RegPoliza
|
|||||||
Private Sub SiguienteFolio()
|
Private Sub SiguienteFolio()
|
||||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
|
||||||
Dim NumPoliza = ObjConta.GetNumeroPoliza(DdlTipoPoliza.SelectedValue.ToEntero, TxtFechaPoliza.Text.ToDate.ToString("yyyy-MM-dd"))
|
Dim NumPoliza As Integer = ObjConta.GetNumeroPoliza(DdlTipoPoliza.SelectedValue.ToEntero, TxtFechaPoliza.Text.ToDate.ToString("yyyy-MM-dd"))
|
||||||
|
|
||||||
If NumPoliza > 0 Then
|
If NumPoliza > 0 Then
|
||||||
TxtNumeroPoliza.Text = NumPoliza.ToString
|
TxtNumeroPoliza.Text = NumPoliza.ToString
|
||||||
@@ -1709,7 +1713,7 @@ Partial Class RegPoliza
|
|||||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo As Boolean = False
|
||||||
Dim n As Integer = 0
|
Dim n As Integer = 0
|
||||||
Try
|
Try
|
||||||
Select Case Tipo
|
Select Case Tipo
|
||||||
@@ -1771,7 +1775,7 @@ 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 Cuenta2 As String = AgregaComilla(Cuenta) 'Agregar otra comilla simple adicional cuando contenga una
|
||||||
|
|
||||||
Dim CveCuenta As String = ""
|
Dim CveCuenta As String = ""
|
||||||
If DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta2 & "'") IsNot Nothing Then
|
If DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta2 & "'") IsNot Nothing Then
|
||||||
@@ -1779,7 +1783,7 @@ Partial Class RegPoliza
|
|||||||
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 SegNeg2 As String = AgregaComilla(SegNeg) 'Agregar otra comilla simple adicional cuando contenga una
|
||||||
|
|
||||||
Dim IdSegNeg As String = ""
|
Dim IdSegNeg As String = ""
|
||||||
If DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg2 & "'") IsNot Nothing Then
|
If DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg2 & "'") IsNot Nothing Then
|
||||||
@@ -1842,9 +1846,9 @@ Partial Class RegPoliza
|
|||||||
|
|
||||||
Private Function AgregaComilla(str As String) As String
|
Private Function AgregaComilla(str As String) As String
|
||||||
If str.Contains("'") Then
|
If str.Contains("'") Then
|
||||||
Dim arr = Split(str, "'")
|
Dim arr As String() = Split(str, "'")
|
||||||
str = ""
|
str = ""
|
||||||
For i = 0 To arr.Length() - 1
|
For i As Integer = 0 To arr.Length() - 1
|
||||||
If i = arr.Length - 1 Then
|
If i = arr.Length - 1 Then
|
||||||
str += arr(i)
|
str += arr(i)
|
||||||
Else
|
Else
|
||||||
|
|||||||
Reference in New Issue
Block a user