-- nuevo globaldtcontratosestatus
This commit is contained in:
@@ -4,6 +4,7 @@ Option Explicit On
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
Imports Profact.TimbraCFDI40
|
||||
|
||||
Public Class ClsContratos
|
||||
Implements IDisposable
|
||||
@@ -556,7 +557,7 @@ Public Class ClsContratos
|
||||
|
||||
Public Function GetContratosEstatus(CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosEstatusGET")
|
||||
DataAdapter("PA_Con_ContratosEstatusGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
@@ -571,6 +572,95 @@ Public Class ClsContratos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddContratoEstatus(ContratoEstatus As String, TipoEstatus As Integer, BackgroundColor As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosEstatusAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@ContratoEstatus", SqlDbType.VarChar).Value = ContratoEstatus
|
||||
.Add("@TipoEstatus", SqlDbType.Int).Value = TipoEstatus
|
||||
.Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar al Catálogo de Contratos Estatus.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateContratoEstatus(CveContratoEstatus As Integer, ContratoEstatus As String, TipoEstatus As Integer, Estatus As Boolean, BackgroundColor As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosEstatusUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContratoEstatus", SqlDbType.Int).Value = CveContratoEstatus
|
||||
.Add("@ContratoEstatus", SqlDbType.VarChar).Value = ContratoEstatus
|
||||
.Add("@TipoEstatus", SqlDbType.Int).Value = TipoEstatus
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar al Catálogo de Contratos Estatus.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveContratoEstatus(CveContratoEstatus As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosEstatusRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContratoEstatus", SqlDbType.Int).Value = CveContratoEstatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el contrato Estatus.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpdateContratoAF(CveContrato As Integer, CveAF As Integer, CveChofer As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Con_ContratoAFUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("Número: 2601;") Then
|
||||
Alert("Ya existe un contrato con el mismo número de contrato registrado: " & NumeroContrato & ".", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
OnError("Ocurrió un error al actualizar el Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -1608,6 +1608,33 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTCaracteristicasOpciones") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#Region "C R M "
|
||||
Public Shared Property GlobalDTCRMTipoProceso(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTCRMTipoProceso-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim cRMService As New ADSNetLibrary.SIGAPI.Services.CRM.CRMService(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim tipoProceso As New ADSNetLibrary.SIGAPI.Models.CRM.Request.RequestTipoProceso(CveEmpresa)
|
||||
' Dim ObjTipoProceso As List(Of ADSNetLibrary.SIGAPI.Models.ResponseModel(Of ADSNetLibrary.SIGAPI.Models.CRM.Request.ResponseTipoProceso)) = cRMService.GetTipoProcesoCRM(tipoProceso)
|
||||
Dim ObjTipoProceso As ADSNetLibrary.SIGAPI.Models.ResponseModel(Of List(Of ADSNetLibrary.SIGAPI.Models.CRM.Response.ResponseTipoProceso))
|
||||
ObjTipoProceso = cRMService.GetTipoProcesoCRM(tipoProceso)
|
||||
|
||||
If ObjTipoProceso.Result.Count > 0 Then
|
||||
HttpContext.Current.Application(AppNombre) = ObjTipoProceso.Result.QueryToDataTable(True)
|
||||
End If
|
||||
|
||||
End If
|
||||
GlobalDTCRMTipoProceso = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTCRMTipoProceso-{CveEmpresa}"
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
'Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable
|
||||
' Get
|
||||
' If CveEmpresa <> -1 Then
|
||||
@@ -2334,6 +2361,28 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTContratosSecciones") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared Property GlobalDTContratosEstatus(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTContratosEstatus-{CveEmpresa}"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Using ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosEstatus(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjContratos.DtResultados
|
||||
End Using
|
||||
End If
|
||||
'Dim StrSQL As New StringBuilder
|
||||
'StrSQL.Append(" 1 = 1 ")
|
||||
'If CveContrato >= 0 Then StrSQL.AppendFormat(" AND CveContrato = {0} ", CveContrato)
|
||||
'If CveSubProyecto >= 0 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0} ", CveSubProyecto)
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), "", "", DataViewRowState.CurrentRows)
|
||||
GlobalDTContratosEstatus = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTContratosEstatus-{CveEmpresa}"
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Public Shared Property GlobalDTContratos(CveEmpresa As Integer, Optional CveContrato As Integer = -1, Optional CveSubProyecto As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTContratos-{CveEmpresa}"
|
||||
@@ -5714,7 +5763,7 @@ Public Class ClsPaginas
|
||||
End If
|
||||
|
||||
If UsarStimul Then
|
||||
Dim bytesPDF = PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, UsarStimul:=UsarStimul)
|
||||
Dim bytesPDF As Byte() = PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, UsarStimul:=UsarStimul)
|
||||
If DescargarArchivo Then
|
||||
ImprimirbytesPDF(bytesPDF, Vta.SerieFolio, "PDF")
|
||||
End If
|
||||
@@ -5723,7 +5772,7 @@ Public Class ClsPaginas
|
||||
If Archivo.Exists Then
|
||||
If RegenerarPDF Then
|
||||
Archivo.Delete()
|
||||
Dim bytesPDF = PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, RegenerarQR:=True)
|
||||
Dim bytesPDF As Byte() = PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, RegenerarQR:=True)
|
||||
If DescargarArchivo Then
|
||||
ImprimirbytesPDF(bytesPDF, Vta.SerieFolio, "PDF")
|
||||
End If
|
||||
@@ -5744,7 +5793,7 @@ Public Class ClsPaginas
|
||||
Archivo = Nothing
|
||||
End If
|
||||
Else
|
||||
Dim bytesPDF = PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=Guardar, SubReportData:=CartaPorte)
|
||||
Dim bytesPDF As Byte() = PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=Guardar, SubReportData:=CartaPorte)
|
||||
If DescargarArchivo Then
|
||||
ImprimirbytesPDF(bytesPDF, Vta.SerieFolio, "PDF")
|
||||
End If
|
||||
@@ -5970,8 +6019,8 @@ Public Class ClsPaginas
|
||||
namespaces.AddNamespace("cartaporte20", "http://www.sat.gob.mx/CartaPorte20")
|
||||
namespaces.AddNamespace("cartaporte30", "http://www.sat.gob.mx/CartaPorte30")
|
||||
|
||||
Dim Nodos30 = XMLDoc.SelectSingleNode("//cartaporte30:CartaPorte", namespaces)
|
||||
Dim Nodos20 = XMLDoc.SelectSingleNode("//cartaporte20:CartaPorte", namespaces)
|
||||
Dim Nodos30 As XmlNode = XMLDoc.SelectSingleNode("//cartaporte30:CartaPorte", namespaces)
|
||||
Dim Nodos20 As XmlNode = XMLDoc.SelectSingleNode("//cartaporte20:CartaPorte", namespaces)
|
||||
|
||||
If Nodos30 IsNot Nothing Then
|
||||
VersionCCP = "3.0"
|
||||
@@ -7206,12 +7255,12 @@ Public Class ClsPaginas
|
||||
End If
|
||||
|
||||
If NombreArchivo = "FacturaUSA" Then
|
||||
Dim DtBaseTotales = Vta.DtDeduccion.Clone()
|
||||
Dim DtBaseTotales As DataTable = Vta.DtDeduccion.Clone()
|
||||
|
||||
If Vta.DtDeduccion IsNot Nothing Then
|
||||
Dim RowTotal_USA = DtBaseTotales.NewRow()
|
||||
Dim RowPAYMENTS_USA = DtBaseTotales.NewRow()
|
||||
Dim RowBALANCE_USA = DtBaseTotales.NewRow()
|
||||
Dim RowTotal_USA As DataRow = DtBaseTotales.NewRow()
|
||||
Dim RowPAYMENTS_USA As DataRow = DtBaseTotales.NewRow()
|
||||
Dim RowBALANCE_USA As DataRow = DtBaseTotales.NewRow()
|
||||
|
||||
Dim TOTAL_USA As Decimal = 0
|
||||
Dim PAYMENTS_USA As Decimal = 0
|
||||
@@ -10053,6 +10102,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Contratos/CatRefrendos.aspx".ToUpper(), 644)
|
||||
PaginaDict.Add("/Contratos/RepContratosFianzas.aspx".ToUpper(), 646)
|
||||
PaginaDict.Add("/Contratos/RepPedidosDevolucionesXContrato.aspx".ToUpper(), 705)
|
||||
PaginaDict.Add("/Contratos/CatContratosEstatus.aspx".ToUpper(), 173)
|
||||
#End Region
|
||||
#Region "CrM"
|
||||
PaginaDict.Add("/CRM/CatTipoProceso.aspx".ToUpper(), 1301)
|
||||
@@ -10709,6 +10759,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)
|
||||
PaginaDict.Add("/Acumuladores/RepPolizasVirtuales.aspx".ToUpper(), 1322)
|
||||
PaginaDict.Add("/Acumuladores/RepAcumuladoresVigencia.aspx".ToUpper(), 174)
|
||||
PaginaDict.Add("/Acumuladores/RepRecolecciones.aspx".ToUpper(), 563)
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Reference in New Issue
Block a user