Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -613,7 +613,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'Private ReadOnly Property Ruta As String
|
||||
' Get
|
||||
' Return AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
|
||||
' Return ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\"
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
@@ -1704,7 +1704,7 @@ Partial Class Compras_Compras
|
||||
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
|
||||
|
||||
Dim XMLDoc As New XmlDocument
|
||||
Dim Archivo As String = String.Format("{0}Empresas\{1}\Compras\{2}\{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, dr("RFCDe"), dr("XML"))
|
||||
Dim Archivo As String = String.Format("{0}Empresas\{1}\Compras\{2}\{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, dr("RFCDe"), dr("XML"))
|
||||
If IO.File.Exists(Archivo) Then
|
||||
|
||||
Dim Validada As Boolean = True
|
||||
|
||||
@@ -10,26 +10,46 @@ Imports System.Linq
|
||||
Partial Class Compras_EvaluacionProveedor
|
||||
Inherits ClsPaginas
|
||||
#Region "P R O P I E D A D E S"
|
||||
Private Property CveEvaluacionProveedor() As Integer
|
||||
Private Property CveEvaluacionProveedor() As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveEvaluacionProveedor")), -1, CInt(ViewState("CveEvaluacionProveedor")))
|
||||
Return If(IsNothing(ViewState("CveEvaluacionProveedor")), -1, CInt(ViewState("CveEvaluacionProveedor")))
|
||||
End Get
|
||||
Set
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveEvaluacionProveedor") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveProveedor() As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveProveedor")), -1, CInt(ViewState("CveProveedor")))
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveProveedor() As Integer
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveProveedor") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCompra() As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveCompra")), -1, CInt(ViewState("CveCompra")))
|
||||
Return If(IsNothing(ViewState("CveProveedor")), -1, CInt(ViewState("CveProveedor")))
|
||||
End Get
|
||||
Set
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveCompra") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtPreguntas() As DataTable
|
||||
Get
|
||||
Return If(IsNothing(ViewState("DtPreguntas")), New DataTable(), DirectCast(ViewState("DtPreguntas"), DataTable))
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCompra() As Integer
|
||||
End Get
|
||||
Set
|
||||
ViewState("DtPreguntas") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CorreoEnvio() As String
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CorreoEnvio")), "", ViewState("CorreoEnvio").ToString())
|
||||
Return If(IsNothing(ViewState("CveCompra")), -1, CInt(ViewState("CveCompra")))
|
||||
End Get
|
||||
End Get
|
||||
Set
|
||||
ViewState("CorreoEnvio") = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
@@ -264,7 +284,7 @@ Partial Class Compras_EvaluacionProveedor
|
||||
Dim archivoCarta As New ClsSisMail.ArchivoMail()
|
||||
archivoCarta.NombreArchivo = "Carta Evaluacion.pdf"
|
||||
Try
|
||||
|
||||
Dim PathRoot As String = ModExtensiones.DirectorioBaseEmpresas
|
||||
Dim Documento As String = "CartaProveedor.docx"
|
||||
Dim PathSource As String = $"{UsuarioActual.Empresa.Ruta}\Formatos\Plantillas\{Documento}"
|
||||
Dim PathDestino As String = PathRoot & "Temp\" & Now.Ticks & Documento
|
||||
@@ -298,7 +318,7 @@ Partial Class Compras_EvaluacionProveedor
|
||||
Dim archivoCarta As New ClsSisMail.ArchivoMail()
|
||||
archivoCarta.NombreArchivo = "Formato Evaluacion Proveedor.pdf"
|
||||
Try
|
||||
ObjCarta.GuardarStreamPDF()
|
||||
Dim PathRoot As String = ModExtensiones.DirectorioBaseEmpresas
|
||||
Dim Documento As String = "FormatoEvaluacionProveedor.docx"
|
||||
Dim PathSource As String = $"{UsuarioActual.Empresa.Ruta}\Formatos\Plantillas\{Documento}"
|
||||
Dim PathDestino As String = PathRoot & "Temp\" & Now.Ticks & Documento
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -328,136 +328,136 @@ Partial Class Compras_Proveedores
|
||||
|
||||
|
||||
|
||||
Property CveDocumentacionElectronica As Integer
|
||||
Get
|
||||
If ViewState("CvePersonalClienteDocumentacion") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return DirectCast(ViewState("CvePersonalClienteDocumentacion"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePersonalClienteDocumentacion") = value
|
||||
End Set
|
||||
Property CveDocumentacionElectronica As Integer
|
||||
Get
|
||||
If ViewState("CvePersonalClienteDocumentacion") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return DirectCast(ViewState("CvePersonalClienteDocumentacion"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePersonalClienteDocumentacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CveDocumentacion As Integer
|
||||
Get
|
||||
If ViewState("CveDocumentacion") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return DirectCast(ViewState("CveDocumentacion"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveDocumentacion") = value
|
||||
End Set
|
||||
Property CveDocumentacion As Integer
|
||||
Get
|
||||
If ViewState("CveDocumentacion") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return DirectCast(ViewState("CveDocumentacion"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveDocumentacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Documentacion As String
|
||||
Get
|
||||
If ViewState("Documentacion") Is Nothing Then
|
||||
Return "-1"
|
||||
Else
|
||||
Return ViewState("Documentacion").ToString
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Documentacion") = value
|
||||
End Set
|
||||
Property Documentacion As String
|
||||
Get
|
||||
If ViewState("Documentacion") Is Nothing Then
|
||||
Return "-1"
|
||||
Else
|
||||
Return ViewState("Documentacion").ToString
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Documentacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property AdjuntoDocumentacion As String
|
||||
Get
|
||||
If ViewState("AdjuntoDocumentacion") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return ViewState("AdjuntoDocumentacion").ToString
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("AdjuntoDocumentacion") = value
|
||||
End Set
|
||||
Property AdjuntoDocumentacion As String
|
||||
Get
|
||||
If ViewState("AdjuntoDocumentacion") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return ViewState("AdjuntoDocumentacion").ToString
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("AdjuntoDocumentacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Property DiasVigencia As Integer
|
||||
Get
|
||||
If ViewState("DiasVigencia") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return DirectCast(ViewState("DiasVigencia"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("DiasVigencia") = value
|
||||
End Set
|
||||
Property DiasVigencia As Integer
|
||||
Get
|
||||
If ViewState("DiasVigencia") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return DirectCast(ViewState("DiasVigencia"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("DiasVigencia") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property AplicaFechaVencimiento As Boolean
|
||||
Get
|
||||
If ViewState("AplicaFechaVencimiento") Is Nothing Then
|
||||
Return True
|
||||
Else
|
||||
Return DirectCast(ViewState("AplicaFechaVencimiento"), Boolean)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaFechaVencimiento") = value
|
||||
End Set
|
||||
Property AplicaFechaVencimiento As Boolean
|
||||
Get
|
||||
If ViewState("AplicaFechaVencimiento") Is Nothing Then
|
||||
Return True
|
||||
Else
|
||||
Return DirectCast(ViewState("AplicaFechaVencimiento"), Boolean)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaFechaVencimiento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaVigencia As Date
|
||||
Get
|
||||
If ViewState("FechaVigencia") Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return ViewState("FechaVigencia").ToString.ToDate
|
||||
End If
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaVigencia") = value
|
||||
End Set
|
||||
Private Property FechaVigencia As Date
|
||||
Get
|
||||
If ViewState("FechaVigencia") Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return ViewState("FechaVigencia").ToString.ToDate
|
||||
End If
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaVigencia") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Estatus As Integer
|
||||
Get
|
||||
If ViewState("Estatus") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return DirectCast(ViewState("Estatus"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Estatus") = value
|
||||
End Set
|
||||
Property Estatus As Integer
|
||||
Get
|
||||
If ViewState("Estatus") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return DirectCast(ViewState("Estatus"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Estatus") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property ObservacionDocumentacion As String
|
||||
Get
|
||||
If ViewState("ObservacionDocumentacion") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return ViewState("ObservacionDocumentacion").ToString
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("ObservacionDocumentacion") = value
|
||||
End Set
|
||||
Property ObservacionDocumentacion As String
|
||||
Get
|
||||
If ViewState("ObservacionDocumentacion") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return ViewState("ObservacionDocumentacion").ToString
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("ObservacionDocumentacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FechaLimite As Date
|
||||
Get
|
||||
If ViewState("FechaLimite") Is Nothing Then
|
||||
Return Date.Now.AddDays(15)
|
||||
Else
|
||||
Return ViewState("FechaLimite").ToString.ToDate
|
||||
End If
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaLimite") = value
|
||||
End Set
|
||||
Private Property FechaLimite As Date
|
||||
Get
|
||||
If ViewState("FechaLimite") Is Nothing Then
|
||||
Return Date.Now.AddDays(15)
|
||||
Else
|
||||
Return ViewState("FechaLimite").ToString.ToDate
|
||||
End If
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaLimite") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DTDocumentacion As DataTable
|
||||
@@ -709,7 +709,7 @@ Partial Class Compras_Proveedores
|
||||
|
||||
Try
|
||||
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0)
|
||||
XMLDoc.Load(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & dr("CveEmpresa").ToString & "\Compras\" & dr("RFCDe").ToString & "\" & dr("XML").ToString)
|
||||
XMLDoc.Load(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & dr("CveEmpresa").ToString & "\Compras\" & dr("RFCDe").ToString & "\" & dr("XML").ToString)
|
||||
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
||||
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
||||
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||
@@ -2625,7 +2625,7 @@ Partial Class Compras_Proveedores
|
||||
Dim filemove As String = ""
|
||||
|
||||
For Each fileItem As Archivo In filesgral
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "")
|
||||
filemove = fileItem.filename
|
||||
Next
|
||||
|
||||
@@ -2720,75 +2720,75 @@ Partial Class Compras_Proveedores
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub UploadModal_ClickDocumentacion(sender As Object, e As EventArgs)
|
||||
|
||||
Public Sub UploadModal_ClickDocumentacion(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
' Dim chkEstatus As CheckBox
|
||||
CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero
|
||||
CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString.ToEntero
|
||||
Documentacion = GvRow.DataKey("Documentacion")
|
||||
AdjuntoDocumentacion = GvRow.DataKey("Adjunto")
|
||||
|
||||
|
||||
'DiasVigencia = GvRow.DataKey("DiasVigencia").ToString.ToEntero
|
||||
Dim x As String = GvRow.DataKey("AplicaFechaVencimiento")
|
||||
If GvRow.DataKey("AplicaFechaVencimiento") = "1" Then AplicaFechaVencimiento = True Else AplicaFechaVencimiento = False
|
||||
|
||||
If GvRow.DataKey("Adjunto").ToString.Length > 0 Then
|
||||
FechaVigencia = GvRow.DataKey("Adjunto").ToString.ToDate
|
||||
Else
|
||||
FechaVigencia = Nothing
|
||||
End If
|
||||
|
||||
|
||||
Estatus = GvRow.DataKey("Estatus").ToEntero
|
||||
|
||||
'If chkEstatus.Checked Then
|
||||
' Estatus = 1
|
||||
'Else
|
||||
' Estatus = 0
|
||||
'End If
|
||||
|
||||
ObservacionDocumentacion = GvRow.FCTextBox("TxtObservaciones").Text.Trim.ToUpper
|
||||
FechaLimite = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate
|
||||
|
||||
AdjuntoDocumentacion = GvRow.DataKey("Adjunto")
|
||||
|
||||
LtlModalUploadTitulo.Text = "Subir " & Documentacion
|
||||
|
||||
UpModalTitleUploadDocumento.Update()
|
||||
|
||||
RegistraScript("$('#ModalUploadDoc').modal({ backdrop: 'static', keyboard: false});")
|
||||
|
||||
CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero
|
||||
CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString.ToEntero
|
||||
Documentacion = GvRow.DataKey("Documentacion")
|
||||
AdjuntoDocumentacion = GvRow.DataKey("Adjunto")
|
||||
|
||||
|
||||
'DiasVigencia = GvRow.DataKey("DiasVigencia").ToString.ToEntero
|
||||
Dim x As String = GvRow.DataKey("AplicaFechaVencimiento")
|
||||
If GvRow.DataKey("AplicaFechaVencimiento") = "1" Then AplicaFechaVencimiento = True Else AplicaFechaVencimiento = False
|
||||
|
||||
If GvRow.DataKey("Adjunto").ToString.Length > 0 Then
|
||||
FechaVigencia = GvRow.DataKey("Adjunto").ToString.ToDate
|
||||
Else
|
||||
FechaVigencia = Nothing
|
||||
End If
|
||||
|
||||
|
||||
Estatus = GvRow.DataKey("Estatus").ToEntero
|
||||
|
||||
'If chkEstatus.Checked Then
|
||||
' Estatus = 1
|
||||
'Else
|
||||
' Estatus = 0
|
||||
'End If
|
||||
|
||||
ObservacionDocumentacion = GvRow.FCTextBox("TxtObservaciones").Text.Trim.ToUpper
|
||||
FechaLimite = GvRow.FCTextBox("TxtFechaLimite").Text.ToDate
|
||||
|
||||
AdjuntoDocumentacion = GvRow.DataKey("Adjunto")
|
||||
|
||||
LtlModalUploadTitulo.Text = "Subir " & Documentacion
|
||||
|
||||
UpModalTitleUploadDocumento.Update()
|
||||
|
||||
RegistraScript("$('#ModalUploadDoc').modal({ backdrop: 'static', keyboard: false});")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDocs_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocs.RowDataBound
|
||||
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Protected Sub GvDocs_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocs.RowDataBound
|
||||
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString
|
||||
|
||||
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||
Dim ImgUpload As LinkButton = e.Row.FCLinkButton("ImgUpload")
|
||||
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
|
||||
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||
Dim ImgUpload As LinkButton = e.Row.FCLinkButton("ImgUpload")
|
||||
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
|
||||
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
|
||||
Dim ChkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
|
||||
' Dim txtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia")
|
||||
Dim CveDocumentacionElectronica As String = e.Row.DataKey("CveDocumentacionElectronica")
|
||||
|
||||
Dim requerido As Boolean = Boolean.Parse(e.Row.DBCampo("Requerido"))
|
||||
|
||||
'Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
|
||||
Dim separado As Char() = ".".ToCharArray
|
||||
Dim array() As String = Adjunto.Split(separado)
|
||||
Dim extencion As String = ""
|
||||
|
||||
Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString.ToEntero
|
||||
Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString = "1", True, False)
|
||||
Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString = "1", True, False)
|
||||
|
||||
Dim requerido As Boolean = Boolean.Parse(e.Row.DBCampo("Requerido"))
|
||||
|
||||
'Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
|
||||
Dim separado As Char() = ".".ToCharArray
|
||||
Dim array() As String = Adjunto.Split(separado)
|
||||
Dim extencion As String = ""
|
||||
|
||||
Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString.ToEntero
|
||||
Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString = "1", True, False)
|
||||
Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString = "1", True, False)
|
||||
|
||||
txtFechaLimite.Visible = If(AplicaDiasLimite, True, False)
|
||||
' txtFechaVigencia.Visible = If(AplicaFechaVencimiento, True, False)
|
||||
|
||||
@@ -2798,81 +2798,81 @@ Partial Class Compras_Proveedores
|
||||
ChkEstatus.Checked = False
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then
|
||||
' txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
' If DateTime.Today > e.Row.DBCampo("FechaVigencia").ToString.ToDateTime Then
|
||||
' txtFechaVigencia.ForeColor = Drawing.Color.Red
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
If array.Length > 0 Then
|
||||
extencion = array(array.Length - 1)
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then
|
||||
' txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
' If DateTime.Today > e.Row.DBCampo("FechaVigencia").ToString.ToDateTime Then
|
||||
' txtFechaVigencia.ForeColor = Drawing.Color.Red
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
If array.Length > 0 Then
|
||||
extencion = array(array.Length - 1)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(3) Then
|
||||
' chkEstatus.Checked = True
|
||||
ImgUpload.Visible = False
|
||||
Else
|
||||
'chkEstatus.Checked = False
|
||||
End If
|
||||
|
||||
txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
'If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then
|
||||
' txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
'End If
|
||||
|
||||
'Dim scripMascara = "$('#" & txtFechaLimite.ClientID & "').mask('00/00/0000');$('#" & txtFechaVigencia.ClientID & "').mask('00/00/0000');"
|
||||
'RegistraScript(scripMascara, "scriptMascara")
|
||||
|
||||
If Adjunto.Trim.Length > 0 Then
|
||||
|
||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||
|
||||
If File.Exists(linkDescargaArchivo) Then
|
||||
ImgDownLoad.Visible = True
|
||||
|
||||
If extencion.Length > 0 Then
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica & "." & extencion)
|
||||
Else
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica)
|
||||
End If
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
End If
|
||||
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
End If
|
||||
|
||||
If requerido Then
|
||||
ImgRequired.Text = " <a class='btn btn-circle btn-sm yelow' href='#' data-toggle='tooltip' title=' Requerido!' ><i class='fa fa-asterisk '></i></a>"
|
||||
End If
|
||||
|
||||
'chkEstatus.Checked = ImgDownLoad.Visible
|
||||
|
||||
End If
|
||||
Else
|
||||
'chkEstatus.Checked = False
|
||||
End If
|
||||
|
||||
txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
'If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then
|
||||
' txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
'End If
|
||||
|
||||
'Dim scripMascara = "$('#" & txtFechaLimite.ClientID & "').mask('00/00/0000');$('#" & txtFechaVigencia.ClientID & "').mask('00/00/0000');"
|
||||
'RegistraScript(scripMascara, "scriptMascara")
|
||||
|
||||
If Adjunto.Trim.Length > 0 Then
|
||||
|
||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||
|
||||
If File.Exists(linkDescargaArchivo) Then
|
||||
ImgDownLoad.Visible = True
|
||||
|
||||
If extencion.Length > 0 Then
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica & "." & extencion)
|
||||
Else
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica)
|
||||
End If
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
End If
|
||||
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
End If
|
||||
|
||||
If requerido Then
|
||||
ImgRequired.Text = " <a class='btn btn-circle btn-sm yelow' href='#' data-toggle='tooltip' title=' Requerido!' ><i class='fa fa-asterisk '></i></a>"
|
||||
End If
|
||||
|
||||
'chkEstatus.Checked = ImgDownLoad.Visible
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnUploadFileDoc_Click(sender As Object, e As EventArgs) Handles btnUploadFileDoc.Click
|
||||
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim Filesgral As List(Of Archivo) = TxtFileDocumentacion.getfiles().Archivos
|
||||
Dim Filename As String = ""
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim Filesgral As List(Of Archivo) = TxtFileDocumentacion.getfiles().Archivos
|
||||
Dim Filename As String = ""
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
If AplicaFechaVencimiento And DiasVigencia > 0 Then
|
||||
FechaVigencia = DateTime.Today.AddDays(DiasVigencia)
|
||||
End If
|
||||
|
||||
If AplicaFechaVencimiento And DiasVigencia > 0 Then
|
||||
FechaVigencia = DateTime.Today.AddDays(DiasVigencia)
|
||||
End If
|
||||
|
||||
For Each fileItem As Archivo In Filesgral
|
||||
|
||||
Try
|
||||
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
Dim tempArray() As String
|
||||
Try
|
||||
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "")
|
||||
Dim tempArray() As String
|
||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||
|
||||
|
||||
@@ -2942,15 +2942,15 @@ Partial Class Compras_Proveedores
|
||||
CargaDocs()
|
||||
|
||||
|
||||
TxtFileDocumentacion.Text = ""
|
||||
TxtFileDocumentacion.Text = ""
|
||||
UPModalUploadDoc.Update()
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Error al cargar archivo", ex)
|
||||
End Try
|
||||
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Error al cargar archivo", ex)
|
||||
End Try
|
||||
|
||||
Next
|
||||
|
||||
RegistraScript("$('#ModalUploadDoc').modal('hide')", "hidemodal3")
|
||||
|
||||
|
||||
@@ -3806,7 +3806,7 @@ Partial Class Compras_Proveedores
|
||||
|
||||
' ' 'Valida si existe el Formato Excel si no lo copea de "Grales"
|
||||
' ' If Not IO.File.Exists(String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, Formato)) Then
|
||||
' ' IO.File.Copy(String.Format("{0}Empresas\Grales\ReporteCxP.xlsm", AppDomain.CurrentDomain.BaseDirectory), String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, Formato), False)
|
||||
' ' IO.File.Copy(String.Format("{0}Empresas\Grales\ReporteCxP.xlsm", ModExtensiones.DirectorioBaseEmpresas), String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, Formato), False)
|
||||
' ' End If
|
||||
|
||||
' ' Dim ArchivoBase As New System.IO.FileInfo(UsuarioActual.Empresa.Ruta & Formato)
|
||||
@@ -3931,7 +3931,7 @@ Partial Class Compras_Proveedores
|
||||
|
||||
' ' 'Valida si existe el Formato Excel si no lo copea de "Grales"
|
||||
' ' If Not IO.File.Exists(String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, Formato)) Then
|
||||
' ' IO.File.Copy(String.Format("{0}Empresas\Grales\ReporteANC.xlsm", AppDomain.CurrentDomain.BaseDirectory), String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, Formato), False)
|
||||
' ' IO.File.Copy(String.Format("{0}Empresas\Grales\ReporteANC.xlsm", ModExtensiones.DirectorioBaseEmpresas), String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, Formato), False)
|
||||
' ' End If
|
||||
|
||||
' ' Dim ArchivoBase As New System.IO.FileInfo(UsuarioActual.Empresa.Ruta & Formato)
|
||||
@@ -4512,7 +4512,7 @@ Partial Class Compras_Proveedores
|
||||
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||
CargarArchivo(Directorio, file.filename, Tipo)
|
||||
Else
|
||||
@@ -4601,7 +4601,7 @@ Partial Class Compras_Proveedores
|
||||
End Function
|
||||
|
||||
Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\FormatoProveedores.xlsx"
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\FormatoProveedores.xlsx"
|
||||
Dim Archivo As New IO.FileInfo(Directorio)
|
||||
If Archivo.Exists Then
|
||||
Response.Clear()
|
||||
@@ -5609,7 +5609,7 @@ Partial Class Compras_Proveedores
|
||||
End Sub
|
||||
Protected Sub DescargarFormatoCarta(Proveedor As String, Dia As String, Mes As String, Calificacion As String, Resultado As String)
|
||||
Try
|
||||
Dim PathRoot As String = Server.MapPath("/")
|
||||
Dim PathRoot As String = ModExtensiones.DirectorioBaseEmpresas
|
||||
Dim Documento As String = "CartaProveedor.docx"
|
||||
Dim PathSource As String = $"{UsuarioActual.Empresa.Ruta}\Formatos\Plantillas\{Documento}"
|
||||
Dim PathDestino As String = PathRoot & "Temp\" & Documento
|
||||
@@ -5632,7 +5632,7 @@ Partial Class Compras_Proveedores
|
||||
End Sub
|
||||
Protected Sub DescargarFormatoEvaluacion(Proveedor As String, Dia As String, Mes As String, Calificacion As String, Resultado As String)
|
||||
Try
|
||||
Dim PathRoot As String = Server.MapPath("/")
|
||||
Dim PathRoot As String = ModExtensiones.DirectorioBaseEmpresas
|
||||
Dim Documento As String = "FormatoEvaluacionProveedor.docx"
|
||||
Dim PathSource As String = $"{UsuarioActual.Empresa.Ruta}\Formatos\Plantillas\{Documento}"
|
||||
Dim PathDestino As String = PathRoot & "Temp\" & Documento
|
||||
@@ -6079,57 +6079,57 @@ Partial Class Compras_Proveedores
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "P R O V E D O R E S G R I D S I M P R I M I R P D F/Excel"
|
||||
Private Sub LnkExportarPagos_Click(sender As Object, e As EventArgs) Handles LnkPagosProveedoresBancosExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DTCobrosRealizados, "RepProveedoresPagosBancos")
|
||||
End Sub
|
||||
Private Sub LinkPDFPagos_Click(sender As Object, e As EventArgs) Handles LnkPagosProveedoresBancosPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DTCobrosRealizados, "RepProveedoresPagosBancos")
|
||||
#Region "P R O V E D O R E S G R I D S I M P R I M I R P D F/Excel"
|
||||
Private Sub LnkExportarPagos_Click(sender As Object, e As EventArgs) Handles LnkPagosProveedoresBancosExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DTCobrosRealizados, "RepProveedoresPagosBancos")
|
||||
End Sub
|
||||
Private Sub LinkPDFPagos_Click(sender As Object, e As EventArgs) Handles LnkPagosProveedoresBancosPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DTCobrosRealizados, "RepProveedoresPagosBancos")
|
||||
End Sub
|
||||
|
||||
Private Sub LnkCtasBancariass_Click(sender As Object, e As EventArgs) Handles LnkCtasBancariasExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DTCuentasBancos, "RepProveedoresCtasBancarias")
|
||||
End Sub
|
||||
Private Sub LinkCtasBancarias_Click(sender As Object, e As EventArgs) Handles LnkCtasBancariasPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DTCuentasBancos, "RepProveedoresCtasBancarias")
|
||||
Private Sub LnkCtasBancariass_Click(sender As Object, e As EventArgs) Handles LnkCtasBancariasExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DTCuentasBancos, "RepProveedoresCtasBancarias")
|
||||
End Sub
|
||||
Private Sub LinkCtasBancarias_Click(sender As Object, e As EventArgs) Handles LnkCtasBancariasPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DTCuentasBancos, "RepProveedoresCtasBancarias")
|
||||
End Sub
|
||||
|
||||
Private Sub LnkExportarHistorialCompras_Click(sender As Object, e As EventArgs) Handles LnkHistorialComprasExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DtProveedoresHistorial, "RepProveedoresHistorialCompras")
|
||||
End Sub
|
||||
Private Sub LinkPDFHistorialCompras_Click(sender As Object, e As EventArgs) Handles LnkHistorialComprasPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DtProveedoresHistorial, "RepProveedoresHistorialCompras")
|
||||
Private Sub LnkExportarHistorialCompras_Click(sender As Object, e As EventArgs) Handles LnkHistorialComprasExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DtProveedoresHistorial, "RepProveedoresHistorialCompras")
|
||||
End Sub
|
||||
Private Sub LinkPDFHistorialCompras_Click(sender As Object, e As EventArgs) Handles LnkHistorialComprasPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DtProveedoresHistorial, "RepProveedoresHistorialCompras")
|
||||
End Sub
|
||||
|
||||
Private Sub LnkCxPActivas_Click(sender As Object, e As EventArgs) Handles LnkCxPActivasExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DTCxP, "RepProveedoresCxPActivas")
|
||||
End Sub
|
||||
Private Sub LinkCxPActivas_Click(sender As Object, e As EventArgs) Handles LnkCxPActivasPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DTCxP, "RepProveedoresCxPActivas")
|
||||
Private Sub LnkCxPActivas_Click(sender As Object, e As EventArgs) Handles LnkCxPActivasExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DTCxP, "RepProveedoresCxPActivas")
|
||||
End Sub
|
||||
Private Sub LinkCxPActivas_Click(sender As Object, e As EventArgs) Handles LnkCxPActivasPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DTCxP, "RepProveedoresCxPActivas")
|
||||
End Sub
|
||||
|
||||
Private Sub LnkComprasPagadas_Click(sender As Object, e As EventArgs) Handles LnkHistorialComprasPagadasExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DtCxPHistorial, "RepProveedoresComprasPagadas")
|
||||
End Sub
|
||||
Private Sub LinkComprasPagadas_Click(sender As Object, e As EventArgs) Handles LnkHistorialComprasPagadasPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DtCxPHistorial, "RepProveedoresComprasPagadas")
|
||||
Private Sub LnkComprasPagadas_Click(sender As Object, e As EventArgs) Handles LnkHistorialComprasPagadasExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DtCxPHistorial, "RepProveedoresComprasPagadas")
|
||||
End Sub
|
||||
Private Sub LinkComprasPagadas_Click(sender As Object, e As EventArgs) Handles LnkHistorialComprasPagadasPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DtCxPHistorial, "RepProveedoresComprasPagadas")
|
||||
End Sub
|
||||
|
||||
Private Sub LnkNCxAplicar_Click(sender As Object, e As EventArgs) Handles LnkNCxAplicarExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DtAntNC, "RepProveedoresNCxAplicar")
|
||||
End Sub
|
||||
Private Sub LinkNCxAplicar_Click(sender As Object, e As EventArgs) Handles LnkNCxAplicarPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DtAntNC, "RepProveedoresNCxAplicar")
|
||||
Private Sub LnkNCxAplicar_Click(sender As Object, e As EventArgs) Handles LnkNCxAplicarExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DtAntNC, "RepProveedoresNCxAplicar")
|
||||
End Sub
|
||||
Private Sub LinkNCxAplicar_Click(sender As Object, e As EventArgs) Handles LnkNCxAplicarPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DtAntNC, "RepProveedoresNCxAplicar")
|
||||
End Sub
|
||||
|
||||
Private Sub LnkNCxAplicarHistorial_Click(sender As Object, e As EventArgs) Handles LnkNCxAplicarHistorialExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DtAntNCH, "RepProveedoresNCxAplicar")
|
||||
End Sub
|
||||
Private Sub LinkNCxAplicarHistorial_Click(sender As Object, e As EventArgs) Handles LnkNCxAplicarHistorialPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DtAntNCH, "RepProveedoresNCxAplicar")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimeGridsProveedores(Formato As String, DtTemp As DataTable, NombreFormato As String)
|
||||
Private Sub LnkNCxAplicarHistorial_Click(sender As Object, e As EventArgs) Handles LnkNCxAplicarHistorialExcel.Click
|
||||
ImprimeGridsProveedores("Excel", DtAntNCH, "RepProveedoresNCxAplicar")
|
||||
End Sub
|
||||
Private Sub LinkNCxAplicarHistorial_Click(sender As Object, e As EventArgs) Handles LnkNCxAplicarHistorialPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DtAntNCH, "RepProveedoresNCxAplicar")
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimeGridsProveedores(Formato As String, DtTemp As DataTable, NombreFormato As String)
|
||||
If DtTemp IsNot Nothing And DtTemp.Rows.Count > 0 Then
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
@@ -6148,7 +6148,7 @@ Partial Class Compras_Proveedores
|
||||
ImprimirPDF("Empresas\Grales\Formatos\" & NombreFormato & ".rdlc", DtTemp, params, NombreFormato & "_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato)
|
||||
Else
|
||||
Alert("No se encontró información.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ Partial Class Compras_RepComprasAFDetalle
|
||||
Dim ObjTareas As New ClsOIEventos
|
||||
|
||||
Dim RutaPDF As String
|
||||
Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
|
||||
Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\"
|
||||
RutaPDF = $"{Ruta}\Formatos\RepComprasAFDetalle.rdlc"
|
||||
If Not File.Exists(RutaPDF) Then
|
||||
RutaPDF = "Empresas\Grales\Formatos\RepComprasAFDetalle.rdlc"
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Text;
|
||||
@@ -240,7 +247,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas
|
||||
StrFiltro.AppendFormat(" <b>Registro</b>: {0}", DdlUsuarioRegistro.SelectedItem.Text);
|
||||
|
||||
string RutaPDF = "";
|
||||
StrFiltro.AppendFormat(" <b>Estatus Compra</b>: {0}", DdlEstatusCompra.SelectedItem.Text);
|
||||
string Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas/{UsuarioActual.CveEmpresa}/";
|
||||
RutaPDF = $"{Ruta}/Formatos/RepCxPPeriodo.rdlc";
|
||||
if (!System.IO.File.Exists(RutaPDF))
|
||||
{
|
||||
|
||||
@@ -37,11 +37,11 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Set(value As DataTable)
|
||||
ViewState("DTHeaders") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#Region "UPLOAD"
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#Region "UPLOAD"
|
||||
Property CveDocumentacionElectronica As Integer
|
||||
Get
|
||||
If ViewState("CvePersonalClienteDocumentacion") Is Nothing Then
|
||||
@@ -53,8 +53,8 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Set(value As Integer)
|
||||
ViewState("CvePersonalClienteDocumentacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Property CveDocumentacion As Integer
|
||||
Get
|
||||
If ViewState("CveDocumentacion") Is Nothing Then
|
||||
@@ -66,8 +66,8 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Set(value As Integer)
|
||||
ViewState("CveDocumentacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Property Documentacion As String
|
||||
Get
|
||||
If ViewState("Documentacion") Is Nothing Then
|
||||
@@ -79,8 +79,8 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Set(value As String)
|
||||
ViewState("Documentacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Property AdjuntoDocumentacion As String
|
||||
Get
|
||||
If ViewState("AdjuntoDocumentacion") Is Nothing Then
|
||||
@@ -92,10 +92,10 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Set(value As String)
|
||||
ViewState("AdjuntoDocumentacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Property DiasVigencia As Integer
|
||||
Get
|
||||
If ViewState("DiasVigencia") Is Nothing Then
|
||||
@@ -107,8 +107,8 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Set(value As Integer)
|
||||
ViewState("DiasVigencia") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Property AplicaFechaVencimiento As Boolean
|
||||
Get
|
||||
If ViewState("AplicaFechaVencimiento") Is Nothing Then
|
||||
@@ -120,8 +120,8 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaFechaVencimiento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Private Property FechaVigencia As Date
|
||||
Get
|
||||
If ViewState("FechaVigencia") Is Nothing Then
|
||||
@@ -133,8 +133,8 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Set(value As Date)
|
||||
ViewState("FechaVigencia") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Property Estatus As Integer
|
||||
Get
|
||||
If ViewState("Estatus") Is Nothing Then
|
||||
@@ -146,8 +146,8 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Set(value As Integer)
|
||||
ViewState("Estatus") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Property ObservacionDocumentacion As String
|
||||
Get
|
||||
If ViewState("ObservacionDocumentacion") Is Nothing Then
|
||||
@@ -159,8 +159,8 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Set(value As String)
|
||||
ViewState("ObservacionDocumentacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Private Property FechaLimite As Date
|
||||
Get
|
||||
If ViewState("FechaLimite") Is Nothing Then
|
||||
@@ -173,9 +173,9 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
ViewState("FechaLimite") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Property CveProveedor As Integer
|
||||
Get
|
||||
If ViewState("CveProveedor") Is Nothing Then
|
||||
@@ -187,17 +187,17 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Set(value As Integer)
|
||||
ViewState("CveProveedor") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub Proveedores_RepDocumentacionProveedor_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
|
||||
'TxtFechaI.Text = Now.AddMonths(-3).ToString("dd/MM/yyyy")
|
||||
'TxtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
|
||||
CargaCombos()
|
||||
|
||||
'TxtFechaI.Text = Now.AddMonths(-3).ToString("dd/MM/yyyy")
|
||||
'TxtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
|
||||
TxtFechaI.Text = ""
|
||||
TxtFechaF.Text = ""
|
||||
|
||||
@@ -206,66 +206,66 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
'ExportaExcel()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.SelectedText = "Todos"
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||
CargaDocumentacion()
|
||||
End Sub
|
||||
|
||||
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||
CargaDocumentacion()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDocumentacion()
|
||||
|
||||
Dim CveProveedor As Integer = -1
|
||||
|
||||
Dim FechaInicio As Date
|
||||
Dim CveProveedor As Integer = -1
|
||||
|
||||
Dim FechaInicio As Date
|
||||
Dim FechaFin As Date
|
||||
|
||||
If TxtFechaI.Text = "" Then
|
||||
FechaInicio = MinFecha
|
||||
Else
|
||||
FechaInicio = TxtFechaI.Text.ToDate
|
||||
End If
|
||||
|
||||
If TxtFechaF.Text = "" Then
|
||||
FechaFin = MaxFecha
|
||||
Else
|
||||
FechaFin = TxtFechaF.Text.ToDate
|
||||
If TxtFechaI.Text = "" Then
|
||||
FechaInicio = MinFecha
|
||||
Else
|
||||
FechaInicio = TxtFechaI.Text.ToDate
|
||||
End If
|
||||
|
||||
If DdlProveedores.txtValue.Value.ToEntero > 0 Then
|
||||
CveProveedor = DdlProveedores.txtValue.Value.ToEntero
|
||||
If TxtFechaF.Text = "" Then
|
||||
FechaFin = MaxFecha
|
||||
Else
|
||||
FechaFin = TxtFechaF.Text.ToDate
|
||||
End If
|
||||
|
||||
If DdlProveedores.txtValue.Value.ToEntero > 0 Then
|
||||
CveProveedor = DdlProveedores.txtValue.Value.ToEntero
|
||||
End If
|
||||
|
||||
Dim obEDoc As New ClsEdocumentacion
|
||||
|
||||
If obEDoc.DocumentacionElectronicaAuditoriaGet(CveProveedor, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, 3, DdlEstatus.SelectedValue.ToEntero) Then
|
||||
GvDocumentos.DataSource = obEDoc.DtResultados
|
||||
Else
|
||||
GvDocumentos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
If obEDoc.DocumentacionElectronicaAuditoriaGet(CveProveedor, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, 3, DdlEstatus.SelectedValue.ToEntero) Then
|
||||
GvDocumentos.DataSource = obEDoc.DtResultados
|
||||
Else
|
||||
GvDocumentos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
obEDoc.Dispose()
|
||||
|
||||
GvDocumentos.DataBind()
|
||||
UPGvDocumentos.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UPGvDocumentos.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub GvDocumentos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentos.RowDataBound
|
||||
|
||||
|
||||
@@ -275,18 +275,18 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
|
||||
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
|
||||
Dim txtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia")
|
||||
Dim CveDocumentacionElectronica As Integer = e.Row.DataKey("CveDocumentacionElectronica").ToEntero
|
||||
|
||||
Dim ImgRechazar As LinkButton = e.Row.FCLinkButton("ImgRechazar")
|
||||
|
||||
Dim ImgAceptar As LinkButton = e.Row.FCLinkButton("ImgAceptar")
|
||||
|
||||
Dim requerido As Boolean = Boolean.Parse(e.Row.DBCampo("Requerido"))
|
||||
'Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
|
||||
'Dim RDBAcptar As RadioButton = e.Row.FCRadioButton("RDBAcptar")
|
||||
'Dim RDBRechazar As RadioButton = e.Row.FCRadioButton("RDBRechazar")
|
||||
|
||||
Dim txtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia")
|
||||
Dim CveDocumentacionElectronica As Integer = e.Row.DataKey("CveDocumentacionElectronica").ToEntero
|
||||
|
||||
Dim ImgRechazar As LinkButton = e.Row.FCLinkButton("ImgRechazar")
|
||||
|
||||
Dim ImgAceptar As LinkButton = e.Row.FCLinkButton("ImgAceptar")
|
||||
|
||||
Dim requerido As Boolean = Boolean.Parse(e.Row.DBCampo("Requerido"))
|
||||
'Dim chkEstatus As CheckBox = e.Row.FCCheckBox("chkEstatus")
|
||||
'Dim RDBAcptar As RadioButton = e.Row.FCRadioButton("RDBAcptar")
|
||||
'Dim RDBRechazar As RadioButton = e.Row.FCRadioButton("RDBRechazar")
|
||||
|
||||
Dim separado As Char() = ".".ToCharArray
|
||||
Dim array() As String = Adjunto.Split(separado)
|
||||
Dim extencion As String = ""
|
||||
@@ -296,10 +296,10 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString = "1", True, False)
|
||||
|
||||
txtFechaLimite.Visible = If(AplicaDiasLimite, True, False)
|
||||
txtFechaVigencia.Visible = If(AplicaFechaVencimiento, True, False)
|
||||
|
||||
|
||||
|
||||
txtFechaVigencia.Visible = If(AplicaFechaVencimiento, True, False)
|
||||
|
||||
|
||||
|
||||
If e.Row.DBCampo("FechaVigencia").ToString.Length > 0 Then
|
||||
txtFechaVigencia.Text = e.Row.DBCampo("FechaVigencia").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
If DateTime.Today > e.Row.DBCampo("FechaVigencia").ToString.ToDateTime Then
|
||||
@@ -312,8 +312,8 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
extencion = array(array.Length - 1)
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("Estatus").ToString.ToEntero = 3 Then
|
||||
' RDBAcptar.Checked = True
|
||||
'If e.Row.DBCampo("Estatus").ToString.ToEntero = 3 Then
|
||||
' RDBAcptar.Checked = True
|
||||
'Else
|
||||
' chkEstatus.Checked = False
|
||||
'End If
|
||||
@@ -332,30 +332,30 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Edoc/Proveedor/" & e.Row.DataKey("CveProveedor") & "/" & Adjunto
|
||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & e.Row.DataKey("CveProveedor") & "/" & Adjunto
|
||||
|
||||
If File.Exists(linkDescargaArchivo) Then
|
||||
If File.Exists(linkDescargaArchivo) Then
|
||||
ImgDownLoad.Visible = True
|
||||
|
||||
If extencion.Length > 0 Then
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica & "." & extencion)
|
||||
Else
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveDocumentacionElectronica)
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(2, 3) Then
|
||||
ImgRechazar.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(2) Then
|
||||
ImgAceptar.Visible = True
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(3) Then
|
||||
' chkEstatus.Checked = True
|
||||
'End If
|
||||
|
||||
Else
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(2, 3) Then
|
||||
ImgRechazar.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(2) Then
|
||||
ImgAceptar.Visible = True
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(3) Then
|
||||
' chkEstatus.Checked = True
|
||||
'End If
|
||||
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
End If
|
||||
|
||||
@@ -370,116 +370,116 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
'chkEstatus.Checked = ImgDownLoad.Visible
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgRechazar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim Obsebaciones As String = GvRow.FCTextBox("TxtObservaciones").Text
|
||||
If Obsebaciones.Trim.Length = 0 Then
|
||||
Alert("Debe de proporcionar una obserbación o motivo de rechazo.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Correo As String = GvRow.DataKey("ContactoMail")
|
||||
Dim Documentacion As String = GvRow.DataKey("Documentacion")
|
||||
Dim Obserbaciones As String = GvRow.FCTextBox("TxtObservaciones").Text
|
||||
|
||||
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
||||
Dim CveProveedor As Integer = GvRow.DataKey("CveProveedor").ToEntero
|
||||
Dim Archivo As String = UsuarioActual.Empresa.Ruta & $"Edoc\Proveedor\{CveProveedor}\{Adjunto}"
|
||||
|
||||
|
||||
Dim objEdoc As New ClsEdocumentacion
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
objEdoc.IniciaTransacSQL()
|
||||
|
||||
If objEdoc.DocumentacionElectronicaUpdate(GvRow.DataKey("CveDocumentacionElectronica").ToEntero, GvRow.DataKey("CveDocumentacion").ToEntero, -1, -1, GvRow.DataKey("CveProveedor").ToEntero, 1,
|
||||
If(Obsebaciones.Trim.Length > 0, Obsebaciones, GvRow.DataKey("Observacion")), "-1",
|
||||
UsuarioActual.CveUsuario, GvRow.DataKey("FechaLimite").ToDate, GvRow.DataKey("FechaVigencia").ToDate) Then
|
||||
|
||||
Try
|
||||
File.Delete(Archivo)
|
||||
Catch ex As Exception
|
||||
ErrorProceso = True
|
||||
End Try
|
||||
|
||||
If Not ErrorProceso Then
|
||||
|
||||
Dim Cuerpo As String = $"<p>Por medio del presente correo se le notifica que el documento <b>{Documentacion}</b> ha sido rechazado por la siguiente causa: <b>{Obserbaciones}</b> por favor ingrese nuevamente al portal y agréguelo nuevamente. </p>
|
||||
<p>Atentamente:</p>
|
||||
<p>Saludos.</p>"
|
||||
|
||||
If Not MandaCorreo(Correo, $"{ UsuarioActual.Empresa.Empresa } documento Rechazado", Cuerpo) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
Alert($"El documento {GvRow.DataKey("Documentacion") } fue rechazado.")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If ErrorProceso Then
|
||||
objEdoc.RollBack()
|
||||
Else
|
||||
objEdoc.Commit()
|
||||
End If
|
||||
|
||||
objEdoc.Dispose()
|
||||
|
||||
CargaDocumentacion()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgAceptar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim objEdoc As New ClsEdocumentacion
|
||||
|
||||
If objEdoc.DocumentacionElectronicaUpdate(GvRow.DataKey("CveDocumentacionElectronica").ToEntero, GvRow.DataKey("CveDocumentacion").ToEntero, -1, -1, GvRow.DataKey("CveProveedor").ToEntero, 3,
|
||||
"", "-1", UsuarioActual.CveUsuario, GvRow.DataKey("FechaLimite").ToDate, GvRow.DataKey("FechaVigencia").ToDate) Then
|
||||
Alert("Dcumento Aceptado.")
|
||||
End If
|
||||
|
||||
|
||||
objEdoc.Dispose()
|
||||
|
||||
CargaDocumentacion()
|
||||
End Sub
|
||||
|
||||
Private Function MandaCorreo(Para As String, Asunto As String, Body As String) As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim Mail As New ClsSisMail()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgRechazar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim Obsebaciones As String = GvRow.FCTextBox("TxtObservaciones").Text
|
||||
If Obsebaciones.Trim.Length = 0 Then
|
||||
Alert("Debe de proporcionar una obserbación o motivo de rechazo.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Correo As String = GvRow.DataKey("ContactoMail")
|
||||
Dim Documentacion As String = GvRow.DataKey("Documentacion")
|
||||
Dim Obserbaciones As String = GvRow.FCTextBox("TxtObservaciones").Text
|
||||
|
||||
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
||||
Dim CveProveedor As Integer = GvRow.DataKey("CveProveedor").ToEntero
|
||||
Dim Archivo As String = UsuarioActual.Empresa.Ruta & $"Edoc\Proveedor\{CveProveedor}\{Adjunto}"
|
||||
|
||||
|
||||
Dim objEdoc As New ClsEdocumentacion
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
objEdoc.IniciaTransacSQL()
|
||||
|
||||
If objEdoc.DocumentacionElectronicaUpdate(GvRow.DataKey("CveDocumentacionElectronica").ToEntero, GvRow.DataKey("CveDocumentacion").ToEntero, -1, -1, GvRow.DataKey("CveProveedor").ToEntero, 1,
|
||||
If(Obsebaciones.Trim.Length > 0, Obsebaciones, GvRow.DataKey("Observacion")), "-1",
|
||||
UsuarioActual.CveUsuario, GvRow.DataKey("FechaLimite").ToDate, GvRow.DataKey("FechaVigencia").ToDate) Then
|
||||
|
||||
Try
|
||||
File.Delete(Archivo)
|
||||
Catch ex As Exception
|
||||
ErrorProceso = True
|
||||
End Try
|
||||
|
||||
If Not ErrorProceso Then
|
||||
|
||||
Dim Cuerpo As String = $"<p>Por medio del presente correo se le notifica que el documento <b>{Documentacion}</b> ha sido rechazado por la siguiente causa: <b>{Obserbaciones}</b> por favor ingrese nuevamente al portal y agréguelo nuevamente. </p>
|
||||
<p>Atentamente:</p>
|
||||
<p>Saludos.</p>"
|
||||
|
||||
If Not MandaCorreo(Correo, $"{ UsuarioActual.Empresa.Empresa } documento Rechazado", Cuerpo) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
Alert($"El documento {GvRow.DataKey("Documentacion") } fue rechazado.")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If ErrorProceso Then
|
||||
objEdoc.RollBack()
|
||||
Else
|
||||
objEdoc.Commit()
|
||||
End If
|
||||
|
||||
objEdoc.Dispose()
|
||||
|
||||
CargaDocumentacion()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgAceptar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim objEdoc As New ClsEdocumentacion
|
||||
|
||||
If objEdoc.DocumentacionElectronicaUpdate(GvRow.DataKey("CveDocumentacionElectronica").ToEntero, GvRow.DataKey("CveDocumentacion").ToEntero, -1, -1, GvRow.DataKey("CveProveedor").ToEntero, 3,
|
||||
"", "-1", UsuarioActual.CveUsuario, GvRow.DataKey("FechaLimite").ToDate, GvRow.DataKey("FechaVigencia").ToDate) Then
|
||||
Alert("Dcumento Aceptado.")
|
||||
End If
|
||||
|
||||
|
||||
objEdoc.Dispose()
|
||||
|
||||
CargaDocumentacion()
|
||||
End Sub
|
||||
|
||||
Private Function MandaCorreo(Para As String, Asunto As String, Body As String) As Boolean
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim Mail As New ClsSisMail()
|
||||
|
||||
Para = If(Para IsNot Nothing, Para, "")
|
||||
Asunto = If(Asunto IsNot Nothing, Asunto, "")
|
||||
Body = If(Body IsNot Nothing, Body, "")
|
||||
|
||||
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
|
||||
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
|
||||
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
|
||||
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Sub UploadModal_ClickDocumentacion(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
' Dim chkEstatus As CheckBox
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
' Dim chkEstatus As CheckBox
|
||||
CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString.ToEntero
|
||||
CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString.ToEntero
|
||||
Documentacion = GvRow.DataKey("Documentacion")
|
||||
@@ -516,95 +516,95 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
|
||||
RegistraScript("$('#ModalUploadDoc').modal({ backdrop: 'static', keyboard: false});")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnUploadFileDoc_Click(sender As Object, e As EventArgs) Handles btnUploadFileDoc.Click
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnUploadFileDoc_Click(sender As Object, e As EventArgs) Handles btnUploadFileDoc.Click
|
||||
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim Filesgral As List(Of Archivo) = TxtFileDocumentacion.getfiles().Archivos
|
||||
Dim Filename As String = ""
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
If AplicaFechaVencimiento And DiasVigencia > 0 Then
|
||||
FechaVigencia = DateTime.Today.AddDays(DiasVigencia)
|
||||
End If
|
||||
|
||||
For Each fileItem As Archivo In Filesgral
|
||||
|
||||
For Each fileItem As Archivo In Filesgral
|
||||
|
||||
Try
|
||||
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
Dim tempArray() As String
|
||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||
|
||||
|
||||
|
||||
Dim TempCveDocumentacionElectronica As Integer = 0
|
||||
Dim objEdoc As New ClsEdocumentacion
|
||||
objEdoc.IniciaTransacSQL()
|
||||
|
||||
If CveDocumentacionElectronica = -1 Then
|
||||
|
||||
CveDocumentacionElectronica = objEdoc.DocumentacionElectronicaAdd(CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, "-1", UsuarioActual.CveUsuario, FechaLimite, FechaVigencia)
|
||||
|
||||
If CveDocumentacionElectronica > 0 Then
|
||||
If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not ErrorProceso = True Then
|
||||
|
||||
Dim rutaDestino As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & CveDocumentacionElectronica & "." & FileExtension
|
||||
Dim rutaAdjuntoAnterior As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & AdjuntoDocumentacion
|
||||
|
||||
|
||||
|
||||
Try
|
||||
If Not System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\") Then
|
||||
System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\")
|
||||
End If
|
||||
|
||||
If File.Exists(rutaAdjuntoAnterior) And AdjuntoDocumentacion.Trim.Length > 0 Then
|
||||
File.Delete(rutaAdjuntoAnterior)
|
||||
End If
|
||||
|
||||
If System.IO.File.Exists(rutaDestino) Then
|
||||
System.IO.File.Delete(rutaDestino)
|
||||
End If
|
||||
|
||||
System.IO.File.Move(fileItem.FileUrl, rutaDestino)
|
||||
Catch ex As Exception
|
||||
GuardaLog($"Error al gaurdar documento (moviendo archivo digital) --> Error{ ex.StackTrace}")
|
||||
ErrorProceso = True
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
objEdoc.Commit()
|
||||
Alert("Documento cargado correctamente")
|
||||
Else
|
||||
objEdoc.RollBack()
|
||||
Alert("Error al cargar archivo", TipoMensaje.MsgError)
|
||||
End If
|
||||
objEdoc.Dispose()
|
||||
|
||||
|
||||
CargaDocumentacion()
|
||||
|
||||
|
||||
|
||||
Dim TempCveDocumentacionElectronica As Integer = 0
|
||||
Dim objEdoc As New ClsEdocumentacion
|
||||
objEdoc.IniciaTransacSQL()
|
||||
|
||||
If CveDocumentacionElectronica = -1 Then
|
||||
|
||||
CveDocumentacionElectronica = objEdoc.DocumentacionElectronicaAdd(CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, "-1", UsuarioActual.CveUsuario, FechaLimite, FechaVigencia)
|
||||
|
||||
If CveDocumentacionElectronica > 0 Then
|
||||
If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
If Not objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, CveDocumentacionElectronica & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Not ErrorProceso = True Then
|
||||
|
||||
Dim rutaDestino As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & CveDocumentacionElectronica & "." & FileExtension
|
||||
Dim rutaAdjuntoAnterior As String = UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\" & AdjuntoDocumentacion
|
||||
|
||||
|
||||
|
||||
Try
|
||||
If Not System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\") Then
|
||||
System.IO.Directory.CreateDirectory(UsuarioActual.Empresa.Ruta & "Edoc\Proveedor\" & CveProveedor & "\")
|
||||
End If
|
||||
|
||||
If File.Exists(rutaAdjuntoAnterior) And AdjuntoDocumentacion.Trim.Length > 0 Then
|
||||
File.Delete(rutaAdjuntoAnterior)
|
||||
End If
|
||||
|
||||
If System.IO.File.Exists(rutaDestino) Then
|
||||
System.IO.File.Delete(rutaDestino)
|
||||
End If
|
||||
|
||||
System.IO.File.Move(fileItem.FileUrl, rutaDestino)
|
||||
Catch ex As Exception
|
||||
GuardaLog($"Error al gaurdar documento (moviendo archivo digital) --> Error{ ex.StackTrace}")
|
||||
ErrorProceso = True
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
objEdoc.Commit()
|
||||
Alert("Documento cargado correctamente")
|
||||
Else
|
||||
objEdoc.RollBack()
|
||||
Alert("Error al cargar archivo", TipoMensaje.MsgError)
|
||||
End If
|
||||
objEdoc.Dispose()
|
||||
|
||||
|
||||
CargaDocumentacion()
|
||||
|
||||
TxtFileDocumentacion.Text = ""
|
||||
UPModalUploadDoc.Update()
|
||||
|
||||
UPModalUploadDoc.Update()
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Error al cargar archivo", ex)
|
||||
End Try
|
||||
@@ -613,12 +613,12 @@ Partial Class Proveedores_RepDocumentacionProveedor
|
||||
|
||||
RegistraScript("$('#ModalUploadDoc').modal('hide')", "hidemodal3")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -217,7 +217,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas
|
||||
string FechaInicio = DateTime.Parse(TxtFechaI.Text).ToShortDateString();
|
||||
string FechaFinal = DateTime.Parse(TxtFechaF.Text).ToShortDateString();
|
||||
|
||||
string Ruta = string.Format("{0}Empresas/{1}/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa);
|
||||
string Ruta = string.Format("{0}Empresas/{1}/", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa);
|
||||
string RutaPDF = string.Format("{0}/Formatos/RepGastosFijos.rdlc", Ruta);
|
||||
|
||||
if (!File.Exists(RutaPDF))
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Text;
|
||||
@@ -236,7 +243,7 @@ public partial class Compras_RepPagado : ClsPaginas
|
||||
StrFiltro.AppendFormat(" <b>Moneda</b>: {0}", DdlMoneda.SelectedItem.Text);
|
||||
|
||||
string RutaPDF = "";
|
||||
StrFiltro.AppendFormat(" <b>Banco</b>: {0}", DdlBanco.SelectedItem.Text);
|
||||
string Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas/{UsuarioActual.CveEmpresa}/";
|
||||
RutaPDF = $"{Ruta}/Formatos/RepRecuperacion.rdlc";
|
||||
if (!System.IO.File.Exists(RutaPDF))
|
||||
{
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Text;
|
||||
@@ -267,7 +274,7 @@ public partial class Compras_RepPágadoDetalle : ClsPaginas
|
||||
StrFiltro.AppendFormat(" <b>Moneda</b>: {0}", DdlMoneda.SelectedItem.Text);
|
||||
|
||||
string RutaPDF = "";
|
||||
StrFiltro.AppendFormat(" <b>Banco</b>: {0}", DdlBanco.SelectedItem.Text);
|
||||
string Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas/{UsuarioActual.CveEmpresa}/";
|
||||
RutaPDF = $"{Ruta}/Formatos/RepPagadoDetalle.rdlc";
|
||||
if (!System.IO.File.Exists(RutaPDF))
|
||||
{
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Text;
|
||||
@@ -285,7 +292,7 @@ public partial class Compras_RepPagadoPeriodo : ClsPaginas
|
||||
StrFiltro.AppendFormat(" <b>Moneda</b>: {0}", DdlMoneda.SelectedItem.Text);
|
||||
|
||||
string RutaPDF = "";
|
||||
StrFiltro.AppendFormat(" <b>Banco</b>: {0}", DdlBanco.SelectedItem.Text);
|
||||
string Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas/{UsuarioActual.CveEmpresa}/";
|
||||
RutaPDF = $"{Ruta}/Formatos/RepPagadoPeriodo.rdlc";
|
||||
if (!System.IO.File.Exists(RutaPDF))
|
||||
{
|
||||
|
||||
@@ -618,8 +618,8 @@ Partial Class Compras_eFacturas
|
||||
|
||||
txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString
|
||||
|
||||
Destino = String.Format("{0}Compras\", UsuarioActual.Empresa.Ruta) 'string.format("{0}Empresas\{1}\Compras\", AppDomain.CurrentDomain.BaseDirectory ,UsuarioActual.CveEmpresa & "\Compras\"
|
||||
Ejecutable = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Utilerias\ADSUtilerias.exe")
|
||||
Destino = String.Format("{0}Compras\", UsuarioActual.Empresa.Ruta) 'string.format("{0}Empresas\{1}\Compras\", ModExtensiones.DirectorioBaseEmpresas ,UsuarioActual.CveEmpresa & "\Compras\"
|
||||
Ejecutable = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Utilerias\ADSUtilerias.exe")
|
||||
Form.DefaultButton = BtnConsultar.UniqueID
|
||||
|
||||
DdlResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||
@@ -1202,7 +1202,7 @@ Partial Class Compras_eFacturas
|
||||
End Sub
|
||||
Protected Sub LnkNoRecibidas_Click(sender As Object, e As EventArgs, Optional ValidaRowCount As Boolean = False) Handles LnkNoRecibias.Click
|
||||
Dim DtNoRecibidas As New DataTable
|
||||
Dim Ruta As String = String.Format("{0}\Empresas\{1}\Compras\NoRecibidas-{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)
|
||||
Dim Ruta As String = String.Format("{0}\Empresas\{1}\Compras\NoRecibidas-{1}.xml", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)
|
||||
Dim Str As New StringBuilder
|
||||
If IO.File.Exists(Ruta) Then
|
||||
DtNoRecibidas.ReadXml(Ruta)
|
||||
@@ -1329,7 +1329,7 @@ Partial Class Compras_eFacturas
|
||||
filemove = fileItem.filename
|
||||
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove("", String.Format("Empresas\{0}\Temp\Facturas", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove("", String.Format("{0}\Temp\Facturas", UsuarioActual.Empresa.Ruta))
|
||||
'AGREGA XML A LA LISTA
|
||||
If FileExtension.ToUpper = "XML" Then
|
||||
ListXML.Add(String.Format("{0}Temp\Facturas\{1}", UsuarioActual.Empresa.Ruta, filemove))
|
||||
@@ -1355,7 +1355,7 @@ Partial Class Compras_eFacturas
|
||||
ListaComprimidos.Add(filePath)
|
||||
'CREO DIRECTORIO ALEATORIO
|
||||
Dim Aleatorio As New Random
|
||||
Dim TempDirectorio As String = String.Format("{0}Empresas\{1}\{2}\{3}{4}", Request.PhysicalApplicationPath, UsuarioActual.CveEmpresa, "Temp\Facturas", Date.Now.Ticks, Aleatorio.Next(100, 999))
|
||||
Dim TempDirectorio As String = String.Format("{0}\{1}\{2}{3}", UsuarioActual.Empresa.Ruta, "Temp\Facturas", Date.Now.Ticks, Aleatorio.Next(100, 999))
|
||||
Directory.CreateDirectory(TempDirectorio)
|
||||
ListaDirectoriosTemporales.Add(TempDirectorio)
|
||||
'AGREGA DIRECTORIO A LA LISTA
|
||||
@@ -1370,7 +1370,7 @@ Partial Class Compras_eFacturas
|
||||
Next
|
||||
|
||||
Dim Arreglo As New ArrayList()
|
||||
' Dim Archivos As String() = Directory.GetFiles(String.Format("{0}Empresas\{1}\Temp", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
||||
' Dim Archivos As String() = Directory.GetFiles(String.Format("{0}Empresas\{1}\Temp", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa))
|
||||
'Dim NombreArchivo As String
|
||||
Dim Bandera = True
|
||||
Dim Retorno = ""
|
||||
@@ -1513,9 +1513,9 @@ Partial Class Compras_eFacturas
|
||||
' If GeneraPDF(Fact.DirectorioTemporal, Fact) Then
|
||||
' ListPDF.Add(Fact.ArchivoPDF)
|
||||
' Retorno = AgregaFactura(Fact)
|
||||
' ' ModExtensiones.GuardaLog("'*******se genero el pdf :" + String.Format("{0}Empresas\{1}\Temp", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa) + Fact.ArchivoXML + " RFC: " + tRF + " Anio" + Convert.ToDateTime(Fact.Fecha).Year + "Retorno:" + Retorno)
|
||||
' ' ModExtensiones.GuardaLog("'*******se genero el pdf :" + String.Format("{0}Empresas\{1}\Temp", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa) + Fact.ArchivoXML + " RFC: " + tRF + " Anio" + Convert.ToDateTime(Fact.Fecha).Year + "Retorno:" + Retorno)
|
||||
' Else
|
||||
' ' ModExtensiones.GuardaLog("'*******no se genero el pdf :" + String.Format("{0}Empresas\{1}\Temp", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa) + Fact.ArchivoXML + " RFC: " + tRF + " Anio" + Convert.ToDateTime(Fact.Fecha).Year + "Retorno:" + Retorno)
|
||||
' ' ModExtensiones.GuardaLog("'*******no se genero el pdf :" + String.Format("{0}Empresas\{1}\Temp", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa) + Fact.ArchivoXML + " RFC: " + tRF + " Anio" + Convert.ToDateTime(Fact.Fecha).Year + "Retorno:" + Retorno)
|
||||
|
||||
' End If
|
||||
' End If
|
||||
@@ -1549,7 +1549,7 @@ Partial Class Compras_eFacturas
|
||||
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10)
|
||||
strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString)
|
||||
Try
|
||||
ArchivoW = New StreamWriter(String.Format("{0}\Logefacturas.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
|
||||
ArchivoW = New StreamWriter(String.Format("{0}\Logefacturas.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8)
|
||||
Catch ex As UnauthorizedAccessException
|
||||
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
@@ -1650,7 +1650,7 @@ Partial Class Compras_eFacturas
|
||||
DirectoryExistsCreate(String.Format("{0}Compras\{1}", UsuarioActual.Empresa.Ruta, RFC.ToUpper))
|
||||
|
||||
Try
|
||||
File.Move(PathArchivo, String.Format("{0}Empresas\{1}\Compras\{2}\{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, RFC.ToUpper, NombreArchivo))
|
||||
File.Move(PathArchivo, String.Format("{0}Empresas\{1}\Compras\{2}\{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, RFC.ToUpper, NombreArchivo))
|
||||
Catch ex As Exception
|
||||
Alert("Error")
|
||||
End Try
|
||||
@@ -1668,11 +1668,11 @@ Partial Class Compras_eFacturas
|
||||
For Each entry As ZipArchiveEntry In archive.Entries
|
||||
If entry.FullName.EndsWith(".xml", StringComparison.OrdinalIgnoreCase) Then
|
||||
|
||||
'If File.Exists(String.Format("{0}Empresas\{1}\Temp\{2}\{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, Directorio, entry.Name)) Then
|
||||
' File.Delete(String.Format("{0}Empresas\{1}\Temp\{2}\{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, Directorio, entry.Name))
|
||||
'If File.Exists(String.Format("{0}Empresas\{1}\Temp\{2}\{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Directorio, entry.Name)) Then
|
||||
' File.Delete(String.Format("{0}Empresas\{1}\Temp\{2}\{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Directorio, entry.Name))
|
||||
'End If
|
||||
|
||||
'entry.ExtractToFile(String.Format("{0}Empresas\{1}\Temp\{2}\{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, Directorio, entry.Name))
|
||||
'entry.ExtractToFile(String.Format("{0}Empresas\{1}\Temp\{2}\{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Directorio, entry.Name))
|
||||
|
||||
If File.Exists(String.Format("{0}\{1}", Directorio, entry.Name)) Then
|
||||
File.Delete(String.Format("{0}\{1}", Directorio, entry.Name))
|
||||
@@ -2253,7 +2253,7 @@ Partial Class Compras_eFacturas
|
||||
Dim Retorno = False
|
||||
Dim NombreArchivo As String = TmpArchivoPDF
|
||||
Dim CadenaOriginal As String = (Convert.ToString((Convert.ToString((Convert.ToString("||1.0|") & FolioFiscal) + "|" + FechaCertificacion.ToString("yyyy-MM-dd") + "T" + FechaCertificacion.ToString("HH:mm:ss") + "|") & SelloCFDi) + "|") & NoSerieCertificado) + "||"
|
||||
Dim RutaFormato As String = String.Format("{0}Empresas\Grales\Formatos\CFDI.rdlc", AppDomain.CurrentDomain.BaseDirectory)
|
||||
Dim RutaFormato As String = String.Format("{0}Empresas\Grales\Formatos\CFDI.rdlc", ModExtensiones.DirectorioBaseEmpresas)
|
||||
'Dim ArchivoTempXLS As String = String.Format("{0}\GenSis{1}-{2}", Path.GetDirectoryName(ArchivoBaseXLS), Now.Ticks, Path.GetFileName(ArchivoBaseXLS))
|
||||
|
||||
Dim Fiscal As String = String.Format("Domicilio Fiscal {0}{1} {2}{0}Col.{3}{0}CP. {4} {5},{6},{7}", vbCr, DomFisCalle, DomFisNoExt, DomFisCol, DomFisCP,
|
||||
@@ -2415,8 +2415,8 @@ Partial Class Compras_eFacturas
|
||||
|
||||
'Dim ObjProcess As Process = Nothing
|
||||
'Dim Mensajes As String = ""
|
||||
'Dim EjecutableUtilerias = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Utilerias\UtileriasAD.exe")
|
||||
'Dim Folder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Empresas\")
|
||||
'Dim EjecutableUtilerias = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Utilerias\UtileriasAD.exe")
|
||||
'Dim Folder = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas\")
|
||||
'Dim error1 As Boolean = False
|
||||
'Dim en As New CultureInfo("en-US")
|
||||
'Dim fechai = txtFechaI.Text.Trim.ToDate.ToString("d", en)
|
||||
@@ -2445,8 +2445,8 @@ Partial Class Compras_eFacturas
|
||||
'Private Sub ProcesaBuzon()
|
||||
' Dim ObjProcess As Process = Nothing
|
||||
' Dim Mensajes As String = ""
|
||||
' Dim EjecutableUtilerias = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Utilerias\ADSUtilerias.exe")
|
||||
' Dim Folder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Empresas\")
|
||||
' Dim EjecutableUtilerias = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Utilerias\ADSUtilerias.exe")
|
||||
' Dim Folder = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas\")
|
||||
' Dim error1 As Boolean = False
|
||||
' Dim en As New CultureInfo("en-US")
|
||||
' Dim fechai = txtFechaI.Text.Trim.ToDate.ToString("d", en)
|
||||
@@ -2679,7 +2679,7 @@ Partial Class Compras_eFacturas
|
||||
|
||||
|
||||
Dim XMLDoc As New XmlDocument
|
||||
Dim Archivo As String = String.Format("{0}Empresas\{1}\Compras\{2}\{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML"))
|
||||
Dim Archivo As String = String.Format("{0}Empresas\{1}\Compras\{2}\{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML"))
|
||||
If IO.File.Exists(Archivo) Then
|
||||
|
||||
|
||||
@@ -3144,7 +3144,7 @@ Partial Class Compras_eFacturas
|
||||
Public Sub ImprimirPDFXML(NombreArchivo As String, rutaxml As String)
|
||||
Dim objxml As XmlSatCFDI = XmlSatCFDI.readXML(rutaxml)
|
||||
|
||||
Dim rutaReporte As String = String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "\Empresas\Grales\Formatos\CFDIV3.rdlc")
|
||||
Dim rutaReporte As String = String.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, "\Empresas\Grales\Formatos\CFDIV3.rdlc")
|
||||
Dim QR As ClbNegBICFDv3_2.ClsNegCBBGenerar = New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||
Dim cQr As Byte() = QR.GenerarCBBBytes(objxml.emisor.Rfc, objxml.receptor.Rfc, objxml.comprobante.Total, objxml.complemento.UUID)
|
||||
Dim parametros As List(Of ReportParameter) = New List(Of ReportParameter)()
|
||||
@@ -3242,7 +3242,7 @@ Partial Class Compras_eFacturas
|
||||
Dim strRFCde As String = gvrow.DataKey("RFCde")
|
||||
Dim strXml As String
|
||||
Dim strPDF As String
|
||||
Dim dirbase As String = String.Format("{0}{1}{2}{3}{4}\", AppDomain.CurrentDomain.BaseDirectory, "\Empresas\", UsuarioActual.CveEmpresa, "\Compras\", strRFCde)
|
||||
Dim dirbase As String = String.Format("{0}{1}{2}{3}{4}\", ModExtensiones.DirectorioBaseEmpresas, "\Empresas\", UsuarioActual.CveEmpresa, "\Compras\", strRFCde)
|
||||
If Directory.Exists(dirbase) Then
|
||||
strXml = String.Format("{0}{1}", dirbase, gvrow.DataKey("XML"))
|
||||
strPDF = String.Format("{0}{1}", dirbase, gvrow.DataKey("PDF"))
|
||||
@@ -3277,7 +3277,7 @@ Partial Class Compras_eFacturas
|
||||
Dim gvrow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim strRFCde As String = gvrow.DataKey("RFCde")
|
||||
Dim strPDF As String
|
||||
Dim dirbase As String = String.Format("{0}{1}{2}{3}{4}\", AppDomain.CurrentDomain.BaseDirectory, "\Empresas\", UsuarioActual.CveEmpresa, "\Compras\", strRFCde)
|
||||
Dim dirbase As String = String.Format("{0}{1}{2}{3}{4}\", ModExtensiones.DirectorioBaseEmpresas, "\Empresas\", UsuarioActual.CveEmpresa, "\Compras\", strRFCde)
|
||||
strPDF = String.Format("{0}{1}", dirbase, gvrow.DataKey("PDF"))
|
||||
If File.Exists(strPDF) Then
|
||||
Dim file As New System.IO.FileInfo(strPDF)
|
||||
@@ -3301,7 +3301,7 @@ Partial Class Compras_eFacturas
|
||||
Dim gvrow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim strRFCde As String = gvrow.DataKey("RFCde")
|
||||
Dim strXml As String
|
||||
Dim dirbase As String = String.Format("{0}{1}{2}{3}{4}\", AppDomain.CurrentDomain.BaseDirectory, "\Empresas\", UsuarioActual.CveEmpresa, "\Compras\", strRFCde)
|
||||
Dim dirbase As String = String.Format("{0}{1}{2}{3}{4}\", ModExtensiones.DirectorioBaseEmpresas, "\Empresas\", UsuarioActual.CveEmpresa, "\Compras\", strRFCde)
|
||||
strXml = String.Format("{0}{1}", dirbase, gvrow.DataKey("XML"))
|
||||
If File.Exists(strXml) Then
|
||||
Dim file As New System.IO.FileInfo(strXml)
|
||||
@@ -3325,9 +3325,9 @@ Partial Class Compras_eFacturas
|
||||
Dim gvrow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim objxml As XmlSatCFDI = XmlSatCFDI.readXML(String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("XML")))
|
||||
If Not IsNothing(objxml) Then
|
||||
Dim rutaReporte As String = String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "\Empresas\Grales\Formatos\CFDIV3.rdlc")
|
||||
Dim rutaReporte As String = String.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, "\Empresas\Grales\Formatos\CFDIV3.rdlc")
|
||||
If Not IsNothing(objxml.complemento.Pagos) Then
|
||||
rutaReporte = String.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "\Empresas\Grales\Formatos\CFDIV3Pago.rdlc")
|
||||
rutaReporte = String.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, "\Empresas\Grales\Formatos\CFDIV3Pago.rdlc")
|
||||
End If
|
||||
Dim NombreArchivo As String = String.Format("{0}{1}\{2}", Destino, gvrow.DataKey("RFCDe"), gvrow.DataKey("PDF"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user