This commit is contained in:
@@ -11,8 +11,47 @@ Imports System.Drawing
|
||||
Partial Class Inicio
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Dias() As String = {"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"}
|
||||
|
||||
Private Dias() As String = {"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"}
|
||||
|
||||
|
||||
Public Function GetFacturasCanceladasPendientesWS(objventas As ClsVentas, RFC As String, CveEmpresa As Integer, Optional showalert As Boolean = True) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
|
||||
Dim objServicio As Cancelacion.CancelacionSoapClient = New Cancelacion.CancelacionSoapClient()
|
||||
Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
|
||||
If resp.Estado = 0 Then
|
||||
Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))
|
||||
Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes)
|
||||
Dim theDataSet As DataSet = New DataSet()
|
||||
theDataSet.ReadXml(theReader)
|
||||
|
||||
If theDataSet.Tables(0).Rows(0)("Uuid").ToString() <> "null" Then
|
||||
Dim sb = New StringBuilder()
|
||||
|
||||
For Each item As DataRow In theDataSet.Tables(0).Rows
|
||||
sb.AppendFormat("{0};", item("Uuid").ToString())
|
||||
Next
|
||||
|
||||
If objventas.GetFacturasCanceladasPendientes(sb.ToString(), CveEmpresa) Then
|
||||
retorno = True
|
||||
End If
|
||||
|
||||
Else
|
||||
If showalert Then
|
||||
Alert("No se encontraron cancelaciones pendientes", ModExtensiones.TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Alert("Error al obtener cancelaciones pendientes: " & resp.Descripcion, ModExtensiones.TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
Me.OnError("Error al obtener cancelaciones pendientes: ", ex, "")
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
@@ -30,13 +69,12 @@ Partial Class Inicio
|
||||
End If
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
Using objventas As New ClsVentas
|
||||
If (objventas.GetFacturasCanceladasPendientesWS(UsuarioActual.Empresa.RFC, UsuarioActual.CveEmpresa, False)) AndAlso objventas.DtResultados.Rows.Count > 0 Then
|
||||
If (GetFacturasCanceladasPendientesWS(objventas, UsuarioActual.Empresa.RFC, UsuarioActual.CveEmpresa, False)) AndAlso objventas.DtResultados.Rows.Count > 0 Then
|
||||
RegistraScript("$('#ModalMitotereCancelaPendiente').modal();", "mitoterosatCanceladasPendientesWS")
|
||||
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
'Exit Sub
|
||||
|
||||
'RESTRICCION AD
|
||||
If Not IsNothing(Request("ADCod")) Then
|
||||
|
||||
Reference in New Issue
Block a user