diff --git a/.gitignore b/.gitignore
index da32853ea..7462e83a5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -272,3 +272,4 @@ __pycache__/
/Default.aspx
/Default.aspx.cs
/App_WebReferences/WSRDLC
+/wwwSIGGIT.rar
diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb
index 8994113ac..f705a3c26 100644
--- a/AF/AF.aspx.vb
+++ b/AF/AF.aspx.vb
@@ -818,7 +818,7 @@ Partial Class AF_AF
Filename = fileItem.filename
Next
- Dim Archivo As New System.IO.FileInfo(String.Format("{0}AF\Licencias\{1}", AppDomain.CurrentDomain.BaseDirectory, Filename))
+ Dim Archivo As New System.IO.FileInfo(String.Format("{0}AF\Licencias\{1}", ModExtensiones.DirectorioBaseEmpresas, Filename))
If Archivo.Exists() Then
Archivo.Delete()
End If
@@ -1743,102 +1743,102 @@ Partial Class AF_AF
End If
End If
- End Sub
-
- 'Protected Sub GvResguardos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvResguardos.RowCancelingEdit
- ' GvResguardos.EditIndex = -1
- ' GvResguardos.DataBind()
- ' CargaResguardos()
- 'End Sub
-
- 'Protected Sub GvResguardos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvResguardos.RowEditing
- ' GvResguardos.EditIndex = e.NewEditIndex
- ' CargaResguardos()
- 'End Sub
-
- 'Protected Sub GvResguardos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvResguardos.RowUpdating
-
- ' Dim ObjResguardos As New ClsAF
-
- ' ' Dim FechaFin As String = DirectCast(GvResguardos.Rows(e.RowIndex).FindControl("TxtFechaFin"), TextBox).Text
- ' ' FechaFin = If(IsDate(FechaFin), FechaFin, "-1")
- ' Dim Observaciones As String = DirectCast(GvResguardos.Rows(e.RowIndex).FindControl("TxtObservaciones"), TextBox).Text.Trim
- ' Dim URL As String = "-1"
- ' Dim URL2 As String = "-1"
- ' Dim RutaGuardar = ""
- ' Dim RutaArchivo = ""
- ' Dim RutaArchivo2 = ""
- ' Dim Archivo As String = ""
- ' Dim Archivo2 As String = ""
- ' Dim CveActivoFijoResguardo As Integer = GvResguardos.DataKeys(e.RowIndex).Value.ToString.ToEntero
-
- ' 'If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(String.Format("{0}Temp\{1}", UsuarioActual.Empresa.Ruta, Session("FileUpload").ToString)) Then
- ' ' Dim TmpArchivo As String = String.Format("{0}Temp\{1}", UsuarioActual.Empresa.Ruta, Session("FileUpload").ToString)
- ' ' Dim TmpRuta As String = String.Format("{0}ActivosFijos\Resguardos\", UsuarioActual.Empresa.Ruta)
- ' ' Dim Extension As String = Path.GetExtension(TmpArchivo)
- ' ' TmpRuta.DirectoryExistsCreate()
- ' ' 'If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Resguardos\") Then Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Resguardos\")
- ' ' TmpRuta = String.Format("{0}{1}{2}", TmpRuta, CveActivoFijoResguardo, Extension)
- ' ' File.Move(TmpArchivo, TmpRuta)
- ' ' Session("FileUpload") = ""
-
- ' ' If File.Exists(TmpRuta) Then
- ' ' URL = URL & Extension
- ' ' Else
- ' ' URL = ""
- ' ' End If
- ' 'Else
- ' ' URL = URLOld
- ' 'End If
-
-
- ' 'RutaGuardar = String.Format("{0}OI\", UsuarioActual.Empresa.Ruta)
- ' 'If A2.HRef <> "" Then RutaArchivo = String.Format("{0}{1}", Request.PhysicalApplicationPath, A2.HRef.Substring(1))
-
-
- ' 'End If
-
- ' 'If UsuarioActual.CveRol = 1037 Then
- ' ' RutaGuardar = String.Format("{0}Empresas\70\OI\", Request.PhysicalApplicationPath)
- ' ' RutaGuardar.DirectoryExistsCreate()
- ' 'End If
- ' 'Else
- ' RutaGuardar = String.Format("{0}AF\Resguardos\", UsuarioActual.Empresa.Ruta)
- ' RutaArchivo = String.Format("{0}AF\Resguardos\Temp\{1}", UsuarioActual.Empresa.Ruta, Session("AF"))
- ' RutaArchivo2 = (String.Format("{0}AF\Resguardos\Temp\{1}", UsuarioActual.Empresa.Ruta, Session("AF1")))
-
- ' If Session("AF") IsNot Nothing AndAlso File.Exists(RutaArchivo) Then
- ' If Not Directory.Exists(RutaGuardar) Then Directory.CreateDirectory(RutaGuardar)
- ' Archivo = Path.GetExtension(Session("AF").ToString)
- ' File.Move(RutaArchivo, String.Format("{0}{1}", RutaGuardar, CveActivoFijoResguardo.ToString + "_1" + Archivo))
- ' Session("AF") = ""
- ' URL = CveActivoFijoResguardo.ToString + "_1" + Archivo
- ' End If
-
-
- ' If Session("AF1") IsNot Nothing AndAlso File.Exists(RutaArchivo2) Then
- ' If Not Directory.Exists(RutaGuardar) Then Directory.CreateDirectory(RutaGuardar)
- ' Archivo2 = Path.GetExtension(Session("AF1").ToString)
- ' File.Move(RutaArchivo2, String.Format("{0}{1}", RutaGuardar, CveActivoFijoResguardo.ToString + "_2" + Archivo2))
- ' Session("AF1") = ""
- ' URL2 = CveActivoFijoResguardo.ToString + "_2" + Archivo2
- ' End If
-
-
- ' If ObjResguardos.UpdateActivosFijosResguardos("-1", Observaciones, URL, CveActivoFijoResguardo, -1, URL2) Then
- ' GvResguardos.EditIndex = -1
- ' ViewState("DTResguardos") = ObjResguardos.DtResultados
- ' GvResguardos.DataSource = ObjResguardos.DtResultados
- ' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
- ' 'If FechaFin <> "-1" Then DdlResponsable.Enabled = True : DdlResponsable.SelectedValue = "-1"
- ' UPEstatus.Update()
- ' End If
-
- ' ObjResguardos.Dispose()
- ' GvResguardos.DataBind()
- 'End Sub
-
-
+ End Sub
+
+ 'Protected Sub GvResguardos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvResguardos.RowCancelingEdit
+ ' GvResguardos.EditIndex = -1
+ ' GvResguardos.DataBind()
+ ' CargaResguardos()
+ 'End Sub
+
+ 'Protected Sub GvResguardos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvResguardos.RowEditing
+ ' GvResguardos.EditIndex = e.NewEditIndex
+ ' CargaResguardos()
+ 'End Sub
+
+ 'Protected Sub GvResguardos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvResguardos.RowUpdating
+
+ ' Dim ObjResguardos As New ClsAF
+
+ ' ' Dim FechaFin As String = DirectCast(GvResguardos.Rows(e.RowIndex).FindControl("TxtFechaFin"), TextBox).Text
+ ' ' FechaFin = If(IsDate(FechaFin), FechaFin, "-1")
+ ' Dim Observaciones As String = DirectCast(GvResguardos.Rows(e.RowIndex).FindControl("TxtObservaciones"), TextBox).Text.Trim
+ ' Dim URL As String = "-1"
+ ' Dim URL2 As String = "-1"
+ ' Dim RutaGuardar = ""
+ ' Dim RutaArchivo = ""
+ ' Dim RutaArchivo2 = ""
+ ' Dim Archivo As String = ""
+ ' Dim Archivo2 As String = ""
+ ' Dim CveActivoFijoResguardo As Integer = GvResguardos.DataKeys(e.RowIndex).Value.ToString.ToEntero
+
+ ' 'If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(String.Format("{0}Temp\{1}", UsuarioActual.Empresa.Ruta, Session("FileUpload").ToString)) Then
+ ' ' Dim TmpArchivo As String = String.Format("{0}Temp\{1}", UsuarioActual.Empresa.Ruta, Session("FileUpload").ToString)
+ ' ' Dim TmpRuta As String = String.Format("{0}ActivosFijos\Resguardos\", UsuarioActual.Empresa.Ruta)
+ ' ' Dim Extension As String = Path.GetExtension(TmpArchivo)
+ ' ' TmpRuta.DirectoryExistsCreate()
+ ' ' 'If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Resguardos\") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Resguardos\")
+ ' ' TmpRuta = String.Format("{0}{1}{2}", TmpRuta, CveActivoFijoResguardo, Extension)
+ ' ' File.Move(TmpArchivo, TmpRuta)
+ ' ' Session("FileUpload") = ""
+
+ ' ' If File.Exists(TmpRuta) Then
+ ' ' URL = URL & Extension
+ ' ' Else
+ ' ' URL = ""
+ ' ' End If
+ ' 'Else
+ ' ' URL = URLOld
+ ' 'End If
+
+
+ ' 'RutaGuardar = String.Format("{0}OI\", UsuarioActual.Empresa.Ruta)
+ ' 'If A2.HRef <> "" Then RutaArchivo = String.Format("{0}{1}", ModExtensiones.DirectorioBaseEmpresas, A2.HRef.Substring(1))
+
+
+ ' 'End If
+
+ ' 'If UsuarioActual.CveRol = 1037 Then
+ ' ' RutaGuardar = String.Format("{0}Empresas\70\OI\", ModExtensiones.DirectorioBaseEmpresas)
+ ' ' RutaGuardar.DirectoryExistsCreate()
+ ' 'End If
+ ' 'Else
+ ' RutaGuardar = String.Format("{0}AF\Resguardos\", UsuarioActual.Empresa.Ruta)
+ ' RutaArchivo = String.Format("{0}AF\Resguardos\Temp\{1}", UsuarioActual.Empresa.Ruta, Session("AF"))
+ ' RutaArchivo2 = (String.Format("{0}AF\Resguardos\Temp\{1}", UsuarioActual.Empresa.Ruta, Session("AF1")))
+
+ ' If Session("AF") IsNot Nothing AndAlso File.Exists(RutaArchivo) Then
+ ' If Not Directory.Exists(RutaGuardar) Then Directory.CreateDirectory(RutaGuardar)
+ ' Archivo = Path.GetExtension(Session("AF").ToString)
+ ' File.Move(RutaArchivo, String.Format("{0}{1}", RutaGuardar, CveActivoFijoResguardo.ToString + "_1" + Archivo))
+ ' Session("AF") = ""
+ ' URL = CveActivoFijoResguardo.ToString + "_1" + Archivo
+ ' End If
+
+
+ ' If Session("AF1") IsNot Nothing AndAlso File.Exists(RutaArchivo2) Then
+ ' If Not Directory.Exists(RutaGuardar) Then Directory.CreateDirectory(RutaGuardar)
+ ' Archivo2 = Path.GetExtension(Session("AF1").ToString)
+ ' File.Move(RutaArchivo2, String.Format("{0}{1}", RutaGuardar, CveActivoFijoResguardo.ToString + "_2" + Archivo2))
+ ' Session("AF1") = ""
+ ' URL2 = CveActivoFijoResguardo.ToString + "_2" + Archivo2
+ ' End If
+
+
+ ' If ObjResguardos.UpdateActivosFijosResguardos("-1", Observaciones, URL, CveActivoFijoResguardo, -1, URL2) Then
+ ' GvResguardos.EditIndex = -1
+ ' ViewState("DTResguardos") = ObjResguardos.DtResultados
+ ' GvResguardos.DataSource = ObjResguardos.DtResultados
+ ' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
+ ' 'If FechaFin <> "-1" Then DdlResponsable.Enabled = True : DdlResponsable.SelectedValue = "-1"
+ ' UPEstatus.Update()
+ ' End If
+
+ ' ObjResguardos.Dispose()
+ ' GvResguardos.DataBind()
+ 'End Sub
+
+
#Region " ARCHIVO "
Protected Sub ImgArchivo_Click(sender As Object, e As ImageClickEventArgs)
CveResguardoPadre = CType(sender, ImageButton).CommandArgument.ToEntero
@@ -1920,35 +1920,35 @@ Partial Class AF_AF
nombreArchivoFormateado = nombreArchivoFormateado.Replace("~", "_")
nombreArchivoFormateado = nombreArchivoFormateado.Replace("^", "_")
Return nombreArchivoFormateado
- End Function
-
+ End Function
+
#End Region
-
-
+
+
#End Region
-
+
#Region "GALERIA DE IMAGENES"
- 'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click
- ' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Empresas\" & CveEmpresaActual & "\Temp\" & Session("FileUpload").ToString) Then
- ' Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Empresas\" & CveEmpresaActual & "\Temp\" & Session("FileUpload").ToString)
- ' If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Imagenes") Then Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Imagenes")
- ' File.Move(Request.PhysicalApplicationPath + "Empresas\" & CveEmpresaActual & "\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Empresas\" & CveEmpresaActual & "\ActivosFijos\" & CveActivoFijo & "_" & ImgConsecutivo & Extension)
- ' Session("FileUpload") = ""
-
- ' If File.Exists(Request.PhysicalApplicationPath + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Imagenes" & CveActivoFijo & "_" & ImgConsecutivo & Extension) Then
- ' Dim ObjActivosFijos As New ClsAF
- ' If ObjActivosFijos.AddActivosFijosImagenes(CveActivoFijo, CveActivoFijo & "_" & ImgConsecutivo & Extension, UsuarioActual.CveUsuario) Then
- ' CargarArchivo()
- ' Else
- ' File.Delete(Request.PhysicalApplicationPath + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Imagenes" & CveActivoFijo & "_" & ImgConsecutivo & Extension)
- ' End If
-
- ' ObjActivosFijos.Dispose()
-
- ' End If
- ' End If
- 'End Sub
-
+ 'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click
+ ' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & CveEmpresaActual & "\Temp\" & Session("FileUpload").ToString) Then
+ ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & CveEmpresaActual & "\Temp\" & Session("FileUpload").ToString)
+ ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Imagenes") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Imagenes")
+ ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & CveEmpresaActual & "\Temp\" & Session("FileUpload").ToString, ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & CveEmpresaActual & "\ActivosFijos\" & CveActivoFijo & "_" & ImgConsecutivo & Extension)
+ ' Session("FileUpload") = ""
+
+ ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Imagenes" & CveActivoFijo & "_" & ImgConsecutivo & Extension) Then
+ ' Dim ObjActivosFijos As New ClsAF
+ ' If ObjActivosFijos.AddActivosFijosImagenes(CveActivoFijo, CveActivoFijo & "_" & ImgConsecutivo & Extension, UsuarioActual.CveUsuario) Then
+ ' CargarArchivo()
+ ' Else
+ ' File.Delete(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & CveEmpresaActual & "\ActivosFijos\Imagenes" & CveActivoFijo & "_" & ImgConsecutivo & Extension)
+ ' End If
+
+ ' ObjActivosFijos.Dispose()
+
+ ' End If
+ ' End If
+ 'End Sub
+
Private Sub BtnUpFotos_Click(sender As Object, e As EventArgs) Handles BtnUpFotos.Click
Dim FilesGral As List(Of Archivo) = TxtUpFotos.getfiles().Archivos
@@ -1963,7 +1963,7 @@ Partial Class AF_AF
Dim DirectorioOld As New StringBuilder
Dim DirectorioNew As New StringBuilder
DirectorioOld.AppendFormat("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, FileMove)
- DirectorioNew.AppendFormat("{0}Empresas\{1}\AF\", AppDomain.CurrentDomain.BaseDirectory, CveEmpresaActual)
+ DirectorioNew.AppendFormat("{0}Empresas\{1}\AF\", ModExtensiones.DirectorioBaseEmpresas, CveEmpresaActual)
If Not Directory.Exists(DirectorioNew.ToString) Then
Directory.CreateDirectory(DirectorioNew.ToString)
End If
@@ -1995,7 +1995,7 @@ Partial Class AF_AF
If (CveImagenActivoFijo > 0) Then
Dim ObjActivoFijo As New ClsAF
If ObjActivoFijo.RemoveActivosFijosImagenes(CveImagenActivoFijo) Then
- File.Delete(String.Format("{0}Empresas\{1}\{2}", AppDomain.CurrentDomain.BaseDirectory, CveEmpresaActual, ObjActivoFijo.DtResultados.Rows(0)("URL")))
+ File.Delete(String.Format("{0}Empresas\{1}\{2}", ModExtensiones.DirectorioBaseEmpresas, CveEmpresaActual, ObjActivoFijo.DtResultados.Rows(0)("URL")))
CargarArchivo()
RegistraScript("initcarusel();")
End If
@@ -2407,7 +2407,7 @@ Partial Class AF_AF
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
diff --git a/AF/ResguardoAF.aspx.vb b/AF/ResguardoAF.aspx.vb
index 0447d9c7d..5f48d7542 100644
--- a/AF/ResguardoAF.aspx.vb
+++ b/AF/ResguardoAF.aspx.vb
@@ -542,8 +542,8 @@ Partial Class AF_ResguardoAF
If EsLiberacion Then
If objAF.UpdateActivosFijosResguardosURL($"AFR{CveResguardoPadre}.{FileExtension}", "-1", CveResguardoPadre) Then
If filemove <> "" Then
- If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension)) Then
- File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension))
+ If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension)) Then
+ File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension))
End If
If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa)) Then
HuboError = False
@@ -558,8 +558,8 @@ Partial Class AF_ResguardoAF
If EsURL2 Then
If objAF.UpdateActivosFijosResguardosURLGpo("-1", $"AFT{CveResguardoPadre}.{FileExtension}", CveResguardoPadre) Then
If filemove <> "" Then
- If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension)) Then
- File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension))
+ If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension)) Then
+ File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension))
End If
If filemove.FilesMove(String.Format("AFT{0}", CveResguardoPadre), String.Format("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa)) Then
HuboError = False
@@ -575,8 +575,8 @@ Partial Class AF_ResguardoAF
If objAF.UpdateActivosFijosResguardosURLGpo($"AFR{CveResguardoPadre}.{FileExtension}", "-1", CveResguardoPadre) Then
If filemove <> "" Then
- If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension)) Then
- File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension))
+ If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension)) Then
+ File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension))
End If
If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa)) Then
HuboError = False
diff --git a/AIMMGM/ConsultaCliente.aspx.vb b/AIMMGM/ConsultaCliente.aspx.vb
index 17bcdf3cb..29c856863 100644
--- a/AIMMGM/ConsultaCliente.aspx.vb
+++ b/AIMMGM/ConsultaCliente.aspx.vb
@@ -323,7 +323,7 @@ Partial Class AIMMGM_ConsultaCliente
'Excel.DisplayAlerts = True
'Dim pdfFileOut As String
'Dim xlsxFileOut As String
- 'Dim Ruta As String = String.Format("{0}\AIMMGM\Gafetes\", AppDomain.CurrentDomain.BaseDirectory)
+ 'Dim Ruta As String = String.Format("{0}\AIMMGM\Gafetes\", ModExtensiones.DirectorioBaseEmpresas)
'If IO.File.Exists(Ruta & "FormatoAIMMGM.xlsx") Then
@@ -648,14 +648,14 @@ Partial Class AIMMGM_ConsultaCliente
End If
Dim AIM As New ClsAIMMGM
- If Not IO.Directory.Exists(String.Format("{0}\Empresas\{1}\Documentos", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
- IO.Directory.CreateDirectory(String.Format("{0}\Empresas\{1}\Documentos", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
+ If Not IO.Directory.Exists(String.Format("{0}\Empresas\{1}\Documentos", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)) Then
+ IO.Directory.CreateDirectory(String.Format("{0}\Empresas\{1}\Documentos", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa))
End If
Dim Cve As Integer = AIM.AddPago(CveCliente, CveVentaDetalle, TxtImporte.Text.ToDouble, 1, TxtFecha.Text.ToDate, IO.Path.GetExtension(FUComprobante.FileName), TxtObservaciones.Text.Trim, 9999, TxtAprobacion.Text.ToEntero)
If Cve > 0 Then
- FUComprobante.SaveAs(String.Format("{0}/Empresas/{1}/Documentos/{2}{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, Cve, IO.Path.GetExtension(FUComprobante.FileName)))
+ FUComprobante.SaveAs(String.Format("{0}/Empresas/{1}/Documentos/{2}{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Cve, IO.Path.GetExtension(FUComprobante.FileName)))
Alert("Pago ingresado correctamente", TipoMensaje.MsgInformacion)
End If
AIM.Dispose()
@@ -669,8 +669,8 @@ Partial Class AIMMGM_ConsultaCliente
Exit Sub
End If
'obtengo la clave de la publicidad
- If Not IO.Directory.Exists(String.Format("{0}\Empresas\{1}\Documentos", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)) Then
- IO.Directory.CreateDirectory(String.Format("{0}\Empresas\{1}\Documentos", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
+ If Not IO.Directory.Exists(String.Format("{0}\Empresas\{1}\Documentos", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)) Then
+ IO.Directory.CreateDirectory(String.Format("{0}\Empresas\{1}\Documentos", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa))
End If
Dim Logo As String
@@ -680,7 +680,7 @@ Partial Class AIMMGM_ConsultaCliente
If AIM.DtResultados.Rows.Count > 0 Then
CvePublicidad = AIM.DtResultados.Rows(0)("CvePublicidad").ToString.ToEntero
Logo = String.Format("Logo{0}{1}", CvePublicidad, IO.Path.GetExtension(FULogo.FileName))
- FULogo.SaveAs(String.Format("{0}/Empresas/{1}/Documentos/{2}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, Logo))
+ FULogo.SaveAs(String.Format("{0}/Empresas/{1}/Documentos/{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Logo))
AIM.UpdateLogo(CvePublicidad, Logo)
ImgLogo.ImageUrl = String.Format("/Empresas/{0}/Documentos/{1}", UsuarioActual.CveEmpresa, Logo)
diff --git a/AIMMGM/Pagos.aspx.vb b/AIMMGM/Pagos.aspx.vb
index 0a19943c8..37f0c54a4 100644
--- a/AIMMGM/Pagos.aspx.vb
+++ b/AIMMGM/Pagos.aspx.vb
@@ -161,7 +161,7 @@ Partial Class AIMMGM_Pagos
Next
Next
- Dim Archivoxlsx As String = String.Format("{0}/Empresas/{1}/Documentos/{2}.xlsx", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, NombreArchivoXLSX)
+ Dim Archivoxlsx As String = String.Format("{0}/Empresas/{1}/Documentos/{2}.xlsx", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, NombreArchivoXLSX)
Using wb As New XLWorkbook()
wb.Worksheets.Add(dtt)
wb.SaveAs(Archivoxlsx)
diff --git a/AIMMGM/Registro.aspx.vb b/AIMMGM/Registro.aspx.vb
index 225c98d00..cc37fbe2f 100644
--- a/AIMMGM/Registro.aspx.vb
+++ b/AIMMGM/Registro.aspx.vb
@@ -125,7 +125,7 @@ Partial Class AIMMGM_Registro
Private Sub CargaReCompra(ClavePago As String, CveCliente As Integer)
Dim tmp As New DataTable
- Dim Carpeta As String = String.Format("{0}AIMMGM/ePagos", AppDomain.CurrentDomain.BaseDirectory)
+ Dim Carpeta As String = String.Format("{0}AIMMGM/ePagos", ModExtensiones.DirectorioBaseEmpresas)
Dim Archivo As String = String.Format("{0}/{1}.xml", Carpeta, ClavePago)
Dim Archivo2 As String = String.Format("{0}/C{1}.xml", Carpeta, ClavePago)
diff --git a/AIMMGM/ePagos.aspx.vb b/AIMMGM/ePagos.aspx.vb
index 9011af649..75fc0b45a 100644
--- a/AIMMGM/ePagos.aspx.vb
+++ b/AIMMGM/ePagos.aspx.vb
@@ -90,7 +90,7 @@ Partial Class AIMMGM_ePagos
Private Sub CargaCompra()
Dim tmp As New DataTable
- Dim Carpeta As String = String.Format("{0}AIMMGM/ePagos", AppDomain.CurrentDomain.BaseDirectory)
+ Dim Carpeta As String = String.Format("{0}AIMMGM/ePagos", ModExtensiones.DirectorioBaseEmpresas)
Dim Archivo As String = String.Format("{0}/{1}.xml", Carpeta, ClavePago)
Dim Archivo2 As String = String.Format("{0}/C{1}.xml", Carpeta, ClavePago)
diff --git a/App_Code/ClsAcarreos.vb b/App_Code/ClsAcarreos.vb
index e039cb589..6ec08daaa 100644
--- a/App_Code/ClsAcarreos.vb
+++ b/App_Code/ClsAcarreos.vb
@@ -391,7 +391,7 @@ Public Class ClsAcarreos
Dim CveAcarreo As Integer = Data(0)(0).ToString.ToEntero
Dim AcarreoFolio As Integer = Data(0)(1).ToString.ToEntero
- Dim Raiz As String = String.Format("{0}Empresas\{1}\Acarreos\", HttpContext.Current.Server.MapPath("~/"), CveEmpresa)
+ Dim Raiz As String = String.Format("{0}Empresas\{1}\Acarreos\", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa)
If Not Directory.Exists(Raiz) Then
Directory.CreateDirectory(Raiz)
diff --git a/App_Code/ClsDG.vb b/App_Code/ClsDG.vb
index 7f6dad9c2..b4b540c45 100644
--- a/App_Code/ClsDG.vb
+++ b/App_Code/ClsDG.vb
@@ -614,7 +614,7 @@ Public Class ClsDG
strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto)
Try
- ArchivoW = New StreamWriter(String.Format("{0}\LogDG.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
+ ArchivoW = New StreamWriter(String.Format("{0}\LogDG.txt", AppDomain.CurrentDomain), True, System.Text.Encoding.UTF8)
Catch ex As Exception
Exit Sub
End Try
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 74be2b92d..b8248e915 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -1240,7 +1240,14 @@ Public Class ClsInventarios
Return Retorno
End Function
-
+ '''
+ ''' Obtiene los valores para asignar a los movimientos virtuales
+ '''
+ ''' Debe ser un movimiento de Salida o Entrada de almacen (2,3,18)
+ '''
+ '''
+ ''' Cuando sea cancelacion/devolucion hay que mandar este dato que seria la salida de almacen
+ '''
Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoRelacionado As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_MovimientosDetalleVirtualGet")
diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb
index d73f1af56..658e42ace 100644
--- a/App_Code/ClsOIEventos.vb
+++ b/App_Code/ClsOIEventos.vb
@@ -15,6 +15,7 @@ Public Enum OITipoEventos
ISO = 8
Soporte = 9
Gastos_Mes = 10
+ Convocatorias = 11
End Enum
Public Class ObjEventosCorreo
@@ -218,9 +219,220 @@ Public Class ClsOIEventos
Public Property objCorreo As ObjEventosCorreo
#End Region
+#Region "Trello"
+ Public Function GetTablero(cveTablero As Int32, cveUsuario As Int32, cveEmpresa As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_GetTablero", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTablero", SqlDbType.Int).Value = (cveTablero)
+ .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 obtener el Tablero.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function AddTablero(tablero As String, cveUsuario As Int32, cveUsuarioIng As Int32, cveEmpresa As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_AddTablero", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@Tablero", SqlDbType.VarChar).Value = (tablero)
+ .Add("@CveUsuario", SqlDbType.Int).Value = (cveUsuario)
+ .Add("@CveUsuarioIng", SqlDbType.Int).Value = (cveUsuarioIng)
+ .Add("@CveEmpresa", SqlDbType.Int).Value = (cveEmpresa)
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar el Tablero.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function UpTablero(cveTablero As Int32, tablero As String, cveUsuario As Int32, cveEmpresa As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_UpTablero", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTablero", SqlDbType.Int).Value = (cveTablero)
+ .Add("@Tablero", SqlDbType.VarChar).Value = (tablero)
+ .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 actualizar el Tablero.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function RemoveTablero(cveTablero As Int32, cveUsuario As Int32, cveEmpresa As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_RemoveTablero", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTablero", SqlDbType.Int).Value = (cveTablero)
+ .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 eliminar el Tablero.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+
+ Public Function UpEventoLista(cveTableroLista As Int32, CveEvento As Integer) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_EventoLista", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTableroLista", SqlDbType.Int).Value = (cveTableroLista)
+ .Add("@CveEvento", SqlDbType.Int).Value = (CveEvento)
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener la Lista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+
+
+ Public Function GetTableroListaTrello(cveTablero As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_GetTableroListaTrello", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTablero", SqlDbType.Int).Value = (cveTablero)
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener la Lista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+
+ Public Function GetTableroLista(cveTableroLista As Int32, cveTablero As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_GetTableroLista", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTableroLista", SqlDbType.Int).Value = (cveTableroLista)
+ .Add("@CveTablero", SqlDbType.Int).Value = (cveTablero)
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener la Lista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function AddTableroLista(cveTablero As Int32, lista As String, cveUsuarioIng As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_AddTableroLista", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTablero", SqlDbType.Int).Value = cveTablero
+ .Add("@Lista", SqlDbType.VarChar).Value = (lista)
+ .Add("@CveUsuarioIng", SqlDbType.Int).Value = (cveUsuarioIng)
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar la Lista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function UpTableroLista(cveTableroLista As Int32, lista As String) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_UpTableroLista", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTableroLista", SqlDbType.Int).Value = (cveTableroLista)
+ .Add("@Lista", SqlDbType.VarChar).Value = (lista)
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al actualizar el Tablero.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function RemoveTableroLista(cveTableroLista As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_RemoveTableroLista", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTableroLista", SqlDbType.Int).Value = (cveTableroLista)
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al eliminar la Lista.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+#End Region
#Region "oieventos2.0"
+ Public Function UpEventosVinculos(cveEvento As Int32, cveActivoFijo As Int32, cveIE As Int32, cveProspecto As Int32, cveCliente As Int32, cveOS As Int32, cveOC As Int32, cvePersonal As Int32,
+ cveProveedor As Int32, cveCompra As Int32, cveVenta As Int32, cveContrato As Int32, cveSubProyecto As Int32, cveMovimientoAlmacen As Int32,
+ cveEmpresaCRM As Int32) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_EventosVinculosUp", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEvento", SqlDbType.Int).Value = (cveEvento)
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveActivoFijo", SqlDbType.Int).Value = (cveActivoFijo)
+ .Add("@CveIE", SqlDbType.Int).Value = (cveIE)
+ .Add("@CveProspecto", SqlDbType.Int).Value = (cveProspecto)
+ .Add("@CveCliente", SqlDbType.Int).Value = (cveCliente)
+ .Add("@CveOS", SqlDbType.Int).Value = (cveOS)
+ .Add("@CveOC", SqlDbType.Int).Value = (cveOC)
+ .Add("@CvePersonal", SqlDbType.Int).Value = (cvePersonal)
+ .Add("@CveProveedor", SqlDbType.Int).Value = (cveProveedor)
+ .Add("@CveCompra", SqlDbType.Int).Value = (cveCompra)
+ .Add("@CveVenta", SqlDbType.Int).Value = (cveVenta)
+ .Add("@CveContrato", SqlDbType.Int).Value = (cveContrato)
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = (cveSubProyecto)
+ .Add("@CveMovimientoAlmacen", SqlDbType.Int).Value = (cveMovimientoAlmacen)
+ .Add("@CveEmpresaCRM", SqlDbType.Int).Value = (cveEmpresaCRM)
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al actualizar el Evento .", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+
+ Public Function RemoveEvento2(cveEvento As Integer, CveEmpresa As Integer, cveUsuario As Integer) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_EventosRemove2", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEvento", SqlDbType.Int).Value = cveEvento
+ .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 eliminar el Evento .", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
Public Function GetEventosUsuario2(CveEvento As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OI_EventosUsuarios2Get")
@@ -255,13 +467,15 @@ Public Class ClsOIEventos
Return Retorno
End Function
- Public Function UpUsuarioseventosVisto(CveEvento As Integer, CveUsuario As Integer) As Boolean
+ Public Function UpUsuarioseventosVisto(CveEvento As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
- DataAdapter("UPDATE OI_EventosUsuarios SET Visto=1 WHERE CveEvento =@CveEvento AND CveUsuario=@CveUsuario", CommandType.Text)
+ 'DataAdapter("UPDATE OI_EventosUsuarios SET Visto=1 WHERE CveEvento =@CveEvento AND CveUsuario=@CveUsuario;IF @@ROWCOUNT >0 BEGIN INSERT INTO OI_EventosComentarios (CveEvento, EventoComentario, CveUsuario) VALUES ( @CveEvento, CONCAT('El Usuario ""',(SELECT Nombre FROM Usuarios WHERE CveUsuario=@CveUsuario),'"" a visto la tarea'), @CveUsuario); END", CommandType.Text)
+ DataAdapter("PA_OI_EventosUpVisto")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEvento", SqlDbType.Int).Value = CveEvento
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
@@ -303,10 +517,10 @@ Public Class ClsOIEventos
Return retorno
End Function
- Public Function AddEventoMinuta2(Asunto As String, Descripcion As String, Acuerdos As String, CveUsuarioDe As Integer, CveUsuarioPara As Integer, FechaInicio As DateTime, Archivo As String, Lmiembros As List(Of Integer), chkList As List(Of String), CveUsuarioIng As Integer, CveEmpresa As Integer) As Boolean
+ Public Function AddEventoMinuta2(Asunto As String, Descripcion As String, Acuerdos As String, CveUsuarioDe As Integer, CveUsuarioPara As Integer, FechaInicio As DateTime, Archivo As String, Lmiembros As List(Of Integer), chkList As List(Of String), CveUsuarioIng As Integer, CveEmpresa As Integer, CorreoExterno As String) As Boolean
Dim Retorno As Boolean = False
- Retorno = AddOI_Eventos2(OITipoEventos.Minuta, Asunto, Descripcion, 3, -1, -1, String.Format("{0:yyyy/MM/dd HH:mm}", FechaInicio), "1900/01/01 00:00", -1, Archivo, Lmiembros, chkList, CveUsuarioIng, CveEmpresa, -1, Acuerdos)
+ Retorno = AddOI_Eventos2(OITipoEventos.Minuta, Asunto, Descripcion, 3, -1, -1, String.Format("{0:yyyy/MM/dd HH:mm}", FechaInicio), "1900/01/01 00:00", -1, Archivo, Lmiembros, chkList, CveUsuarioIng, CveEmpresa, -1, Acuerdos, CorreoExterno:=CorreoExterno)
'Retorno = AddEvento(5, -1, Asunto, Descripcion, 1, -1, -1, FechaInicio, ("01/01/1799").ToDate, -1, -1, "-1", CveUsuarioIng, CveEmpresa, -1, -1, -1, -1, -1, -1, -1, -1)
Return Retorno
@@ -317,7 +531,7 @@ Public Class ClsOIEventos
Optional CveActivoFijo As Integer = -1, Optional CveIE As Integer = -1, Optional CveProspecto As Integer = -1, Optional CveCliente As Integer = -1,
Optional CveOS As Integer = -1, Optional CveOC As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveProveedor As Integer = -1,
Optional CveCompra As Integer = -1, Optional CveVenta As Integer = -1, Optional CveContrato As Integer = -1, Optional CveSubProyecto As Integer = -1,
- Optional CveMovimientoAlmacen As Integer = -1) As Boolean
+ Optional CveMovimientoAlmacen As Integer = -1, Optional CorreoExterno As String = "", Optional CveTableroLista As Integer = -1, Optional Lugar As String = "") As Boolean
Dim retorno As Boolean = False
Dim xmlMiembros As System.Xml.Linq.XDocument = Nothing
@@ -374,7 +588,9 @@ Public Class ClsOIEventos
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveMovimientoAlmacen", SqlDbType.Int).Value = CveMovimientoAlmacen
-
+ .Add("@CorreoExterno", SqlDbType.VarChar).Value = CorreoExterno
+ .Add("@Lugar", SqlDbType.VarChar).Value = Lugar
+ .Add("@CveTableroLista", SqlDbType.VarChar).Value = CveTableroLista
'.Add("@mailPara", SqlDbType.VarChar).Direction = ParameterDirection.Output
'.Add("@mailBody", SqlDbType.Xml).Direction = ParameterDirection.Output
@@ -1598,8 +1814,10 @@ Public Class ClsOIEventos
SqlAdapter.Fill(Data)
Retorno = True
+ Catch ex As SqlException
+ OnError("Ocurrió un error al guardar Tema.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
- OnError("Ocurrió un error al guardar la Revision de Eventos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ OnError("Ocurrió un error al guardar Tema.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 8a6e569be..07b14f13b 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -3567,6 +3567,10 @@ Public Class ClsPaginas
PaginaDict.Add("/OI/Tareas.aspx".ToUpper(), -1)
PaginaDict.Add("/OI/RepProyectos.aspx".ToUpper(), -1)
PaginaDict.Add("/OI/Proyecto.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/Tablero.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/TableroDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/ConvocatoriaDetalle.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/RepReuniones.aspx".ToUpper(), -1)
PaginaDict.Add("/AdSistemasTeam/ProcedimientosAlmacenados.aspx".ToUpper(), -1)
PaginaDict.Add("/OS/CatOrdenesServiciosCaracteristicas.aspx".ToUpper(), -1)
PaginaDict.Add("/OS/CatOSCaracteristicasOpciones.aspx".ToUpper(), -1)
@@ -5170,13 +5174,15 @@ Public Class ClsPaginas
Dim sw As New System.Diagnostics.Stopwatch()
sw.Start()
Dim Bytes As Byte() = Nothing
+
+ Dim bdir As String = ModExtensiones.DirectorioBaseEmpresas
+ RutaReporte.Replace("/", "\")
+ If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
+ RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
+ End If
+
If EsProduccion Then
- Dim bdir As String = AppDomain.CurrentDomain.BaseDirectory
- RutaReporte.Replace("/", "\")
- If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
- RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
- End If
Dim CveUsuario As Integer = 0
Dim CveEmpresa As Integer = 0
If Context.Session("UsuarioSIG") IsNot Nothing Then
@@ -5568,7 +5574,7 @@ Public Class ClsPaginas
Dim retorno As Byte() = Nothing
'DATOS GENERALES
- Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
+ Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\"
Dim PathXML As String = $"{Ruta}XML\{Vta.TipoDocto}\{Vta.SerieFolio}.xml"
Dim NombreArchivo As String = ""
Dim NombreArchivoDescarga As String = ""
@@ -6081,7 +6087,7 @@ Public Class ClsPaginas
' Dim ObjVentas As New ClsVentas
'DATOS GENERALES
- Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
+ Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\"
Dim PathXML As String = $"{Ruta}XML\{Vta.TipoDocto}\{Vta.SerieFolio}.xml"
Dim NombreArchivo As String = ""
Dim NombreArchivoDescarga As String = ""
@@ -7433,7 +7439,7 @@ Public Class ClsPaginas
Dim DTPercepciones As Data.DataTable
Dim DTDeducciones As Data.DataTable
- Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{CveEmpresa}\"
+ Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}\"
Dim PathXML As String = $"{Ruta}XML\Nomina\{ObjNomina.SerieFolio}.xml"
Dim FechaEmision, FechaCertificacion As DateTime
Dim FolioFiscal, NoSerieCertificado, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT As String
@@ -7738,7 +7744,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
'DATOS GENERALES
- Dim Ruta As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\"
+ Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\"
Dim PathXML As String = $"{Ruta}XML\Pag\{Serie}-{Folio}.xml"
Dim PathPDF As String = $"{Ruta}PDF\Pag\{Serie}-{Folio}.pdf"
SerieFolio = $"{Serie}-{Folio}"
diff --git a/App_Code/ClsSCTLicencias.vb b/App_Code/ClsSCTLicencias.vb
index 943f606b1..bdf704c01 100644
--- a/App_Code/ClsSCTLicencias.vb
+++ b/App_Code/ClsSCTLicencias.vb
@@ -676,7 +676,7 @@ End Class
' dtMenu.TableName = "ModulosUsuarios"
' Try
-' dtMenu.WriteXml(AppDomain.CurrentDomain.BaseDirectory & "\Menu\" & _Usuario & ".xml", XmlWriteMode.WriteSchema)
+' dtMenu.WriteXml(ModExtensiones.DirectorioBaseEmpresas & "\Menu\" & _Usuario & ".xml", XmlWriteMode.WriteSchema)
' Retorno = True
' Catch ex As Exception
' OnError("Ocurrió un error al generar el menú del usuario.", ex)
diff --git a/App_Code/ClsSisEmpresas.vb b/App_Code/ClsSisEmpresas.vb
index 19ac5cf29..8c83cfb7a 100644
--- a/App_Code/ClsSisEmpresas.vb
+++ b/App_Code/ClsSisEmpresas.vb
@@ -445,7 +445,7 @@ Public Class ClsSisEmpresas
_Empresa.Buzon_Tipo = Data.Rows(0)("Buzon_Tipo").ToString
_Empresa.ContaContabilizacionNC = Data.Rows(0)("Conta_ContabilizacionNC").ToString.ToEntero
- _Empresa.Ruta = String.Format("{0}Empresas\{1}\", AppDomain.CurrentDomain.BaseDirectory, _Empresa.CveEmpresa)
+ '_Empresa.Ruta = String.Format("{0}Empresas\{1}\", ModExtensiones.DirectorioBaseEmpresas, _Empresa.CveEmpresa)
_Empresa.PV_TerminalTipo = Data.Rows(0)("PV_TerminalTipo").ToString.ToEntero
_Empresa.EjercicioActual = Data.Rows(0)("EjercicioActual").ToString.ToEntero
_Empresa.PeriodoActual = Data.Rows(0)("PeriodoActual").ToString.ToEntero
diff --git a/App_Code/ClsSisNotificaciones.vb b/App_Code/ClsSisNotificaciones.vb
index bbe272683..c914aa79e 100644
--- a/App_Code/ClsSisNotificaciones.vb
+++ b/App_Code/ClsSisNotificaciones.vb
@@ -320,7 +320,7 @@ Public Class ClsSisNotificaciones
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
Dim ObjGPS As New ClsGPS
Try
- RutaReporte = $"{AppDomain.CurrentDomain.BaseDirectory}/Empresas/Grales/ReportesProgramados/RPTUltimaPosicion.rdlc"
+ RutaReporte = $"{ModExtensiones.DirectorioBaseEmpresas}/Empresas/Grales/ReportesProgramados/RPTUltimaPosicion.rdlc"
Dim Direcciones As JArray = Nothing
If Formato = "Excel" Then
Dim Dispositivos As New StringBuilder
@@ -369,7 +369,7 @@ Public Class ClsSisNotificaciones
Dim ObjGPS As New ClsGPS
Try
- RutaReporte = $"{AppDomain.CurrentDomain.BaseDirectory}/Empresas/Grales/ReportesProgramados/RPTHistorico.rpt"
+ RutaReporte = $"{ModExtensiones.DirectorioBaseEmpresas}/Empresas/Grales/ReportesProgramados/RPTHistorico.rpt"
Dim ObjMail As New ClsSisMail()
Dim ResultadoMail As Integer = 0
Dim Archivos As New List(Of ClsSisMail.ArchivoMail)
@@ -429,7 +429,7 @@ Public Class ClsSisNotificaciones
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
Dim ObjGPS As New ClsGPS
Try
- RutaReporte = $"{AppDomain.CurrentDomain.BaseDirectory}/Empresas/Grales/ReportesProgramados/RPTiempoMuerto.rpt"
+ RutaReporte = $"{ModExtensiones.DirectorioBaseEmpresas}/Empresas/Grales/ReportesProgramados/RPTiempoMuerto.rpt"
Dim DataSource As DataSet = Nothing
Dim Direcciones As JArray = Nothing
If Formato = "Excel" Then
@@ -478,7 +478,7 @@ Public Class ClsSisNotificaciones
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
Dim ObjGPS As New ClsGPS
Try
- RutaReporte = $"{AppDomain.CurrentDomain.BaseDirectory}/Empresas/Grales/ReportesProgramados/RPTEventos.rpt"
+ RutaReporte = $"{ModExtensiones.DirectorioBaseEmpresas}/Empresas/Grales/ReportesProgramados/RPTEventos.rpt"
Dim Direcciones As JArray = Nothing
Dim Dispositivos As New StringBuilder
For Each Row As DataRow In DtDispositivos.Rows
@@ -520,7 +520,7 @@ Public Class ClsSisNotificaciones
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
Dim ObjGPS As New ClsGPS
Try
- RutaReporte = $"{AppDomain.CurrentDomain.BaseDirectory}/Empresas/Grales/ReportesProgramados/RPTRalenti.rdlc"
+ RutaReporte = $"{ModExtensiones.DirectorioBaseEmpresas}/Empresas/Grales/ReportesProgramados/RPTRalenti.rdlc"
Dim Direcciones As JArray = Nothing
If Formato = "Excel" Then
Dim Dispositivos As New StringBuilder
@@ -565,7 +565,7 @@ Public Class ClsSisNotificaciones
End Try
ObjGPS.Dispose()
Case 6 'Geocercas
- RutaReporte = $"{AppDomain.CurrentDomain.BaseDirectory}/Empresas/Grales/ReportesProgramados/RPGeocercas.rdlc"
+ RutaReporte = $"{ModExtensiones.DirectorioBaseEmpresas}/Empresas/Grales/ReportesProgramados/RPGeocercas.rdlc"
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
Dim ObjGPS As New ClsGPS
Try
@@ -604,7 +604,7 @@ Public Class ClsSisNotificaciones
End Try
ObjGPS.Dispose()
Case 7 'Puntos de Interes
- RutaReporte = $"{AppDomain.CurrentDomain.BaseDirectory}/Empresas/Grales/ReportesProgramados/RPPuntosDeInteres.rdlc"
+ RutaReporte = $"{ModExtensiones.DirectorioBaseEmpresas}/Empresas/Grales/ReportesProgramados/RPPuntosDeInteres.rdlc"
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
Dim ObjGPS As New ClsGPS
Try
diff --git a/App_Code/Empresa.vb b/App_Code/Empresa.vb
index 2492f959c..d2fef276f 100644
--- a/App_Code/Empresa.vb
+++ b/App_Code/Empresa.vb
@@ -101,7 +101,11 @@ Public Class Empresa
Public Property Soporte_PWD As String
Public Property Soporte_Tipo As String
Public Property Timbres As Integer
- Public Property Ruta As String
+ Public ReadOnly Property Ruta As String
+ Get
+ Return String.Format("{0}\{1}\", Extensiones.ModExtensiones.DirectorioEmpresas, Me.CveEmpresa)
+ End Get
+ End Property
Public Property IdCuentaIVAxTrasladar As Integer
Public Property IdCuentaIVATrasladado As Integer
Public Property IdCuentaPerdidaCambiaria As Integer
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index c0867da74..4fafd698a 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -328,7 +328,7 @@ Namespace Modelos
End If
SetMetodoPago(ObjsClsPaginas)
Timbre = New CFDITimbre
- DirectorioServidor = ObjsClsPaginas.Server.MapPath("/")
+ DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
End Sub
Public Sub New(ObjsClsPaginas As ClsPaginas, CveVenta As Integer, CveEmpresa As Integer)
@@ -342,7 +342,7 @@ Namespace Modelos
End If
End If
ObjVentas.Dispose()
- DirectorioServidor = ObjsClsPaginas.Server.MapPath("/")
+ DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
End Sub
Public Sub New(ObjsClsPaginas As ClsPaginas, UsuarioActual As Usuario, Optional Row As Data.DataRow = Nothing)
Me.UsuarioActual = UsuarioActual
@@ -359,7 +359,7 @@ Namespace Modelos
SetSubProyecto(ObjsClsPaginas)
SetSubProyectoMatriz(ObjsClsPaginas)
Timbre = New CFDITimbre
- DirectorioServidor = ObjsClsPaginas.Server.MapPath("/")
+ DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
End Sub
Public Sub New(UsuarioActual As Usuario, Optional Row As Data.DataRow = Nothing)
Me.UsuarioActual = UsuarioActual
@@ -400,7 +400,7 @@ Namespace Modelos
ObjVentas.Dispose()
IniciaValoresVentas(EsCancelacion)
If String.IsNullOrEmpty(DirectorioServidor) Then
- DirectorioServidor = HttpContext.Current.Server.MapPath("/")
+ DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
End If
Me.DirectorioServidor = DirectorioServidor
Timbre = New CFDITimbre
@@ -878,9 +878,9 @@ Namespace Modelos
Try
If Not String.IsNullOrEmpty(DirectorioServidor) Then
- Dim DirectoriArchivoXML As String = System.IO.Path.Combine(DirectorioServidor, "Empresas", UsuarioActual.CveEmpresa.ToString, Me.TipoDocto)
- If Not Directory.Exists(DirectoriArchivoXML) Then
- Directory.CreateDirectory(DirectoriArchivoXML)
+ Dim DirectorioArchivoXML As String = System.IO.Path.Combine(UsuarioActual.Empresa.Ruta, "XML", Me.TipoDocto)
+ If Not Directory.Exists(DirectorioArchivoXML) Then
+ Directory.CreateDirectory(DirectorioArchivoXML)
End If
End If
@@ -4537,6 +4537,13 @@ Namespace Modelos
End If
End If
+
+ 'REALIZA LA DEVOLUCION AL ALMACEN VIRTUAL
+ If Not GeneraMovimientosVirtuales(CveVenta, CveMovimientoDevolucion, RowMovimiento("CveMovimiento").ToString().ToEntero(), ObjInventario) Then
+ ErrorCancelar = True
+ MensajeError = "Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar."
+ End If
+
'AGREGA BITACORA A VENTA
If Not ErrorCancelar AndAlso RealizarDevolucionAlmacen AndAlso CveMovimientoDevolucion > 0 Then
Dim MensajeBitacora = "Devuelta"
@@ -4580,12 +4587,6 @@ Namespace Modelos
Next
End If
- 'REALIZA LA DEVOLUCION AL ALMACEN VIRTUAL
- If Not GeneraMovimientosVirtuales(CveVenta, ObjInventario) Then
- ErrorCancelar = True
- MensajeError = "Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar."
- End If
-
'VERIFICAR MOVIMIENTOS DE APARTADOS
If Not ErrorCancelar Then
If Not GeneraMovimientosApartados(ObjInventario) Then
@@ -4809,41 +4810,36 @@ Namespace Modelos
Return Retorno
End Function
- Private Function GeneraMovimientosVirtuales(CveVenta As Integer, ByRef ObjInventario As ClsInventarios) As Boolean
+ Private Function GeneraMovimientosVirtuales(CveVenta As Integer, CveMovimiento As Integer, CveMovimientoRelacionado As Integer, ByRef ObjInventario As ClsInventarios) As Boolean
Dim ErrorCancelar As Boolean = False
Try
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
- Dim CveMovimientoSalida As Integer = -1
- Dim CveAlmacenVirutal As Integer = -1
+ Dim CveMovimientoVirtual As Integer = -1
+ Dim ValidaVirtual = True
+ Dim DtPSVirtual As New DataTable("DtTamanios")
- Dim DtMovtosDev As DataTable = Nothing
-
- If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
- Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND CveTipoAlmacen = 24 AND CveConcepto = 3 AND CveVenta > 0")
- CveMovimientoSalida = RowMovimiento("CveMovimiento").ToString().ToEntero()
- CveAlmacenVirutal = RowMovimiento("CveAlmacen").ToString().ToEntero()
- Else
- ErrorCancelar = True
+ If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveMovimientoRelacionado:=CveMovimientoRelacionado) Then
+ DtPSVirtual = ObjInventario.DtResultados
End If
- If CveMovimientoSalida > 0 Then
- 'CARGA CONCEPTOS DEVUELTOS EN LA VENTA
- If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
- DtMovtosDev = ObjInventario.DtResultados.Copy()
- Else
- ErrorCancelar = True
- End If
+ Dim CveConceptoMovimientoVirtual As Integer = 36
+ Dim CveAlmacenVirtual As Integer = -1
+ Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimiento
- If DtMovtosDev IsNot Nothing AndAlso DtMovtosDev.Rows.Count > 0 Then
- Dim CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenVirutal, 18, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalida)
+ CveAlmacenVirtual = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
- For Each RowUsado As DataRow In DtMovtosDev.Rows
+ If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then
+ CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1,
+ Observaciones:="", Guia:="", CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="Modelos/CancelarVirtual")
+
+ If CveMovimientoVirtual > 0 Then
+ For Each RowUsado As DataRow In DtPSVirtual.Rows
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
- Dim PU As Decimal = RowUsado("PU").ToString().ToDecimal()
+ Dim PU As Decimal = RowUsado("PUOriginal").ToString().ToDecimal()
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1) Then
ErrorCancelar = True
Exit For
End If
@@ -4851,7 +4847,14 @@ Namespace Modelos
Else
ErrorCancelar = True
End If
+ Else
+ If ValidaVirtual Then
+ ErrorCancelar = True
+ End If
+ End If
+ If DtPSVirtual.Rows.Count = 0 AndAlso ValidaVirtual = True Then
+ ErrorCancelar = True
End If
End If
Catch ex As Exception
@@ -4861,6 +4864,7 @@ Namespace Modelos
Return Not ErrorCancelar
End Function
+
Private Function GeneraMovimientosEntregaPorAdelantadoRemision(CveMovimiento As Integer, ByRef ObjVentas As ClsVentas, ByRef ObjInventario As ClsInventarios, ByRef DtDevRem As DataTable, ByRef ListaRemisionesCancelar As List(Of Integer)) As Boolean
Dim ErrorCancelar As Boolean = False
diff --git a/App_Code/WS/WSApiController.vb b/App_Code/WS/WSApiController.vb
index 720bea720..f01545bfb 100644
--- a/App_Code/WS/WSApiController.vb
+++ b/App_Code/WS/WSApiController.vb
@@ -18,7 +18,7 @@ Public Class WSApiController
Public ReadOnly Property RutaEmpresa As String
Get
- Return String.Format("{0}Empresas\{1}\", AppDomain.CurrentDomain.BaseDirectory, Decripta(Request.Headers.Authorization.Parameter).Split("|"c)(4))
+ Return String.Format("{0}Empresas\{1}\", ModExtensiones.DirectorioBaseEmpresas, Decripta(Request.Headers.Authorization.Parameter).Split("|"c)(4))
End Get
End Property
'
diff --git a/App_Code/WS/WSUSer.vb b/App_Code/WS/WSUSer.vb
index d2bf5a24d..cc02c4fab 100644
--- a/App_Code/WS/WSUSer.vb
+++ b/App_Code/WS/WSUSer.vb
@@ -108,7 +108,7 @@ Namespace SIG
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then
'verifico si existe la carpeta de la empresa, sino la crea
For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows
- Dim Ruta As String = String.Format("{0}Empresas\{1}", AppDomain.CurrentDomain.BaseDirectory, dr("CveEmpresa"))
+ Dim Ruta As String = String.Format("{0}Empresas\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa"))
If Not IO.Directory.Exists(Ruta) Then IO.Directory.CreateDirectory(Ruta)
If Not System.IO.Directory.Exists(String.Format("{0}\XML\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\XML\", Ruta))
If Not System.IO.Directory.Exists(String.Format("{0}\PDF\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\PDF\", Ruta))
diff --git a/App_Code/WS_PuntoVenta.vb b/App_Code/WS_PuntoVenta.vb
index 2f1c60dac..f35cfea94 100644
--- a/App_Code/WS_PuntoVenta.vb
+++ b/App_Code/WS_PuntoVenta.vb
@@ -1467,7 +1467,7 @@ Public Class WS_PuntoVenta
Dim ObjEmpresa As New ClsSisEmpresas()
If ObjEmpresa.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then
Empresa = ObjEmpresa.Empresa
- Empresa.Ruta = String.Format("{0}Empresas\{1}\", AppDomain.CurrentDomain.BaseDirectory, CveEmpresa)
+ 'Empresa.Ruta = String.Format("{0}Empresas\{1}\", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa)
End If
ObjEmpresa.Dispose()
diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb
index ed22628cc..f06c81603 100644
--- a/App_Code/modExtensiones.vb
+++ b/App_Code/modExtensiones.vb
@@ -32,7 +32,19 @@ Imports System.Net
Namespace Extensiones
#Region "E X T E N S I O N E S"
- Public Module ModExtensiones
+ Public Module ModExtensiones
+
+ 'Public Const DirectorioBaseEmpresas As String = "C:\inetpub\"
+ Public ReadOnly Property DirectorioBaseEmpresas As String
+ Get
+ If IsNothing(System.Configuration.ConfigurationManager.AppSettings("DirectorioBaseEmpresas")) Then
+ Return AppDomain.CurrentDomain.BaseDirectory
+ Else
+ Return System.Configuration.ConfigurationManager.AppSettings("DirectorioBaseEmpresas").ToString()
+ End If
+ End Get
+ End Property
+ Public ReadOnly DirectorioEmpresas As String = String.Format("{0}Empresas\", DirectorioBaseEmpresas)
Public Const IMEI As String = "IMEISISTEMAGERENCIAL"
Public Const MinFecha As Date = #1/1/1900#
@@ -128,7 +140,7 @@ Namespace Extensiones
Dim MensajeFormato = $"{Chr(13)}{Chr(10)}Log: {Mensaje} | Fecha:{Now.ToString("dd/MM/yyyy HH:mm")}"
Try
- ArchivoW = New StreamWriter($"{AppDomain.CurrentDomain.BaseDirectory}\Log\{Archivo}.txt", True, System.Text.Encoding.UTF8)
+ ArchivoW = New StreamWriter($"{ModExtensiones.DirectorioBaseEmpresas}\Log\{Archivo}.txt", True, System.Text.Encoding.UTF8)
Catch ex As UnauthorizedAccessException
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
Exit Sub
@@ -173,7 +185,7 @@ Namespace Extensiones
Dim strLineaTMP As String
strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto)
Try
- ArchivoW = New StreamWriter(String.Format("{0}\LogMail.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
+ ArchivoW = New StreamWriter(String.Format("{0}\LogMail.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8)
Catch ex As Exception
Exit Sub
End Try
@@ -193,7 +205,7 @@ Namespace Extensiones
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10)
strLineaTMP = String.Format("{0}{1} .. PAC: {2} - Modulo: {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Modulo, Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString)
Try
- ArchivoW = New StreamWriter(String.Format("{0}\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
+ ArchivoW = New StreamWriter(String.Format("{0}\LogTimbrado.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
@@ -216,7 +228,7 @@ Namespace Extensiones
strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto)
Try
- ArchivoW = New StreamWriter(String.Format("{0}\LogCancelacionSAT.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
+ ArchivoW = New StreamWriter(String.Format("{0}\LogCancelacionSAT.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8)
Catch ex As Exception
Exit Sub
End Try
@@ -227,11 +239,11 @@ Namespace Extensiones
End Try
ArchivoW.Close()
ArchivoW.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "Alertas y notificaciones"
-
+
Public Enum TipoMensaje As Integer
MsgError = 1
MsgInformacion = 2
@@ -317,7 +329,7 @@ Namespace Extensiones
script = String.Format("alertatoast({3},'{0}',function(){{{1}}},{2});", Mensaje, JSBtnAceptar, TimeoutToast, DirectCast(pOpcion, Integer))
End If
- ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), String.Format("Alert{0}", (DateTime.Now.Ticks + 1).ToString()), Script, True)
+ ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), String.Format("Alert{0}", (DateTime.Now.Ticks + 1).ToString()), script, True)
Pag = Nothing
Catch ex As Exception
Mensaje.GuardaLog(String.Format("Error Alert : {0}", Mensaje))
@@ -400,35 +412,35 @@ Namespace Extensiones
Dim Time As String = ""
If Fecha <> "" Then Time = String.Format("{0}", Fecha)
Return String.Format("
", Time, Tipo, Ico, Mensaje, Link)
- End Function
- '
- 'Public Function addindicador(Obj As Object, color As String, icono As String, titulo As String, comentario As String, link As String) As String
- ' Try
- ' Dim htmlobj = DirectCast(Obj, HtmlGenericControl)
- ' color = color.Replace("'", "\'")
- ' icono = icono.Replace("'", "\'")
- ' titulo = titulo.Replace("'", "\'")
- ' comentario = comentario.Replace("'", "\'")
- ' link = link.Replace("'", "\'")
- ' Dim script As String = " addindicadortext('" & color & "','" & icono & "','" & titulo & "','" & comentario & "','" & link & "',$('#" & htmlobj.ClientID.ToString & "')); "
- ' Return script
-
- ' Catch ex As Exception
- ' Return ""
- ' End Try
- 'End Function
-
- '
- 'Public Sub updateindicador(Obj As Object, script As String)
- ' Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
- ' ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), script, True)
- ' Pag = Nothing
- 'End Sub
-
+ End Function
+ '
+ 'Public Function addindicador(Obj As Object, color As String, icono As String, titulo As String, comentario As String, link As String) As String
+ ' Try
+ ' Dim htmlobj = DirectCast(Obj, HtmlGenericControl)
+ ' color = color.Replace("'", "\'")
+ ' icono = icono.Replace("'", "\'")
+ ' titulo = titulo.Replace("'", "\'")
+ ' comentario = comentario.Replace("'", "\'")
+ ' link = link.Replace("'", "\'")
+ ' Dim script As String = " addindicadortext('" & color & "','" & icono & "','" & titulo & "','" & comentario & "','" & link & "',$('#" & htmlobj.ClientID.ToString & "')); "
+ ' Return script
+
+ ' Catch ex As Exception
+ ' Return ""
+ ' End Try
+ 'End Function
+
+ '
+ 'Public Sub updateindicador(Obj As Object, script As String)
+ ' Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page)
+ ' ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), script, True)
+ ' Pag = Nothing
+ 'End Sub
+
#End Region
-
+
#Region "files dropzone"
-
+
Public Function getfiles(txt As TextBox) As Files
Dim retorno As New Files
@@ -458,7 +470,14 @@ Namespace Extensiones
Else
newName = String.Format("{0}{1}", newName, IO.Path.GetExtension(directorioOld.ToString()))
End If
- directorioNew.AppendFormat("{0}{1}\", AppDomain.CurrentDomain.BaseDirectory, newDirectorio)
+
+ 'SI VA A LA CARPETA DE EMPRESAS TIENE QUE TOMAR LA RUTA DE EMPRESAS
+ If newDirectorio.Contains("Empresas") Then
+ directorioNew.AppendFormat("{0}{1}\", ModExtensiones.DirectorioBaseEmpresas, newDirectorio)
+ Else
+ directorioNew.AppendFormat("{0}{1}\", AppDomain.CurrentDomain.BaseDirectory, newDirectorio)
+ End If
+
If Not Directory.Exists(directorioNew.ToString) Then
Directory.CreateDirectory(directorioNew.ToString)
End If
@@ -478,9 +497,9 @@ Namespace Extensiones
'Verifico que no exista el directory y que se halla creado, si se creo el directorio regresa true
Return Not Directory.Exists(NombreDirectorio) AndAlso Directory.CreateDirectory(NombreDirectorio) IsNot Nothing
- End Function
+ End Function
#End Region
-
+
#Region " obj to entero date, double, etc. formato numero"
Public Function ToEnterodb(Obj As SqlClient.SqlDataReader, key As String) As Integer
@@ -914,13 +933,13 @@ Namespace Extensiones
Public Function Abs(Valor As Decimal) As Decimal
Return Math.Abs(Valor)
- End Function
-
-
+ End Function
+
+
#End Region
-
+
#Region "DataTable operation"
- 'Dejar el parametro 'dt' en ByVal, para que no se autoasigne el valor, en el caso de filtrar lo GlobalDT(ByRef, pierde los valores y solo deja los filtrados)
+ 'Dejar el parametro 'dt' en ByVal, para que no se autoasigne el valor, en el caso de filtrar lo GlobalDT(ByRef, pierde los valores y solo deja los filtrados)
Public Function FiltraParametros(dt As DataTable, RowFilter As String, Optional Orderby As String = "", Optional DistinctColumns() As String = Nothing) As DataTable
Dim TmpDt As New DataTable
@@ -1351,12 +1370,12 @@ Namespace Extensiones
names.Add(column.ColumnName)
Next
Return names
- End Function
-
+ End Function
+
#End Region
-
+
#Region "gridview operations"
-
+
Public Function FCHyperLink(ByVal Row As GridViewRow, ByVal Control As String) As HyperLink
Return DirectCast(Row.FindControl(Control), HyperLink)
@@ -1475,9 +1494,9 @@ Namespace Extensiones
Public Function FCRangeValidator(ByVal Row As GridViewRow, ByVal Control As String) As RangeValidator
Return DirectCast(Row.FindControl(Control), RangeValidator)
- End Function
+ End Function
#End Region
-
+
#Region "Excel PDF"
Public Sub GeneraChequePDF(pCveIE As Integer, tEmpresa As Empresa, Optional IDPoliza As Integer = -1, Optional MuestraAlert As Boolean = True)
@@ -1540,7 +1559,7 @@ Namespace Extensiones
' If Not IO.File.Exists(String.Format("{0}Cheques\", Ruta)) Then IO.Directory.CreateDirectory(String.Format("{0}Cheques\", Ruta))
' If Not IO.File.Exists(Ruta & FormatoCheque) Then
- ' IO.File.Copy(String.Format("{0}Empresas\Grales\Cheque.xlsm", AppDomain.CurrentDomain.BaseDirectory), Ruta & FormatoCheque, False)
+ ' IO.File.Copy(String.Format("{0}Empresas\Grales\Cheque.xlsm", ModExtensiones.DirectorioBaseEmpresas), Ruta & FormatoCheque, False)
' End If
' Dim ArchivoBase As New System.IO.FileInfo(Ruta & FormatoCheque)
@@ -1770,7 +1789,7 @@ Namespace Extensiones
' If Not IO.File.Exists(String.Format("{0}Cheques\", Ruta)) Then IO.Directory.CreateDirectory(String.Format("{0}Cheques\", Ruta))
' If Not IO.File.Exists(String.Format("{0}{1}", Ruta, FormatoCheque)) Then
- ' IO.File.Copy(String.Format("{0}Empresas\Grales\Transferencia.xlsm", AppDomain.CurrentDomain.BaseDirectory), String.Format("{0}{1}", Ruta, FormatoCheque), False)
+ ' IO.File.Copy(String.Format("{0}Empresas\Grales\Transferencia.xlsm", ModExtensiones.DirectorioBaseEmpresas), String.Format("{0}{1}", Ruta, FormatoCheque), False)
' End If
' Dim ArchivoBase As New System.IO.FileInfo(String.Format("{0}{1}", Ruta, FormatoCheque))
@@ -1943,7 +1962,7 @@ Namespace Extensiones
RecursivoLimpiaControlesExcel(GridView.Controls)
style.Append(" ")
page.EnableEventValidation = False
@@ -1983,7 +2002,7 @@ Namespace Extensiones
Dim Form As HtmlForm = New HtmlForm()
style.Append(" ")
RecursivoLimpiaControlesExcel(GridView.Controls)
@@ -2191,7 +2210,7 @@ Namespace Extensiones
Dim style As StringBuilder = New StringBuilder()
style.Append(" ")
'To Export all pages
'Gv.AllowPaging = False
@@ -2353,164 +2372,164 @@ Namespace Extensiones
Gv.Controls(0).Controls.AddAt(0, row)
End If
- End Sub
- 'Public Function GeneraBytesOC(tCveOrdenCompra As Integer, Optional MR As ReportViewer = Nothing, Optional ConBitacora As Boolean = False) As Byte()
- ' Dim bytes As Byte() = Nothing
- ' Try
-
- ' Dim DtDetalle As DataTable = Nothing
- ' Dim ObjOC As New ClsOC
- ' If ObjOC.GetOC(tCveOrdenCompra, ObjClsPaginas.UsuarioActual.CveEmpresa) Then
- ' Dim dtOC As DataTable = ObjOC.DtResultados
- ' If ObjOC.GetOrdenesDetalle(ObjOC.CveOrdenCompra) Then 'Obtenemos el Detalle de la Oorden de Compra
- ' DtDetalle = ObjOC.DtResultados
- ' End If
-
- ' Dim CveUsuarioSol As Integer = dtOC(0)("CveUsuarioSolicito").ToString.ToEntero
- ' Dim CveUsuarioAut As Integer = dtOC(0)("CveUsuarioAutorizo").ToString.ToEntero
- ' Dim drSol As DataRow = ObjClsPaginas.GlobalDTUsuarios(CveUsuarioSol, ObjClsPaginas.UsuarioActual.CveEmpresa).FiltroPrimero("") 'DataRow (incluye el NOMBRE de quien SOLICITÓ la OC)
- ' Dim drAut As DataRow = ObjClsPaginas.GlobalDTUsuarios(CveUsuarioAut, ObjClsPaginas.UsuarioActual.CveEmpresa).FiltroPrimero("") 'DataRow (incluye el NOMBRE de quien AUTORIZÓ la OC)
-
- ' Dim CvePersonalSol, CvePersonalAut As Integer
-
- ' Dim PuestoSol As String = ""
- ' Dim PuestoAut As String = ""
-
- ' If drSol IsNot Nothing AndAlso drSol("CvePersonal").ToString.ToEntero > 0 Then CvePersonalSol = drSol("CvePersonal").ToString.ToEntero
- ' If drAut IsNot Nothing AndAlso drAut("CvePersonal").ToString.ToEntero > 0 Then CvePersonalAut = drAut("CvePersonal").ToString.ToEntero
-
- ' Dim ObjRH As New ClsRH()
- ' If ObjRH.GetPersonal(CvePersonalSol, ObjClsPaginas.UsuarioActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
- ' PuestoSol = ObjRH.DtResultados(0)("Puesto").ToString
- ' End If
- ' If ObjRH.GetPersonal(CvePersonalAut, ObjClsPaginas.UsuarioActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
- ' PuestoAut = ObjRH.DtResultados(0)("Puesto").ToString
- ' End If
- ' ObjRH.Dispose()
-
- ' Dim TipoCambio As String
- ' If ObjOC.CveMoneda = 1 Then
- ' TipoCambio = "1.00"
- ' Else
- ' TipoCambio = ObjClsPaginas.GlobalTipoCambio.ToString()
- ' End If
-
- ' Dim params As New List(Of ReportParameter)
-
- ' Dim nombreautorizo As String = dtOC(0)("UsuarioAutorizo").ToString
-
- ' 'If ObjClsPaginas.UsuarioActual.CveEmpresa = 48 Then
- ' ' nombreautorizo = "Lic. LUIS JORGE CONTRERAS LANDGRAVE"
- ' 'End If
-
- ' If ObjClsPaginas.UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12) Then
- ' params.Add(New ReportParameter("ReferenciaBancaria", dtOC(0)("BancoCuenta").ToString))
- ' params.Add(New ReportParameter("ReferenciaBanco", dtOC(0)("BancoNombre").ToString))
- ' params.Add(New ReportParameter("Justificacion", dtOC(0)("Justificacion").ToString))
- ' params.Add(New ReportParameter("TipoTermino", ObjOC.TipoTermino.ToString))
- ' params.Add(New ReportParameter("Proyecto", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("SubProyecto").ToString, "")))
- ' params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2)))
- ' params.Add(New ReportParameter("SubTotal", DtDetalle.SUM("Total").ToString))
- ' Else
- ' params.Add(New ReportParameter("Proyecto", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
- ' params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString))
- ' End If
- ' params.Add(New ReportParameter("CentroCostos", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
- ' params.Add(New ReportParameter("FechaSolicitud", ObjOC.Fecha.ToShortDateString))
- ' params.Add(New ReportParameter("Folio", ObjOC.Folio.ToString))
- ' params.Add(New ReportParameter("ProveedorNombre", ObjOC.RazonSocial))
- ' params.Add(New ReportParameter("ProveedorDireccion", ObjOC.Direccion))
- ' params.Add(New ReportParameter("ProveedorLugar", ObjOC.LugarEntrega))
- ' params.Add(New ReportParameter("ProveedorTel", ObjOC.Telefono))
- ' params.Add(New ReportParameter("ProveedorRFC", ObjOC.RFC))
- ' params.Add(New ReportParameter("Asunto", ObjOC.Justificacion))
- ' params.Add(New ReportParameter("IVA", ObjOC.IVA.ToString))
- ' params.Add(New ReportParameter("RetIVA", ObjOC.RetIVA.ToString.FormatoNumero(2)))
- ' params.Add(New ReportParameter("RetISR", ObjOC.RetISR.ToString.FormatoNumero(2)))
- ' params.Add(New ReportParameter("Total", ObjOC.Total.ToString))
- ' params.Add(New ReportParameter("ImporteLetra", (ObjOC.Total).ToString.ToDouble.Texto2Letras(ObjOC.CveMoneda)))
- ' params.Add(New ReportParameter("CorreoControl", If(drAut IsNot Nothing, drAut("Correo").ToString, "")))
- ' params.Add(New ReportParameter("Moneda", ObjOC.Moneda))
- ' params.Add(New ReportParameter("TipoCambio", TipoCambio))
- ' params.Add(New ReportParameter("NombreSolicito", dtOC(0)("UsuarioSolicito").ToString)) 'drSol("Nombre").ToString))
- ' params.Add(New ReportParameter("PuestoSolicito", PuestoSol)) 'drPuestoSol("Puesto").ToString
- ' params.Add(New ReportParameter("NombreAutorizo", nombreautorizo))
- ' params.Add(New ReportParameter("PuestoAutorizo", PuestoAut)) 'drPuestoAut("Puesto").ToString
- ' params.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
- ' params.Add(New ReportParameter("Estatus", ObjOC.Estatus))
- ' params.Add(New ReportParameter("Descripcion", ObjOC.Descripcion))
- ' params.Add(New ReportParameter("FechaEstimadaEntrega", ObjOC.FechaEstimadaEntrega.ToShortDateString))
- ' 'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString))
- ' Dim FirmaSol As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", ObjClsPaginas.UsuarioActual.Empresa.Ruta, CveUsuarioSol))
- ' params.Add(New ReportParameter("FirmaSolicito", If(FirmaSol.Exists, New Uri(ObjClsPaginas.Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", ObjClsPaginas.UsuarioActual.CveEmpresa, CveUsuarioSol))).AbsoluteUri, "")))
- ' Dim FirmaAut As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", ObjClsPaginas.UsuarioActual.Empresa.Ruta, CveUsuarioAut))
- ' params.Add(New ReportParameter("FirmaAutorizo", If(FirmaAut.Exists, New Uri(ObjClsPaginas.Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", ObjClsPaginas.UsuarioActual.CveEmpresa, CveUsuarioAut))).AbsoluteUri, "")))
- ' Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", ObjClsPaginas.UsuarioActual.Empresa.Ruta))
- ' If Archivo.Exists Then
- ' bytes = ObjClsPaginas.StreamPDF(String.Format("{0}Formatos\OC.rdlc", ObjClsPaginas.UsuarioActual.Empresa.Ruta), DtDetalle, params, "OrdenCompra", RDSName:="DsOC", MR:=MR)
- ' Else
- ' params.Add(New ReportParameter("Empresa", ObjClsPaginas.UsuarioActual.Empresa.Empresa))
- ' bytes = ObjClsPaginas.StreamPDF("Empresas\Grales\Formatos\OC.rdlc", DtDetalle, params, "OrdenCompra", RDSName:="DsOC", MR:=MR)
- ' End If
- ' If ConBitacora Then
- ' Dim dttemp As New DataTable
- ' Dim ObjEventoBitacora As New ClsOIEventos()
- ' If ObjEventoBitacora.GetAgendaBitacora(ObjClsPaginas.UsuarioActual.CveUsuario, ObjClsPaginas.UsuarioActual.CveEmpresa, CveOC:=tCveOrdenCompra) Then
- ' dttemp = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento = 6 OR CveTipoEvento = 2")
- ' End If
- ' ObjEventoBitacora.Dispose()
- ' If Not IsNothing(dttemp) AndAlso dttemp.Rows.Count > 0 Then
-
- ' Dim paramsest As New List(Of ReportParameter)
- ' paramsest.Add(New ReportParameter("Empresa", ObjClsPaginas.UsuarioActual.Empresa.Empresa))
- ' paramsest.Add(New ReportParameter("Titulo", "Bitácora de órdenes de compra"))
- ' paramsest.Add(New ReportParameter("Folio", ObjOC.Folio.ToString))
- ' paramsest.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
- ' Dim bytes2 As Byte()
- ' bytes2 = ObjClsPaginas.StreamPDF("Empresas\Grales\Formatos\Bitacora.rdlc", dttemp, paramsest, "OrdenCompra", MR:=MR)
- ' Using ms As New MemoryStream()
- ' Using document As New iTextSharp.text.Document()
- ' Using copy As New PdfCopy(document, ms)
- ' document.Open()
-
- ' Dim reader As New PdfReader(bytes)
- ' ' loop over the pages in that document
- ' Dim n As Integer = reader.NumberOfPages
- ' Dim page As Integer = 0
- ' While page < n
- ' page = page + 1
- ' copy.AddPage(copy.GetImportedPage(reader, page))
- ' End While
-
-
- ' reader = New PdfReader(bytes2)
- ' ' loop over the pages in that document
- ' n = reader.NumberOfPages
- ' page = 0
- ' While page < n
- ' page = page + 1
- ' copy.AddPage(copy.GetImportedPage(reader, page))
- ' End While
-
- ' End Using
- ' End Using
- ' bytes = ms.ToArray()
- ' End Using
- ' End If
- ' dttemp.Dispose()
- ' End If
-
- ' End If
- ' ObjOC.Dispose()
-
- ' DtDetalle.Dispose()
-
- ' Catch ex As Exception
- ' GuardaLog(String.Format("Ocurrio un error al generar el strem de la oc={0}. {1}", tCveOrdenCompra, ex.Message))
- ' End Try
-
- ' Return bytes
- 'End Function
+ End Sub
+ 'Public Function GeneraBytesOC(tCveOrdenCompra As Integer, Optional MR As ReportViewer = Nothing, Optional ConBitacora As Boolean = False) As Byte()
+ ' Dim bytes As Byte() = Nothing
+ ' Try
+
+ ' Dim DtDetalle As DataTable = Nothing
+ ' Dim ObjOC As New ClsOC
+ ' If ObjOC.GetOC(tCveOrdenCompra, ObjClsPaginas.UsuarioActual.CveEmpresa) Then
+ ' Dim dtOC As DataTable = ObjOC.DtResultados
+ ' If ObjOC.GetOrdenesDetalle(ObjOC.CveOrdenCompra) Then 'Obtenemos el Detalle de la Oorden de Compra
+ ' DtDetalle = ObjOC.DtResultados
+ ' End If
+
+ ' Dim CveUsuarioSol As Integer = dtOC(0)("CveUsuarioSolicito").ToString.ToEntero
+ ' Dim CveUsuarioAut As Integer = dtOC(0)("CveUsuarioAutorizo").ToString.ToEntero
+ ' Dim drSol As DataRow = ObjClsPaginas.GlobalDTUsuarios(CveUsuarioSol, ObjClsPaginas.UsuarioActual.CveEmpresa).FiltroPrimero("") 'DataRow (incluye el NOMBRE de quien SOLICITÓ la OC)
+ ' Dim drAut As DataRow = ObjClsPaginas.GlobalDTUsuarios(CveUsuarioAut, ObjClsPaginas.UsuarioActual.CveEmpresa).FiltroPrimero("") 'DataRow (incluye el NOMBRE de quien AUTORIZÓ la OC)
+
+ ' Dim CvePersonalSol, CvePersonalAut As Integer
+
+ ' Dim PuestoSol As String = ""
+ ' Dim PuestoAut As String = ""
+
+ ' If drSol IsNot Nothing AndAlso drSol("CvePersonal").ToString.ToEntero > 0 Then CvePersonalSol = drSol("CvePersonal").ToString.ToEntero
+ ' If drAut IsNot Nothing AndAlso drAut("CvePersonal").ToString.ToEntero > 0 Then CvePersonalAut = drAut("CvePersonal").ToString.ToEntero
+
+ ' Dim ObjRH As New ClsRH()
+ ' If ObjRH.GetPersonal(CvePersonalSol, ObjClsPaginas.UsuarioActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
+ ' PuestoSol = ObjRH.DtResultados(0)("Puesto").ToString
+ ' End If
+ ' If ObjRH.GetPersonal(CvePersonalAut, ObjClsPaginas.UsuarioActual.CveEmpresa) AndAlso ObjRH.DtResultados.Rows.Count > 0 Then
+ ' PuestoAut = ObjRH.DtResultados(0)("Puesto").ToString
+ ' End If
+ ' ObjRH.Dispose()
+
+ ' Dim TipoCambio As String
+ ' If ObjOC.CveMoneda = 1 Then
+ ' TipoCambio = "1.00"
+ ' Else
+ ' TipoCambio = ObjClsPaginas.GlobalTipoCambio.ToString()
+ ' End If
+
+ ' Dim params As New List(Of ReportParameter)
+
+ ' Dim nombreautorizo As String = dtOC(0)("UsuarioAutorizo").ToString
+
+ ' 'If ObjClsPaginas.UsuarioActual.CveEmpresa = 48 Then
+ ' ' nombreautorizo = "Lic. LUIS JORGE CONTRERAS LANDGRAVE"
+ ' 'End If
+
+ ' If ObjClsPaginas.UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12) Then
+ ' params.Add(New ReportParameter("ReferenciaBancaria", dtOC(0)("BancoCuenta").ToString))
+ ' params.Add(New ReportParameter("ReferenciaBanco", dtOC(0)("BancoNombre").ToString))
+ ' params.Add(New ReportParameter("Justificacion", dtOC(0)("Justificacion").ToString))
+ ' params.Add(New ReportParameter("TipoTermino", ObjOC.TipoTermino.ToString))
+ ' params.Add(New ReportParameter("Proyecto", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("SubProyecto").ToString, "")))
+ ' params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2)))
+ ' params.Add(New ReportParameter("SubTotal", DtDetalle.SUM("Total").ToString))
+ ' Else
+ ' params.Add(New ReportParameter("Proyecto", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
+ ' params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString))
+ ' End If
+ ' params.Add(New ReportParameter("CentroCostos", If(DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0, DtDetalle.MAX("Proyecto").ToString, "")))
+ ' params.Add(New ReportParameter("FechaSolicitud", ObjOC.Fecha.ToShortDateString))
+ ' params.Add(New ReportParameter("Folio", ObjOC.Folio.ToString))
+ ' params.Add(New ReportParameter("ProveedorNombre", ObjOC.RazonSocial))
+ ' params.Add(New ReportParameter("ProveedorDireccion", ObjOC.Direccion))
+ ' params.Add(New ReportParameter("ProveedorLugar", ObjOC.LugarEntrega))
+ ' params.Add(New ReportParameter("ProveedorTel", ObjOC.Telefono))
+ ' params.Add(New ReportParameter("ProveedorRFC", ObjOC.RFC))
+ ' params.Add(New ReportParameter("Asunto", ObjOC.Justificacion))
+ ' params.Add(New ReportParameter("IVA", ObjOC.IVA.ToString))
+ ' params.Add(New ReportParameter("RetIVA", ObjOC.RetIVA.ToString.FormatoNumero(2)))
+ ' params.Add(New ReportParameter("RetISR", ObjOC.RetISR.ToString.FormatoNumero(2)))
+ ' params.Add(New ReportParameter("Total", ObjOC.Total.ToString))
+ ' params.Add(New ReportParameter("ImporteLetra", (ObjOC.Total).ToString.ToDouble.Texto2Letras(ObjOC.CveMoneda)))
+ ' params.Add(New ReportParameter("CorreoControl", If(drAut IsNot Nothing, drAut("Correo").ToString, "")))
+ ' params.Add(New ReportParameter("Moneda", ObjOC.Moneda))
+ ' params.Add(New ReportParameter("TipoCambio", TipoCambio))
+ ' params.Add(New ReportParameter("NombreSolicito", dtOC(0)("UsuarioSolicito").ToString)) 'drSol("Nombre").ToString))
+ ' params.Add(New ReportParameter("PuestoSolicito", PuestoSol)) 'drPuestoSol("Puesto").ToString
+ ' params.Add(New ReportParameter("NombreAutorizo", nombreautorizo))
+ ' params.Add(New ReportParameter("PuestoAutorizo", PuestoAut)) 'drPuestoAut("Puesto").ToString
+ ' params.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
+ ' params.Add(New ReportParameter("Estatus", ObjOC.Estatus))
+ ' params.Add(New ReportParameter("Descripcion", ObjOC.Descripcion))
+ ' params.Add(New ReportParameter("FechaEstimadaEntrega", ObjOC.FechaEstimadaEntrega.ToShortDateString))
+ ' 'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString))
+ ' Dim FirmaSol As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", ObjClsPaginas.UsuarioActual.Empresa.Ruta, CveUsuarioSol))
+ ' params.Add(New ReportParameter("FirmaSolicito", If(FirmaSol.Exists, New Uri(ObjClsPaginas.Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", ObjClsPaginas.UsuarioActual.CveEmpresa, CveUsuarioSol))).AbsoluteUri, "")))
+ ' Dim FirmaAut As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", ObjClsPaginas.UsuarioActual.Empresa.Ruta, CveUsuarioAut))
+ ' params.Add(New ReportParameter("FirmaAutorizo", If(FirmaAut.Exists, New Uri(ObjClsPaginas.Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", ObjClsPaginas.UsuarioActual.CveEmpresa, CveUsuarioAut))).AbsoluteUri, "")))
+ ' Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\OC.rdlc", ObjClsPaginas.UsuarioActual.Empresa.Ruta))
+ ' If Archivo.Exists Then
+ ' bytes = ObjClsPaginas.StreamPDF(String.Format("{0}Formatos\OC.rdlc", ObjClsPaginas.UsuarioActual.Empresa.Ruta), DtDetalle, params, "OrdenCompra", RDSName:="DsOC", MR:=MR)
+ ' Else
+ ' params.Add(New ReportParameter("Empresa", ObjClsPaginas.UsuarioActual.Empresa.Empresa))
+ ' bytes = ObjClsPaginas.StreamPDF("Empresas\Grales\Formatos\OC.rdlc", DtDetalle, params, "OrdenCompra", RDSName:="DsOC", MR:=MR)
+ ' End If
+ ' If ConBitacora Then
+ ' Dim dttemp As New DataTable
+ ' Dim ObjEventoBitacora As New ClsOIEventos()
+ ' If ObjEventoBitacora.GetAgendaBitacora(ObjClsPaginas.UsuarioActual.CveUsuario, ObjClsPaginas.UsuarioActual.CveEmpresa, CveOC:=tCveOrdenCompra) Then
+ ' dttemp = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento = 6 OR CveTipoEvento = 2")
+ ' End If
+ ' ObjEventoBitacora.Dispose()
+ ' If Not IsNothing(dttemp) AndAlso dttemp.Rows.Count > 0 Then
+
+ ' Dim paramsest As New List(Of ReportParameter)
+ ' paramsest.Add(New ReportParameter("Empresa", ObjClsPaginas.UsuarioActual.Empresa.Empresa))
+ ' paramsest.Add(New ReportParameter("Titulo", "Bitácora de órdenes de compra"))
+ ' paramsest.Add(New ReportParameter("Folio", ObjOC.Folio.ToString))
+ ' paramsest.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
+ ' Dim bytes2 As Byte()
+ ' bytes2 = ObjClsPaginas.StreamPDF("Empresas\Grales\Formatos\Bitacora.rdlc", dttemp, paramsest, "OrdenCompra", MR:=MR)
+ ' Using ms As New MemoryStream()
+ ' Using document As New iTextSharp.text.Document()
+ ' Using copy As New PdfCopy(document, ms)
+ ' document.Open()
+
+ ' Dim reader As New PdfReader(bytes)
+ ' ' loop over the pages in that document
+ ' Dim n As Integer = reader.NumberOfPages
+ ' Dim page As Integer = 0
+ ' While page < n
+ ' page = page + 1
+ ' copy.AddPage(copy.GetImportedPage(reader, page))
+ ' End While
+
+
+ ' reader = New PdfReader(bytes2)
+ ' ' loop over the pages in that document
+ ' n = reader.NumberOfPages
+ ' page = 0
+ ' While page < n
+ ' page = page + 1
+ ' copy.AddPage(copy.GetImportedPage(reader, page))
+ ' End While
+
+ ' End Using
+ ' End Using
+ ' bytes = ms.ToArray()
+ ' End Using
+ ' End If
+ ' dttemp.Dispose()
+ ' End If
+
+ ' End If
+ ' ObjOC.Dispose()
+
+ ' DtDetalle.Dispose()
+
+ ' Catch ex As Exception
+ ' GuardaLog(String.Format("Ocurrio un error al generar el strem de la oc={0}. {1}", tCveOrdenCompra, ex.Message))
+ ' End Try
+
+ ' Return bytes
+ 'End Function
#End Region
Public Function IsFileLocked(path As String, Optional access As FileAccess = FileAccess.Write) As Boolean
Try
@@ -2665,8 +2684,8 @@ Namespace Extensiones
Return Retorno
- End Function
-
+ End Function
+
#Region "Contabilidad"
Public Function ObtenerCuentaDobleConta(IdCtaContable As Integer, CveEmpresa As Integer) As Integer
Dim Retorno As Integer = -1
@@ -2678,9 +2697,9 @@ Namespace Extensiones
ObjContabilidad.Dispose()
Return Retorno
- End Function
+ End Function
#End Region
-
+
#Region "GPS"
Public Function InfoWindow(Header As String, ExtraBody As String, CveDispositivo As Integer, row As DataRow, Optional PermisoComandos As Boolean = True) As String
Dim SBuilder As New StringBuilder
@@ -2794,8 +2813,8 @@ Namespace Extensiones
End If
Next
Return Str.ToString
- End Function
-
+ End Function
+
#End Region
Private Function GeneraCadenaDinamica(Optional Longitud As Integer = 8) As String
@@ -2823,9 +2842,9 @@ Namespace Extensiones
Return Array.IndexOf(Valores, Valor) >= 0
- End Function
-
-
+ End Function
+
+
#Region "selected"
Public Sub SelectedValueExist(Obj As DropDownList, Valor As Object)
@@ -2931,7 +2950,7 @@ Namespace Extensiones
End If
Next
Return retorno.ToString()
- End Function
+ End Function
#End Region
Public Enum TipoContaReferencia As Integer
Compra = 1
@@ -3147,9 +3166,9 @@ Namespace Extensiones
Return fecha >= FechaI AndAlso fecha <= FechaF
End Function
- End Module
+ End Module
#End Region
-
+
#Region "C L A S E S"
Public Class Archivo
Public Sub New()
@@ -3163,7 +3182,7 @@ Namespace Extensiones
Public Property descripcion As String
Public ReadOnly Property Extencion As String
Get
- Return IO.Path.GetExtension(String.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, patch, filename)).Replace(".", "")
+ Return IO.Path.GetExtension(String.Format("{0}{1}{2}", ModExtensiones.DirectorioBaseEmpresas, patch, filename)).Replace(".", "")
End Get
End Property
Public ReadOnly Property filenameO As String
@@ -3173,7 +3192,7 @@ Namespace Extensiones
End Property
Public ReadOnly Property FileUrl As String
Get
- Return String.Format("{0}{1}{2}", AppDomain.CurrentDomain.BaseDirectory, patch, filename)
+ Return String.Format("{0}{1}{2}", ModExtensiones.DirectorioBaseEmpresas, patch, filename)
End Get
End Property
End Class
diff --git a/App_Code/wsSIG.vb b/App_Code/wsSIG.vb
index 98f382990..acad4e26f 100644
--- a/App_Code/wsSIG.vb
+++ b/App_Code/wsSIG.vb
@@ -291,7 +291,7 @@ Public Class wsSIG
Fecha = ArrCadena(6).ToString.ToDate
Fecha.ToShortDateString().GuardaLog()
If Fecha > Now.AddSeconds(TiempoValido) Then
- Dim Dir As String = String.Format("{0}Empresas\{1}\", AppDomain.CurrentDomain.BaseDirectory, pCveEmpresa)
+ Dim Dir As String = String.Format("{0}Empresas\{1}\", ModExtensiones.DirectorioBaseEmpresas, pCveEmpresa)
Dim Ruta As String = ""
Dim RutaDB3 As String = ""
Dim RutaThumb As String = ""
diff --git a/Ashx/GenerarPDFFactura.ashx b/Ashx/GenerarPDFFactura.ashx
index bf3b15b44..e4e126787 100644
--- a/Ashx/GenerarPDFFactura.ashx
+++ b/Ashx/GenerarPDFFactura.ashx
@@ -34,7 +34,7 @@ Public Class GenerarPDFFactura : Implements IHttpHandler
Dim ListaDS = New List(Of ReportDataSource)
Dim Parametros As New List(Of ReportParameter)
- Dim Formato = context.Server.MapPath("/") + "Empresas/1/Report.rdlc"
+ Dim Formato = context.ModExtensiones.DirectorioBaseEmpresas + "Empresas/1/Report.rdlc"
Parametros.Add(New ReportParameter("Empresa", datos.Empresa.Empresa))
Parametros.Add(New ReportParameter("RFC", datos.Empresa.RFC))
diff --git a/Ashx/SIGCRM.ashx b/Ashx/SIGCRM.ashx
index 71bcdeb87..dacdc1843 100644
--- a/Ashx/SIGCRM.ashx
+++ b/Ashx/SIGCRM.ashx
@@ -56,7 +56,7 @@ Public Class SIGCRM : Implements IHttpHandler, IRequiresSessionState
Dim Usuario As Usuario = UsuarioActual(context)
If Not IsNothing(Usuario) Then
- Dim Url = String.Format("{0}\Empresas\{1}\Acercamientos\{2}\Imagenes\{3}", AppDomain.CurrentDomain.BaseDirectory, Usuario.CveEmpresa, CveAcercamiento, Archivo)
+ Dim Url = String.Format("{0}\Empresas\{1}\Acercamientos\{2}\Imagenes\{3}", ModExtensiones.DirectorioBaseEmpresas, Usuario.CveEmpresa, CveAcercamiento, Archivo)
If File.Exists(Url) Then
context.Response.ContentType = String.Format("image/{0}", Extension)
diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx
index 8a81cd9fa..a98d3c130 100644
--- a/Ashx/SIGFacturacion.ashx
+++ b/Ashx/SIGFacturacion.ashx
@@ -60,7 +60,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Dim Usuario = ValidaUsuarioSistema(CveEmpresa)
Dim FechaI, FechaF As DateTime
- 'EnviarCorreoFactura(New Modelos.Factura(Usuario, 844966, 1, context.Server.MapPath("/")), Usuario)
+ 'EnviarCorreoFactura(New Modelos.Factura(Usuario, 844966, 1, context.ModExtensiones.DirectorioBaseEmpresas), Usuario)
If String.IsNullOrEmpty(pFechaI) AndAlso String.IsNullOrEmpty(pFechaF) Then
Dim FechaReferencia = Now
@@ -904,7 +904,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
' 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}\LogFacturacion.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
+ ArchivoW = New StreamWriter(String.Format("{0}\LogFacturacion.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
diff --git a/Ashx/SIGGPS.ashx b/Ashx/SIGGPS.ashx
index f257e947b..64678a627 100644
--- a/Ashx/SIGGPS.ashx
+++ b/Ashx/SIGGPS.ashx
@@ -1,13 +1,13 @@
-<%@ WebHandler Language="VB" Class="SIGGPS" %>
-'Option Explicit On
-'Option Strict On
-
+<%@ WebHandler Language="VB" Class="SIGGPS" %>
+'Option Explicit On
+'Option Strict On
+
Imports System
Imports System.Web
Imports System.Data
Imports Newtonsoft.Json.Linq
Imports Extensiones
-Imports System.IO
+Imports System.IO
Imports Microsoft.AspNet.SignalR
Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
@@ -17,10 +17,10 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
If context.Request("metodo") IsNot Nothing Then
Select Case context.Request("metodo")
Case "getimginstalacion"
- GetImgInstalacion(context)
- Case "EjecutarNotificaciones"
- EjecutarNotificaciones(context)
- Case "EjecutaTrayectos"
+ GetImgInstalacion(context)
+ Case "EjecutarNotificaciones"
+ EjecutarNotificaciones(context)
+ Case "EjecutaTrayectos"
EnviarCorreoTrayectos(context, context.Request("CveTrayecto").ToString().ToEntero())
End Select
ElseIf context.Request.InputStream IsNot Nothing Then
@@ -69,19 +69,19 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
Return URLParametros
End Function
- Private Sub EjecutarNotificaciones(ByVal context As HttpContext)
- Dim Retorno As String = "[]"
- 'Dim contextc = Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext(Of MyGPSHub)()
- 'SendNotificacionGPS(contextc, 5, 1727, "Encabezado", "Mensaje", 2, "{""timeOut"":15000, ""extendedTimeOut"":16000}", "142608__autistic-lucario__error.wav", 0, SQLToGmapsJArray("POINT (-99.211688 19.717715)", "POINT").ToString())
- Using ObjGPS As New ClsSisNotificaciones
- ObjGPS.ObtenerNotificaciones()
- End Using
- context.Response.Write(Retorno)
- End Sub
-
- Public Sub SendNotificacionGPS(context As Microsoft.AspNet.SignalR.IHubContext, CveNotificacionBitacora As Integer, CveUsuario As Integer, Encabezado As String, Mensaje As String, TipoNotificacion As Integer, Pie As String, Sonido As String, Persistencia As Boolean, Coords As String)
- context.Clients.All.addLatestNotification(Mensaje, CveUsuario, Encabezado, TipoNotificacion, Pie, Sonido, CveNotificacionBitacora, Persistencia, Coords)
- End Sub
+ Private Sub EjecutarNotificaciones(ByVal context As HttpContext)
+ Dim Retorno As String = "[]"
+ 'Dim contextc = Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext(Of MyGPSHub)()
+ 'SendNotificacionGPS(contextc, 5, 1727, "Encabezado", "Mensaje", 2, "{""timeOut"":15000, ""extendedTimeOut"":16000}", "142608__autistic-lucario__error.wav", 0, SQLToGmapsJArray("POINT (-99.211688 19.717715)", "POINT").ToString())
+ Using ObjGPS As New ClsSisNotificaciones
+ ObjGPS.ObtenerNotificaciones()
+ End Using
+ context.Response.Write(Retorno)
+ End Sub
+
+ Public Sub SendNotificacionGPS(context As Microsoft.AspNet.SignalR.IHubContext, CveNotificacionBitacora As Integer, CveUsuario As Integer, Encabezado As String, Mensaje As String, TipoNotificacion As Integer, Pie As String, Sonido As String, Persistencia As Boolean, Coords As String)
+ context.Clients.All.addLatestNotification(Mensaje, CveUsuario, Encabezado, TipoNotificacion, Pie, Sonido, CveNotificacionBitacora, Persistencia, Coords)
+ End Sub
Private Sub GetImgInstalacion(ByVal context As HttpContext)
Dim params As String = Decripta(context.Request("r").ToString)
Dim Parametros = Me.Parametros(params)
@@ -91,7 +91,7 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
Dim Usuario As Usuario = UsuarioActual(context)
If Not IsNothing(Usuario) Then
- Dim Url = String.Format("{0}\Empresas\{1}\Dispositivos\{2}\Imagenes\{3}", AppDomain.CurrentDomain.BaseDirectory, Usuario.CveEmpresa, CveDispositivo, Archivo)
+ Dim Url = String.Format("{0}\Empresas\{1}\Dispositivos\{2}\Imagenes\{3}", ModExtensiones.DirectorioBaseEmpresas, Usuario.CveEmpresa, CveDispositivo, Archivo)
If File.Exists(Url) Then
context.Response.ContentType = String.Format("image/{0}", Extension)
@@ -232,158 +232,158 @@ Public Class SIGGPS : Implements IHttpHandler, IRequiresSessionState
)
Return Json
- End Function
-
-#Region "N O T F I C A C I O N - T R A Y E C T O S"
- Private Sub EnviarCorreoTrayectos(ByVal context As HttpContext, CveTrayecto As Integer)
- Dim Retorno As JObject = New JObject(New JProperty("EnvioCorreo", False), New JProperty("Mensaje", ""))
- Try
- Dim DtInfoTrayecto As DataTable = Nothing
- Dim DtTrayecto As DataTable = Nothing
-
- Using ObjGPS As New ClsGPS
- If ObjGPS.GetTrayectos(CveTrayecto, -1, -1) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then
- DtTrayecto = ObjGPS.DtResultados.Copy()
- End If
-
- If ObjGPS.GetTrayectosDatos(CveTrayecto) Then
- DtInfoTrayecto = ObjGPS.DtSetResultados.Tables(0).Copy()
- End If
- End Using
-
- If DtTrayecto IsNot Nothing AndAlso DtInfoTrayecto IsNot Nothing AndAlso DtInfoTrayecto.Rows.Count > 0 Then
- Dim RowTrayecto As DataRow = DtTrayecto.Rows(0)
- Dim RowInfo As DataRow = DtInfoTrayecto.Rows(0)
-
- Dim EnviarLiga As Boolean = CBool(RowTrayecto("EnviarLiga").ToString())
-
- Dim Asunto As String = "Estatus de Trayecto"
- Dim Cuerpo As String = GeneraCorreo(CveTrayecto, EnviarLiga, RowInfo)
- Dim Correos As String = RowTrayecto("CorreosNotificacion").ToString()
-
- Dim ObjMail As New ClsSisMail
- If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, Asunto, Cuerpo) Then
- Retorno("EnvioCorreo") = True
- Retorno("Mensaje") = "El correo fue enviado correctamente"
- Else
- Retorno("EnvioCorreo") = False
- Retorno("Mensaje") = "Ocurrió un error al enviar el correo"
- End If
-
- End If
- Catch ex As Exception
- OnError("Ocurrió un error al enviar el correo", ex)
- End Try
-
- context.Response.Write(Retorno.ToString())
- End Sub
-
- Protected Function GeneraCorreo(CveTrayecto As Integer, EnviarLiga As Boolean, Row As DataRow) As String
- Dim strBody As New StringBuilder
- Try
- strBody.Append(" ")
- strBody.Append(" ")
- strBody.Append(" ")
- strBody.Append(" ")
- strBody.Append(" ")
- strBody.Append("
")
- strBody.Append(" ")
- strBody.Append("
")
- strBody.Append("
")
- strBody.Append("")
- strBody.Append("
")
- strBody.Append(" ")
- strBody.Append("
")
- strBody.Append("
")
- strBody.Append("")
- Catch ex As Exception
- OnError("Ocurrio un error al general el correo.", ex)
- End Try
- Return strBody.ToString()
- End Function
-#End Region
-
+ End Function
+
+#Region "N O T F I C A C I O N - T R A Y E C T O S"
+ Private Sub EnviarCorreoTrayectos(ByVal context As HttpContext, CveTrayecto As Integer)
+ Dim Retorno As JObject = New JObject(New JProperty("EnvioCorreo", False), New JProperty("Mensaje", ""))
+ Try
+ Dim DtInfoTrayecto As DataTable = Nothing
+ Dim DtTrayecto As DataTable = Nothing
+
+ Using ObjGPS As New ClsGPS
+ If ObjGPS.GetTrayectos(CveTrayecto, -1, -1) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then
+ DtTrayecto = ObjGPS.DtResultados.Copy()
+ End If
+
+ If ObjGPS.GetTrayectosDatos(CveTrayecto) Then
+ DtInfoTrayecto = ObjGPS.DtSetResultados.Tables(0).Copy()
+ End If
+ End Using
+
+ If DtTrayecto IsNot Nothing AndAlso DtInfoTrayecto IsNot Nothing AndAlso DtInfoTrayecto.Rows.Count > 0 Then
+ Dim RowTrayecto As DataRow = DtTrayecto.Rows(0)
+ Dim RowInfo As DataRow = DtInfoTrayecto.Rows(0)
+
+ Dim EnviarLiga As Boolean = CBool(RowTrayecto("EnviarLiga").ToString())
+
+ Dim Asunto As String = "Estatus de Trayecto"
+ Dim Cuerpo As String = GeneraCorreo(CveTrayecto, EnviarLiga, RowInfo)
+ Dim Correos As String = RowTrayecto("CorreosNotificacion").ToString()
+
+ Dim ObjMail As New ClsSisMail
+ If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, Asunto, Cuerpo) Then
+ Retorno("EnvioCorreo") = True
+ Retorno("Mensaje") = "El correo fue enviado correctamente"
+ Else
+ Retorno("EnvioCorreo") = False
+ Retorno("Mensaje") = "Ocurrió un error al enviar el correo"
+ End If
+
+ End If
+ Catch ex As Exception
+ OnError("Ocurrió un error al enviar el correo", ex)
+ End Try
+
+ context.Response.Write(Retorno.ToString())
+ End Sub
+
+ Protected Function GeneraCorreo(CveTrayecto As Integer, EnviarLiga As Boolean, Row As DataRow) As String
+ Dim strBody As New StringBuilder
+ Try
+ strBody.Append(" ")
+ strBody.Append(" ")
+ strBody.Append(" ")
+ strBody.Append(" ")
+ strBody.Append(" ")
+ strBody.Append("
")
+ strBody.Append(" ")
+ strBody.Append("
")
+ strBody.Append("
")
+ strBody.Append("")
+ strBody.Append("
")
+ strBody.Append(" ")
+ strBody.Append("
")
+ strBody.Append("
")
+ strBody.Append("")
+ Catch ex As Exception
+ OnError("Ocurrio un error al general el correo.", ex)
+ End Try
+ Return strBody.ToString()
+ End Function
+#End Region
+
End Class
\ No newline at end of file
diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx
index c4c0f3fcb..8ae61eb7e 100644
--- a/Ashx/SIGWeb.ashx
+++ b/Ashx/SIGWeb.ashx
@@ -106,7 +106,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Dim usuario As Usuario = UsuarioActual(context)
If Not IsNothing(usuario) Then
- Url = String.Format("{0}Empresas\{1}\{2}", AppDomain.CurrentDomain.BaseDirectory, usuario.CveEmpresa, Url)
+ Url = String.Format("{0}Empresas\{1}\{2}", ModExtensiones.DirectorioBaseEmpresas, usuario.CveEmpresa, Url)
Dim FileInfo As FileInfo = New FileInfo(Url)
If FileInfo.Exists Then
context.Response.ContentType = "image/png"
diff --git a/Bancos/CargarConciliacionesBancarias.aspx.vb b/Bancos/CargarConciliacionesBancarias.aspx.vb
index 27ab10ceb..662e7ca6c 100644
--- a/Bancos/CargarConciliacionesBancarias.aspx.vb
+++ b/Bancos/CargarConciliacionesBancarias.aspx.vb
@@ -77,7 +77,7 @@ Partial Class Bancos_CargarConciliacionesBancarias
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs)
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")
CargaExcel(Directorio, file.filename, Tipo)
Else
diff --git a/Bancos/CreditosPagoMultiple.aspx.vb b/Bancos/CreditosPagoMultiple.aspx.vb
index 70a1873b4..615b0c0b8 100644
--- a/Bancos/CreditosPagoMultiple.aspx.vb
+++ b/Bancos/CreditosPagoMultiple.aspx.vb
@@ -216,7 +216,7 @@ Partial Class Bancos_CreditosPagoMultiple
Dim filemove As String = ""
Dim Comprobante As String = ""
For Each fileItem As Archivo In filesgral
- Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
+ Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "")
filemove = fileItem.filename
Next
diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs
index bebd16b8c..da3d4ae99 100644
--- a/Bancos/Devoluciones.aspx.cs
+++ b/Bancos/Devoluciones.aspx.cs
@@ -510,7 +510,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
if (!archivo.Exists)
{
- archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", AppDomain.CurrentDomain.BaseDirectory));
+ archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", ModExtensiones.DirectorioBaseEmpresas));
}
}
else if (DdlTipoTransanccion.SelectedValue.ToEntero().Contiene(6) && UsuarioActual.CveEmpresa == 72)
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index 25548fcf6..c787fdd5c 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -2471,7 +2471,7 @@ Partial Class Bancos_IE
If CveIE > 0 Then
- If DdlTipoTransaccion.SelectedValue = "1" AndAlso usuarioactual.cveempresa <> 119 Then FolioFijo = ObjIE.Folio.ToEntero 'cheque
+ If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa <> 119 Then FolioFijo = ObjIE.Folio.ToEntero 'cheque
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE " + If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "") + " " + RBL.SelectedValue, CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
'valida prepoliza
@@ -2728,6 +2728,7 @@ Partial Class Bancos_IE
Dim TipoMovtoAplicar = False
For Each Dr As DataRow In ObjMov.DtResultados.FiltraParametros("CveConceptoContable IN (13,8,9,38)").Rows
+ Dim PorcentajeImpuesto As Decimal = Dr("PorcentajeImpuesto").ToString.ToDecimal()
CveConceptoContableAplciar = Dr("CveConceptoContable").ToString.ToEntero
TipoMovtoAplicar = Not CBool(Dr("TipoMovto").ToString)
ImporteAplicar = (Dr("Importe").ToString.ToDecimal * PorcentajePagoDevDin).RoundSQL()
@@ -2735,7 +2736,7 @@ Partial Class Bancos_IE
ImporteAplicarME = (Dr("ImporteME").ToString.ToDecimal * PorcentajePagoDevDin).RoundSQL()
IdCtaContableAplicar = Dr("IdCtaContable").ToString.ToEntero
- If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAplicar, ImporteAplicar, ReferenciaAplicar, CveConceptoContableAplciar, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME) Then
+ If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAplicar, ImporteAplicar, ReferenciaAplicar, CveConceptoContableAplciar, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, PorcentajeImpuesto:=PorcentajeImpuesto) Then
Select Case CveConceptoContableAplciar
Case 13
CveConceptoContableAplciar = 61
@@ -2747,7 +2748,7 @@ Partial Class Bancos_IE
CveConceptoContableAplciar = 39
End Select
TipoMovtoAplicar = Not TipoMovtoAplicar
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAplicar, ImporteAplicar, ReferenciaAplicar, CveConceptoContableAplciar, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME) Then
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAplicar, ImporteAplicar, ReferenciaAplicar, CveConceptoContableAplciar, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicarME, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
Exit Select
End If
@@ -3276,7 +3277,7 @@ Partial Class Bancos_IE
ElseIf DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1) Then
Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/CHQ-{1}.rdlc", UsuarioActual.Empresa.Ruta, DdlCuenta.SelectedValue.ToEntero))
If Not Archivo.Exists Then
- Archivo = New System.IO.FileInfo(String.Format("{0}\Empresas\Grales\Formatos\CHQ.rdlc", AppDomain.CurrentDomain.BaseDirectory))
+ Archivo = New System.IO.FileInfo(String.Format("{0}\Empresas\Grales\Formatos\CHQ.rdlc", ModExtensiones.DirectorioBaseEmpresas))
End If
ElseIf DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(6) And UsuarioActual.CveEmpresa = 72 Then
Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuenta.SelectedValue.ToEntero))
@@ -4442,8 +4443,8 @@ Partial Class Bancos_IE
#Region " CARGAR - COMPROBANTE "
Protected Sub BtnConfirmaComprobante_Click(sender As Object, e As EventArgs)
- Dim DirectorioGuardar = String.Format("{0}Empresas\{1}\IE", Request.PhysicalApplicationPath, UsuarioActual.CveEmpresa)
- Dim ArchivoTemporal = String.Format("{0}Empresas\{1}\Temp\{2}", Request.PhysicalApplicationPath, UsuarioActual.CveEmpresa, Session("FileUpload").ToString)
+ Dim DirectorioGuardar = String.Format("{0}Empresas\{1}\IE", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)
+ Dim ArchivoTemporal = String.Format("{0}Empresas\{1}\Temp\{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Session("FileUpload").ToString)
If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(ArchivoTemporal) Then
Dim Extension As String = Path.GetExtension(ArchivoTemporal)
diff --git a/Bancos/IE2.aspx.vb b/Bancos/IE2.aspx.vb
index fabb39aa6..dd2087068 100644
--- a/Bancos/IE2.aspx.vb
+++ b/Bancos/IE2.aspx.vb
@@ -1598,8 +1598,8 @@ Partial Class Bancos_IE
#Region " CARGAR - COMPROBANTE "
Protected Sub BtnConfirmaComprobante_Click(sender As Object, e As EventArgs)
- Dim DirectorioGuardar = String.Format("{0}Empresas\{1}\IE", Request.PhysicalApplicationPath, UsuarioActual.CveEmpresa)
- Dim ArchivoTemporal = String.Format("{0}Empresas\{1}\Temp\{2}", Request.PhysicalApplicationPath, UsuarioActual.CveEmpresa, Session("FileUpload").ToString)
+ Dim DirectorioGuardar = String.Format("{0}Empresas\{1}\IE", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)
+ Dim ArchivoTemporal = String.Format("{0}Empresas\{1}\Temp\{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Session("FileUpload").ToString)
If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(ArchivoTemporal) Then
Dim Extension As String = Path.GetExtension(ArchivoTemporal)
diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs
index 535b52b64..34d0a9b14 100644
--- a/Bancos/PagoAcreedor.aspx.cs
+++ b/Bancos/PagoAcreedor.aspx.cs
@@ -571,7 +571,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (!archivo.Exists)
{
- archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", AppDomain.CurrentDomain.BaseDirectory));
+ archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", ModExtensiones.DirectorioBaseEmpresas));
}
}
else if (DdlTipoTransaccion.SelectedValue.ToEntero().Contiene(6) && UsuarioActual.CveEmpresa == 72)
@@ -845,7 +845,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (!archivo.Exists)
{
- archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", AppDomain.CurrentDomain.BaseDirectory));
+ archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", ModExtensiones.DirectorioBaseEmpresas));
}
}
else if (DdlTipoTransanccionPrestamo.SelectedValue.ToEntero().Contiene(6) && UsuarioActual.CveEmpresa == 72)
diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs
index 0a066a52f..6e56741cc 100644
--- a/Bancos/PagoDeudor.aspx.cs
+++ b/Bancos/PagoDeudor.aspx.cs
@@ -506,7 +506,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
if (!archivo.Exists)
{
- archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", AppDomain.CurrentDomain.BaseDirectory));
+ archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", ModExtensiones.DirectorioBaseEmpresas));
}
}
else if (DdlTipoTransaccionPrestamo.SelectedValue.ToEntero().Contiene(6) && UsuarioActual.CveEmpresa == 72)
@@ -908,7 +908,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
if (!archivo.Exists)
{
- archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", AppDomain.CurrentDomain.BaseDirectory));
+ archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", ModExtensiones.DirectorioBaseEmpresas));
}
}
else if (DdlTipoTransaccion.SelectedValue.ToEntero().Contiene(6) && UsuarioActual.CveEmpresa == 72)
diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb
index 91ae90038..0a8276153 100644
--- a/Bancos/PolizaCheque.aspx.vb
+++ b/Bancos/PolizaCheque.aspx.vb
@@ -211,25 +211,25 @@ Partial Class Bancos_PolizaCheque
End Sub
Private Sub CargaCuenta()
- DdlCuenta.Items.Clear()
-
- Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
-
-
-
-
+ DdlCuenta.Items.Clear()
+
+ Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
+
+
+
+
If DdlTipoTransaccion.SelectedValue.ToEntero = 3 Then
dt = dt.FiltraParametros("CveTipoCuenta = 7")
End If
'cuando es layout
- If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then
+ If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
dt = dt.FiltraParametros("UsaLayout = 1")
- End If
-
- 'cuando es layout Por Grupos
- If DdlTipoTransaccion.SelectedValue.ToEntero = 17 Then
+ End If
+
+ 'cuando es layout Por Grupos
+ If DdlTipoTransaccion.SelectedValue.ToEntero = 17 Then
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
dt = dt.FiltraParametros("UsaLayoutGrupos = 1")
End If
@@ -1212,9 +1212,9 @@ Partial Class Bancos_PolizaCheque
End If
End If
Return Retorno
- End Function
-
-
-
+ End Function
+
+
+
End Class
diff --git a/Bancos/PrestamoPersonal.aspx.cs b/Bancos/PrestamoPersonal.aspx.cs
index fc10b964d..45868524e 100644
--- a/Bancos/PrestamoPersonal.aspx.cs
+++ b/Bancos/PrestamoPersonal.aspx.cs
@@ -410,7 +410,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
if (!archivo.Exists)
{
- archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", AppDomain.CurrentDomain.BaseDirectory));
+ archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", ModExtensiones.DirectorioBaseEmpresas));
}
}
else if (DdlTipoTransaccion.SelectedValue.ToEntero().Contiene(6) && UsuarioActual.CveEmpresa == 72)
@@ -670,7 +670,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
if (!archivo.Exists)
{
- archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", AppDomain.CurrentDomain.BaseDirectory));
+ archivo = new System.IO.FileInfo(String.Format(@"{0}\Empresas\Grales\Formatos\CHQ.rdlc", ModExtensiones.DirectorioBaseEmpresas));
}
}
else if (DdlTipoTransanccionPrestamo.SelectedValue.ToEntero().Contiene(6) && UsuarioActual.CveEmpresa == 72)
diff --git a/Bancos/RepCobrado.aspx.vb b/Bancos/RepCobrado.aspx.vb
index 05e1a0d61..29b9d94e8 100644
--- a/Bancos/RepCobrado.aspx.vb
+++ b/Bancos/RepCobrado.aspx.vb
@@ -134,7 +134,7 @@ Partial Class Ventas_RepRecuperacion
If DdlCuentaBancaria.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Cuenta Bancaria: {0}", DdlCuentaBancaria.SelectedItem.Text)
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\RepRecuperacion.rdlc"
If Not File.Exists(RutaPDF) Then
RutaPDF = "Empresas/Grales/Formatos/RepRecuperacion.rdlc"
diff --git a/Bancos/RepCobradoDetalle.aspx.vb b/Bancos/RepCobradoDetalle.aspx.vb
index 90671a616..b37cec1e1 100644
--- a/Bancos/RepCobradoDetalle.aspx.vb
+++ b/Bancos/RepCobradoDetalle.aspx.vb
@@ -193,7 +193,7 @@ Partial Class Ventas_RepRecuperacionDetalle
If DdlProveedorSucursal.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Proveedor Sucursal: {0}", DdlProveedorSucursal.SelectedItem.Text)
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\RepRecuperacionDetalle.rdlc"
If Not File.Exists(RutaPDF) Then
RutaPDF = "Empresas/Grales/Formatos/RepRecuperacionDetalle.rdlc"
diff --git a/Bancos/Reportes.aspx.vb b/Bancos/Reportes.aspx.vb
index 8ad3eeb40..1f22c766f 100644
--- a/Bancos/Reportes.aspx.vb
+++ b/Bancos/Reportes.aspx.vb
@@ -141,7 +141,7 @@ Partial Class Bancos_Reportes
rv.LocalReport.DataSources.Clear()
rv.LocalReport.DataSources.Add(rds)
rv.LocalReport.DataSources.Add(rds2)
- rv.LocalReport.ReportPath = AppDomain.CurrentDomain.BaseDirectory & "Bancos\Reportes\rptChequeMovimientos.rdlc"
+ rv.LocalReport.ReportPath = ModExtensiones.DirectorioBaseEmpresas & "Bancos\Reportes\rptChequeMovimientos.rdlc"
rv.LocalReport.Refresh()
Dim paramList As New List(Of ReportParameter)
diff --git a/Bancos/ReportesOLD.aspx.vb b/Bancos/ReportesOLD.aspx.vb
index afc90b056..aac1c48b9 100644
--- a/Bancos/ReportesOLD.aspx.vb
+++ b/Bancos/ReportesOLD.aspx.vb
@@ -64,7 +64,7 @@ Partial Class Bancos_Reportes
rv.LocalReport.DataSources.Clear()
rv.LocalReport.DataSources.Add(rds)
rv.LocalReport.DataSources.Add(rds2)
- rv.LocalReport.ReportPath = AppDomain.CurrentDomain.BaseDirectory & "Bancos\Reportes\rptChequeMovimientos.rdlc"
+ rv.LocalReport.ReportPath = ModExtensiones.DirectorioBaseEmpresas & "Bancos\Reportes\rptChequeMovimientos.rdlc"
rv.LocalReport.Refresh()
Dim paramList As New List(Of ReportParameter)
diff --git a/Bin/APP_Code_CSharp.dll b/Bin/APP_Code_CSharp.dll
index 1f9036671..133af1af3 100644
Binary files a/Bin/APP_Code_CSharp.dll and b/Bin/APP_Code_CSharp.dll differ
diff --git a/Bin/APP_Code_CSharp.pdb b/Bin/APP_Code_CSharp.pdb
index 3698a8127..54e2a37d6 100644
Binary files a/Bin/APP_Code_CSharp.pdb and b/Bin/APP_Code_CSharp.pdb differ
diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs
index 9bd14d662..bc1ce9c1a 100644
--- a/CRM/Acercamiento.aspx.cs
+++ b/CRM/Acercamiento.aspx.cs
@@ -1407,7 +1407,7 @@ public partial class CRM_Acercamiento : ClsPaginas
if ((CveArchivo > 0))
{
string NombreNuevo = string.Format("{0}{1}", CveArchivo, FileExtension);
- string DirectorioNuevo = string.Format("{0}\\Empresas\\{1}\\Acercamientos\\{2}\\Imagenes\\", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, CveAcercamiento);
+ string DirectorioNuevo = string.Format("{0}\\Empresas\\{1}\\Acercamientos\\{2}\\Imagenes\\", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, CveAcercamiento);
if (!Directory.Exists(DirectorioNuevo))
{
Directory.CreateDirectory(DirectorioNuevo);
diff --git a/CRM/EmpresaCRM.aspx b/CRM/EmpresaCRM.aspx
index e136089ec..9ff6a1393 100644
--- a/CRM/EmpresaCRM.aspx
+++ b/CRM/EmpresaCRM.aspx
@@ -606,7 +606,7 @@
-
+
<%--
@@ -621,8 +621,10 @@
-
-
+
+
+
+ <%----%>
diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs
index 1ecfcadff..8f63e3791 100644
--- a/CRM/EmpresaCRM.aspx.cs
+++ b/CRM/EmpresaCRM.aspx.cs
@@ -684,7 +684,14 @@ public partial class CRM_EmpresaCRM : ClsPaginas
DdlMedioCaptacionAcercamiento.Items.Clear();
DdlMedioCaptacionAcercamiento.DataSource = DtMedioCaptacion.FiltraParametros(String.Format("CveTipoProceso = {0}",DdlTipoProceso.SelectedValue.ToEntero()));
DdlMedioCaptacionAcercamiento.DataBind();
- DdlMedioCaptacionAcercamiento.Items.Insert(0,new ListItem("Seleccione","-1"));
+ if (DdlTipoProceso.SelectedValue != "-1")
+ {
+ DdlMedioCaptacionAcercamiento.Enabled = true;
+ }else
+ {
+ DdlMedioCaptacionAcercamiento.Items.Insert(0,new ListItem("Seleccione","-1"));
+ DdlMedioCaptacionAcercamiento.Enabled = false;
+ }
DdlProbabilidadAcercamiento.Items.Clear();
DdlProbabilidadAcercamiento.DataSource = DtProbabilidadAcercamiento.FiltraParametros(String.Format("CveTipoProceso = {0}", DdlTipoProceso.SelectedValue.ToEntero()));
@@ -1310,7 +1317,11 @@ public partial class CRM_EmpresaCRM : ClsPaginas
DdlTipoProceso.DataSource = ObjCRM.DtResultados;
if (ObjCRM.DtResultados.Rows.Count > 0)
+ {
DdlTipoProceso.Items.Insert(0, new ListItem("Seleccione ", "-1"));
+
+ DdlMedioCaptacionAcercamiento.Enabled = false;
+ }
DdlTipoProceso.DataBind();
}
@@ -1413,8 +1424,14 @@ public partial class CRM_EmpresaCRM : ClsPaginas
int CveAcercamiento = -1;
- CveAcercamiento = ObjCRM.AddAcercamiento(CveEmpresaCRM, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActual, CveVendedor, CveMedioCaptacion, CveRechazoMotivo, CveProbabilidadAcercamiento,
- FechaApertura, NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveEmpresa, CveUsuarioIng);
+ if (ObjCRM.DtResultados.Rows.Count > 0)
+ {
+ CveAcercamiento = ObjCRM.AddAcercamiento(CveEmpresaCRM, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActual, CveVendedor, CveMedioCaptacion, CveRechazoMotivo, CveProbabilidadAcercamiento,
+ FechaApertura, NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveEmpresa, CveUsuarioIng);
+ }else
+ {
+ Alert("No tiene Etapa Proceso con el Tipo Proceso seleccionado",ModExtensiones.TipoMensaje.MsgAdvertencia);
+ }
if (CveAcercamiento > 0)
{
@@ -1461,6 +1478,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
#region "PERMISOS"
protected void VerificaPermisos()
{
+
if (CveEmpresaCRM > 0)
{
if (!UsuarioActual.TienePermisoProceso(250))
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 8d1499581..a75f1fc4f 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -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
diff --git a/Compras/EvaluacionProveedor.aspx.vb b/Compras/EvaluacionProveedor.aspx.vb
index b842df48b..879754a15 100644
--- a/Compras/EvaluacionProveedor.aspx.vb
+++ b/Compras/EvaluacionProveedor.aspx.vb
@@ -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
Get
+ Private Property CveEvaluacionProveedor() As Integer
+ Get
Return If(IsNothing(ViewState("CveEvaluacionProveedor")), -1, CInt(ViewState("CveEvaluacionProveedor")))
- End Get
Set
- ViewState("CveEvaluacionProveedor") = Value
End Set
End Property
- Private Property CveProveedor() As Integer
Get
+ 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 Get
Set
- ViewState("CveProveedor") = Value
End Set
End Property
- Private Property CveCompra() As Integer
Get
+ 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")))
- End Get
Set
- ViewState("CveCompra") = Value
End Set
End Property
- Private Property DtPreguntas() As DataTable
Get
+ 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 Get
Set
- ViewState("DtPreguntas") = Value
End Set
End Property
- Private Property CorreoEnvio() As String
Get
+ End Get
+ Set
+ ViewState("DtPreguntas") = Value
+ End Set
+ End Property
+ Private Property CorreoEnvio() As String
+ Get
Return If(IsNothing(ViewState("CorreoEnvio")), "", ViewState("CorreoEnvio").ToString())
- End Get
Set
- ViewState("CorreoEnvio") = Value
End Set
End Property
+ 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 = 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\" & Now.Ticks & Documento
@@ -298,7 +318,7 @@ Partial Class Compras_EvaluacionProveedor
Dim archivoCarta As New ClsSisMail.ArchivoMail()
archivoCarta.NombreArchivo = "Formato Evaluacion Proveedor.pdf"
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\" & Now.Ticks & Documento
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 131a8528e..5d0a34f8c 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -15,8 +15,8 @@ Imports Stimulsoft.Report.Web
Partial Class PopUpVerFactura
Inherits ClsPaginas
- Private Shared missing As Object = System.Reflection.Missing.Value
-
+ Private Shared missing As Object = System.Reflection.Missing.Value
+
#Region " PROPIEDADES "
Public Property DtMovimientos() As DataTable
Get
@@ -68,7 +68,7 @@ Partial Class PopUpVerFactura
End Property
Private ReadOnly Property Ruta As String
Get
- Return AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
+ Return ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\"
End Get
End Property
Private ReadOnly Property DomicilioFiscalCompu As String
@@ -83,18 +83,18 @@ Partial Class PopUpVerFactura
End If
Return ""
End Get
- End Property
- 'Private Property SessionPorImpresion As Boolean
- ' Get
- ' Return CBool(IfNull(ViewState("SessionPorImpresion"), False, ViewState("SessionPorImpresion")))
- ' End Get
- ' Set(value As Boolean)
- ' ViewState("SessionPorImpresion") = value
- ' End Set
- 'End Property
+ End Property
+ 'Private Property SessionPorImpresion As Boolean
+ ' Get
+ ' Return CBool(IfNull(ViewState("SessionPorImpresion"), False, ViewState("SessionPorImpresion")))
+ ' End Get
+ ' Set(value As Boolean)
+ ' ViewState("SessionPorImpresion") = 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
'CREA EL OBJECTO USUARIO A PARTIR DEL TOKEN
@@ -130,6 +130,30 @@ Partial Class PopUpVerFactura
Dim Path As String = String.Format("{0}Ventas\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("RFC"), Request("FileV"))
Dim Archivo As New System.IO.FileInfo(Path)
+ If Archivo.Exists Then
+ HttpContext.Current.Response.Clear()
+ HttpContext.Current.Response.ClearContent()
+ HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf")
+ HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
+ HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
+ HttpContext.Current.Response.TransmitFile(Path)
+ 'HttpContext.Current.Response.Flush()
+ HttpContext.Current.Response.End()
+ End If
+ Archivo = Nothing
+
+ ElseIf Request("File") IsNot Nothing AndAlso Request("TipoDocto") IsNot Nothing AndAlso Request("TipoArchivo") IsNot Nothing Then
+ Dim Path As String = "" ' String.Format("{0}Ventas\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("RFC"), Request("FileV"))
+
+ Select Case Request("TipoArchivo")
+ Case "PDF"
+ Path = String.Format("{0}PDF\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("TipoDocto"), Request("File"))
+ Case "XML"
+ Path = String.Format("{0}XML\{1}\{2}", UsuarioActual.Empresa.Ruta, Request("TipoDocto"), Request("File"))
+ End Select
+
+ Dim Archivo As New System.IO.FileInfo(Path)
+
If Archivo.Exists Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
@@ -174,10 +198,10 @@ Partial Class PopUpVerFactura
End If
- End Sub
-
+ End Sub
+
#Region "U S U A R I O - T O K E N"
-
+
Private Function ValidaUsuarioSistema(CveEmpresa As Integer, Optional CveUsuario As Integer = 100) As Usuario
Dim UsuarioToken As Usuario = Nothing
@@ -211,9 +235,9 @@ Partial Class PopUpVerFactura
UsuarioToken.Empresa = ObjEmpresa.Empresa
End If
ObjEmpresa.Dispose()
- End Sub
+ End Sub
#End Region
-
+
Private Sub SeleccionaReporte(UrlParametros As Hashtable)
'DESCARGA DOCUMENTO XML O PDF DE LA FACTURA COMPRA
If UrlParametros("OP").ToString = "Fact" Then
@@ -448,10 +472,10 @@ Partial Class PopUpVerFactura
URLParametros.Add(P2(0).ToString.ToUpper, P2(1))
Next
Return URLParametros
- End Function
-
+ End Function
+
#Region "OP = CORT - IMPRIMIR CORTE"
-
+
Private Sub ImprimeCorte(CveCorte As Integer, Formato As String)
Dim ObjVenta As New ClsVentas
Dim ObjPuntoVenta As New ClsPuntoVenta
@@ -494,10 +518,10 @@ Partial Class PopUpVerFactura
ImprimirPDF("Empresas/Grales/Formatos/RepCortes.rdlc", lrds, params, "ReporteCortes", Formato)
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region " OP = FACTURA - IMPRIME COMPRA"
Private Sub DescargaFactura(Parametros As Hashtable)
If Parametros("CVEFACTURA") IsNot Nothing AndAlso Parametros("CVEFACTURA").ToString.ToEntero > 0 Then
@@ -517,9 +541,9 @@ Partial Class PopUpVerFactura
End If
Archivo = Nothing
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "OP DesXmlVIA- DESCARGAR XML DE VIATICOS"
Private Sub DescargaXMLViaticos(Parametros As Hashtable)
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
@@ -539,10 +563,10 @@ Partial Class PopUpVerFactura
End If
Archivo = Nothing
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP DesXmlNom- DESCARGAR XML DE UTILIDADES"
Private Sub DescargaXMLUtilidades(Parametros As Hashtable)
If Parametros("SERIEFOLIO") IsNot Nothing AndAlso Parametros("SERIEFOLIO").ToString <> "" Then
@@ -562,9 +586,9 @@ Partial Class PopUpVerFactura
End If
Archivo = Nothing
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'CONG' - IMPRIME GASTO DE CONTRATO"
Private Sub ImprimeGastoContrato(CveContrato As Integer, CveContratoGasto As Integer)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -606,10 +630,10 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("LogoPath", ""))
End If
ImprimirPDF("Empresas/Grales/Formatos/ContratoGasto.rdlc", dt, params, $"{Nombre}-Gastos", Formato:="PDF")
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region "OP = 'CIC' - IMPRIME FORMATO CICOVISA"
Private Sub ImprimeFormatoCICOVISA(CveVenta As Integer)
If CveVenta > 0 Then
@@ -646,10 +670,10 @@ Partial Class PopUpVerFactura
ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString))
End If
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP = 'CARPO' - IMPRIME FORMATO CARTA PORTE"
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
If CveMovimiento > 0 Then
@@ -774,12 +798,12 @@ Partial Class PopUpVerFactura
ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
End If
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP = 'DesXmlTra' - IMPRIME XML TRASLADO"
-
+
Private Sub DescargaXMLTraslado(Parametros As Hashtable)
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
@@ -798,12 +822,12 @@ Partial Class PopUpVerFactura
End If
Archivo = Nothing
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP = 'DesPdfTra' - IMPRIME PDF TRASLADO"
-
+
Private Sub DescargaPDFTraslado(Parametros As Hashtable)
If Parametros("CVEMOVIMIENTO") IsNot Nothing AndAlso Parametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
Dim Exten As String = If(Parametros("EXT").ToString.ToLower = "xml", "xml", "pdf")
@@ -822,10 +846,10 @@ Partial Class PopUpVerFactura
End If
Archivo = Nothing
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region " OP = 'Vta,Fact' - IMPRIME PDF VENTAS"
Private Sub DescargaFacturaVenta(Parametros As Hashtable)
If Parametros("CVEVENTA") IsNot Nothing AndAlso Parametros("CVEVENTA").ToString.ToEntero > 0 Then
@@ -887,7 +911,7 @@ Partial Class PopUpVerFactura
Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString
Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString
Vta.Cliente.Mail = dtVentas(0)("Mail").ToString
- Vta.Cliente.MailCotizacion = dtVentas(0)("SucClienteCorreo").ToString
+ Vta.Cliente.MailCotizacion = dtVentas(0)("SucClienteCorreo").ToString
Vta.RefDocto = dtVentas(0)("Ref").ToString
Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero
Vta.NumeroCuenta = dtVentas(0)("NumCtaPago").ToString
@@ -897,10 +921,10 @@ Partial Class PopUpVerFactura
Vta.DescripcionContrato = dtVentas(0)("DescripcionContrato").ToString
Vta.NumeroDescripcionContrato = If($"{dtVentas(0)("NumeroContrato").ToString} - {dtVentas(0)("NumeroLicitacion").ToString}" = " - ", "", $"{dtVentas(0)("NumeroContrato").ToString} {If(dtVentas(0)("NumeroLicitacion").ToString = "", "", $" - Licitación: {dtVentas(0)("NumeroLicitacion").ToString}")}")
- Vta.PedidoContrato = If(dtVentas(0)("PedidoContrato").ToString = "", Vta.NumeroDescripcionContrato, $"{dtVentas(0)("PedidoContrato").ToString} {If(Vta.NumeroDescripcionContrato = "", "", $" / {Vta.NumeroDescripcionContrato}") }")
- Vta.Kilometraje = If(dtVentas(0)("Kilometraje").ToString = "", -1, dtVentas(0)("Kilometraje").ToString.ToDecimal)
- 'Vta.PedidoContrato = dtVentas(0)("PedidoContrato").ToString
-
+ Vta.PedidoContrato = If(dtVentas(0)("PedidoContrato").ToString = "", Vta.NumeroDescripcionContrato, $"{dtVentas(0)("PedidoContrato").ToString} {If(Vta.NumeroDescripcionContrato = "", "", $" / {Vta.NumeroDescripcionContrato}") }")
+ Vta.Kilometraje = If(dtVentas(0)("Kilometraje").ToString = "", -1, dtVentas(0)("Kilometraje").ToString.ToDecimal)
+ 'Vta.PedidoContrato = dtVentas(0)("PedidoContrato").ToString
+
Vta.ClienteSucursal = New Modelos.SucursalModel
Vta.ClienteSucursal.Direccion = dtVentas(0)("SucClienteDireccion").ToString
Vta.ClienteSucursal.NoExt = dtVentas(0)("SucClienteNoExt").ToString
@@ -1069,16 +1093,16 @@ Partial Class PopUpVerFactura
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
ObjVentas.DtResultados.Columns.Add("Importe", GetType(Decimal))
ObjVentas.DtResultados.Rows(0)("Importe") = ObjVentas.DtResultados.Rows(0)("Total")
- Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
- If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
- Vta.DtNCVinculadas = ObjVentas.DtResultados
- Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
- If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
- If Vta.TipoDocto.Contiene("Dev") Then
- Vta.Timbre.CFDIRelacionados.TipoRelacion = "03"
- Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
- End If
- End If
+ Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
+ If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
+ Vta.DtNCVinculadas = ObjVentas.DtResultados
+ Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
+ If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
+ If Vta.TipoDocto.Contiene("Dev") Then
+ Vta.Timbre.CFDIRelacionados.TipoRelacion = "03"
+ Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
+ End If
+ End If
End If
End If
End If
@@ -1090,17 +1114,17 @@ Partial Class PopUpVerFactura
' End If
'End If
- If dtVentas(0)("TipoDocto").ToString.Contiene("Egs", "Dev", "Ant") Then
-
- If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
- Vta.DtNCVinculadas = ObjVentas.DtResultados
+ If dtVentas(0)("TipoDocto").ToString.Contiene("Egs", "Dev", "Ant") Then
+
+ If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
+ Vta.DtNCVinculadas = ObjVentas.DtResultados
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
- If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
- If Vta.TipoDocto.Contiene("Dev") Then
- Vta.Timbre.CFDIRelacionados.TipoRelacion = "03"
- Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
- End If
- End If
+ If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
+ If Vta.TipoDocto.Contiene("Dev") Then
+ Vta.Timbre.CFDIRelacionados.TipoRelacion = "03"
+ Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
+ End If
+ End If
End If
End If
End If
@@ -1110,8 +1134,8 @@ Partial Class PopUpVerFactura
' 'If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
' ' Vta.DtNCVinculadas = ObjVentas.DtResultados
' 'End If
- ' If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
- ' Vta.DtNCVinculadas = ObjVentas.DtResultados
+ ' If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
+ ' Vta.DtNCVinculadas = ObjVentas.DtResultados
' End If
'End If
@@ -1130,16 +1154,16 @@ Partial Class PopUpVerFactura
End If
End If
- End Sub
+ End Sub
#End Region
-
+
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
-
+
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer)
Dim ObjInventarios As New ClsInventarios
- ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
-
+ ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
+
Dim CveConcepto As Integer = ObjInventarios.CveConcepto
Dim Folio As String = ObjInventarios.Folio.ToString
Dim CveCompra = ObjInventarios.CveCompra
@@ -1196,15 +1220,15 @@ Partial Class PopUpVerFactura
Dim FolioOC As String = ObjInventarios.FolioOC
Dim FolioInterno As String = ObjInventarios.FolioInterno
- Dim CveCliente As Integer = ObjInventarios.CveCliente
+ Dim CveCliente As Integer = ObjInventarios.CveCliente
Dim NombreCliente As String = ObjInventarios.NombreCliente
Dim CveClienteSucursal As Integer = ObjInventarios.CveClienteSucursal
Dim DepartamentoEntrega As String = ObjInventarios.DepartamentoEntrega
Dim FechaMovimiento As Date = ObjInventarios.FechaRegistro
- Dim CveMovimientoRelacionado As Integer = -1
- If UsuarioActual.CveEmpresa = 140 AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
- CveMovimientoRelacionado = ObjInventarios.DtResultados.Rows(0)("CveMtoRel").ToString().ToEntero()
+ Dim CveMovimientoRelacionado As Integer = -1
+ If UsuarioActual.CveEmpresa = 140 AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
+ CveMovimientoRelacionado = ObjInventarios.DtResultados.Rows(0)("CveMtoRel").ToString().ToEntero()
End If
Dim CantidadProductos As Decimal = 0
@@ -1225,27 +1249,27 @@ Partial Class PopUpVerFactura
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
DtMovimientos = ObjInventarios.DtResultados.Copy()
CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal()
- If UsuarioActual.CveEmpresa = 140 AndAlso CveMovimientoRelacionado > 0 Then
- If ObjInventarios.GetMovimientos(CveMovimientoRelacionado, -1, -1, UsuarioActual.CveEmpresa) Then
- Dim CveAlmacenRelacionado As Integer = ObjInventarios.CveAlmacen
- Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero
-
- 'SI TIENE RELACIONADO UN MOVIMIENTO VIRTUAL DEBE AGREGAR ESTE MOVIMIENTO A LA IMPRESION
- If CveTipoAlmacenRelacionado = 24 Then
- If ObjInventarios.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then
- Dim DtUsados As DataTable = ObjInventarios.DtResultados.Copy()
- CantidadUsados = DtUsados.SUM("Cantidad").ToDecimal()
- Dim IndexInicialUsados As Integer = DtMovimientos.Rows.Count + 1
-
- For Each Dr As DataRow In DtUsados.Rows
- Dr("No") = IndexInicialUsados
- IndexInicialUsados += 1
- Next
-
- DtMovimientos.Merge(DtUsados)
- End If
- End If
- End If
+ If UsuarioActual.CveEmpresa = 140 AndAlso CveMovimientoRelacionado > 0 Then
+ If ObjInventarios.GetMovimientos(CveMovimientoRelacionado, -1, -1, UsuarioActual.CveEmpresa) Then
+ Dim CveAlmacenRelacionado As Integer = ObjInventarios.CveAlmacen
+ Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero
+
+ 'SI TIENE RELACIONADO UN MOVIMIENTO VIRTUAL DEBE AGREGAR ESTE MOVIMIENTO A LA IMPRESION
+ If CveTipoAlmacenRelacionado = 24 Then
+ If ObjInventarios.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then
+ Dim DtUsados As DataTable = ObjInventarios.DtResultados.Copy()
+ CantidadUsados = DtUsados.SUM("Cantidad").ToDecimal()
+ Dim IndexInicialUsados As Integer = DtMovimientos.Rows.Count + 1
+
+ For Each Dr As DataRow In DtUsados.Rows
+ Dr("No") = IndexInicialUsados
+ IndexInicialUsados += 1
+ Next
+
+ DtMovimientos.Merge(DtUsados)
+ End If
+ End If
+ End If
End If
DtMovimientos.Columns("No").AutoIncrement = True
@@ -1270,9 +1294,9 @@ Partial Class PopUpVerFactura
Personal, Capturo, AlmacenDestino, CveConsignacion, CveMoneda, Moneda, FolioVenta, FolioOC,
FolioInterno, FechaHora, ObservacionesSolicitud, DepartamentoEntrega, RazonSocialOC,
Remision, Proveedor, CalleOrigen, NoExtOrigen, ColoniaOrigen, LocalidadOrigen, MunicipioOrigen,
- EstadoOrigen, PaisOrigen, CPOrigen, CalleDestino, NoExtDestino, ColoniaDestino, LocalidadDestino,
+ EstadoOrigen, PaisOrigen, CPOrigen, CalleDestino, NoExtDestino, ColoniaDestino, LocalidadDestino,
MunicipioDestino, EstadoDestino, PaisDestino, CPDestino, FechaMovimiento, NombreCapturo, PuestoRecibio,
- PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente,
+ PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente,
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados)
End Sub
@@ -1289,10 +1313,10 @@ Partial Class PopUpVerFactura
FolioInterno As String, FechaHora As DateTime, ObservacionesSolicitud As String, DepartamentoEntrega As String, RazonSocialOC As String,
Remision As String, Proveedor As String, CalleOrigen As String, NoExtOrigen As String, ColoniaOrigen As String, LocalidadOrigen As String, MunicipioOrigen As String,
EstadoOrigen As String, PaisOrigen As String, CPOrigen As String, CalleDestino As String, NoExtDestino As String, ColoniaDestino As String, LocalidadDestino As String, MunicipioDestino As String,
- EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String,
- RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0)
-
-
+ EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String,
+ RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0)
+
+
Select Case CveConcepto
Case 1 'INICIAL
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Inicial.rdlc", UsuarioActual.Empresa.Ruta))
@@ -2031,30 +2055,30 @@ Partial Class PopUpVerFactura
Dim Archivo As New System.IO.FileInfo(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta))
- If Archivo.Exists Then
- If UsuarioActual.CveEmpresa = 140 Then
- Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
- Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
-
- If Imagen.Exists Then
- params.Add(New ReportParameter("LogoPath", logouri))
- Else
- params.Add(New ReportParameter("LogoPath", ""))
- End If
- params.Add(New ReportParameter("Origen", Almacen))
- params.Add(New ReportParameter("Destino", AlmacenDestino))
- params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
- params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
- params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
- params.Add(New ReportParameter("CantidadProductos", CantidadProductos.ToString()))
- params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString()))
- Else
- params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text
- params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString))
- params.Add(New ReportParameter("CveTipoAlmacenDestino", DtMovimientos(0)("CveTipoAlmacenDestino").ToString))
- params.Add(New ReportParameter("CveVentaDetalle", DtMovimientos(0)("CveVentaDetalle").ToString))
- params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString))
- params.Add(New ReportParameter("Factura", DtMovimientos(0)("SerieFolio").ToString))
+ If Archivo.Exists Then
+ If UsuarioActual.CveEmpresa = 140 Then
+ Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
+ End If
+ params.Add(New ReportParameter("Origen", Almacen))
+ params.Add(New ReportParameter("Destino", AlmacenDestino))
+ params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
+ params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("CantidadProductos", CantidadProductos.ToString()))
+ params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString()))
+ Else
+ params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text
+ params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString))
+ params.Add(New ReportParameter("CveTipoAlmacenDestino", DtMovimientos(0)("CveTipoAlmacenDestino").ToString))
+ params.Add(New ReportParameter("CveVentaDetalle", DtMovimientos(0)("CveVentaDetalle").ToString))
+ params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString))
+ params.Add(New ReportParameter("Factura", DtMovimientos(0)("SerieFolio").ToString))
End If
If UsuarioActual.CveEmpresa = 72 Or UsuarioActual.CveEmpresa = 119 Then
@@ -2070,15 +2094,15 @@ Partial Class PopUpVerFactura
ImprimirPDF(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios")
Else
- Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
- Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
-
- If Imagen.Exists Then
- params.Add(New ReportParameter("LogoPath", logouri))
- Else
- params.Add(New ReportParameter("LogoPath", ""))
+ Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
End If
- params.Add(New ReportParameter("Origen", Almacen))
+ params.Add(New ReportParameter("Origen", Almacen))
params.Add(New ReportParameter("Destino", AlmacenDestino))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
@@ -2118,19 +2142,19 @@ Partial Class PopUpVerFactura
ElseIf UsuarioActual.CveEmpresa = 140 Then
params.Add(New ReportParameter("CantidadProductos", "500"))
params.Add(New ReportParameter("CantidadUsados", "500"))
- Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
- Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
-
- If Imagen.Exists Then
- params.Add(New ReportParameter("LogoPath", logouri))
- Else
- params.Add(New ReportParameter("LogoPath", ""))
- End If
- params.Add(New ReportParameter("Origen", Almacen))
- params.Add(New ReportParameter("Destino", AlmacenDestino))
-
- params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
- params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
+ Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
+ End If
+ params.Add(New ReportParameter("Origen", Almacen))
+ params.Add(New ReportParameter("Destino", AlmacenDestino))
+
+ params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
End If
@@ -2138,15 +2162,15 @@ Partial Class PopUpVerFactura
ImprimirPDF(String.Format("{0}Formatos\Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Recepción de Traslado - {0}", Folio), RDSName:="DsInventarios")
Else
- Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
- Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
-
- If Imagen.Exists Then
- params.Add(New ReportParameter("LogoPath", logouri))
- Else
- params.Add(New ReportParameter("LogoPath", ""))
+ Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
End If
- params.Add(New ReportParameter("Origen", Almacen))
+ params.Add(New ReportParameter("Origen", Almacen))
params.Add(New ReportParameter("Destino", AlmacenDestino))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
@@ -2392,19 +2416,19 @@ Partial Class PopUpVerFactura
If (UsuarioActual.CveEmpresa = 72) Then
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
End If
- ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios")
- 'Else
- ' params.Add(New ReportParameter("Folio", Folio))
- ' params.Add(New ReportParameter("Fecha", Fecha))
- ' params.Add(New ReportParameter("Almacen", Almacen))
- ' params.Add(New ReportParameter("SubProyecto", SubProyecto))
- ' params.Add(New ReportParameter("Observaciones", Observaciones))
- ' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
- ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
- ' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
- 'End If
-
-
+ ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios")
+ 'Else
+ ' params.Add(New ReportParameter("Folio", Folio))
+ ' params.Add(New ReportParameter("Fecha", Fecha))
+ ' params.Add(New ReportParameter("Almacen", Almacen))
+ ' params.Add(New ReportParameter("SubProyecto", SubProyecto))
+ ' params.Add(New ReportParameter("Observaciones", Observaciones))
+ ' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
+ ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
+ ' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
+ 'End If
+
+
Case 18 'D E V O L U C I O N D E L C L I E N T E
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DevolucionCliente.rdlc", UsuarioActual.Empresa.Ruta))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -2450,36 +2474,36 @@ Partial Class PopUpVerFactura
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios")
'End If
Else
- Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
- If Imagen.Exists Then
- params.Add(New ReportParameter("LogoPath", logouri))
- Else
- params.Add(New ReportParameter("LogoPath", ""))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
End If
- Dim CiudadSucursal As String = ""
- Dim DomicilioSucursal As String = ""
-
- If DtMovimientos(0)("CveVenta").ToString <> "" Then
- CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString)
- DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString)
- End If
- params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
- params.Add(New ReportParameter("Folio", Folio))
- params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE"))
- params.Add(New ReportParameter("Fecha", Fecha))
- params.Add(New ReportParameter("Almacen", Almacen))
- params.Add(New ReportParameter("FacturaProveedor", FolioVenta))
- params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
- params.Add(New ReportParameter("NombreRecibio", Recibio))
- params.Add(New ReportParameter("ExpedidoEn", DomicilioSucursal))
- params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString))
- params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString))
- params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString))
- params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
- params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
-
- ImprimirPDF("Empresas/Grales/Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios")
- 'End If
+ Dim CiudadSucursal As String = ""
+ Dim DomicilioSucursal As String = ""
+
+ If DtMovimientos(0)("CveVenta").ToString <> "" Then
+ CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString)
+ DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString)
+ End If
+ params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
+ params.Add(New ReportParameter("Folio", Folio))
+ params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE"))
+ params.Add(New ReportParameter("Fecha", Fecha))
+ params.Add(New ReportParameter("Almacen", Almacen))
+ params.Add(New ReportParameter("FacturaProveedor", FolioVenta))
+ params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
+ params.Add(New ReportParameter("NombreRecibio", Recibio))
+ params.Add(New ReportParameter("ExpedidoEn", DomicilioSucursal))
+ params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString))
+ params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString))
+ params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString))
+ params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
+ params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
+
+ ImprimirPDF("Empresas/Grales/Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios")
+ 'End If
End If
Case 19 'ARMADO DE PAQUETE
@@ -2545,8 +2569,8 @@ Partial Class PopUpVerFactura
Dim params As New List(Of ReportParameter)
Dim Archivo As String = $"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntradaSalida.rdlc"
- If Not File.Exists($"{Server.MapPath("~")}/{Archivo}") Then
- Archivo = "Empresas/Grales/Formatos/EntradaSalida.rdlc"
+ If Not File.Exists($"{Server.MapPath("~")}/{Archivo}") Then
+ Archivo = "Empresas/Grales/Formatos/EntradaSalida.rdlc"
End If
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
@@ -2557,7 +2581,7 @@ Partial Class PopUpVerFactura
End If
'params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
- If CveConcepto = 21 Then
+ If CveConcepto = 21 Then
params.Add(New ReportParameter("Concepto", "Salida por Prestamo"))
Else
params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
@@ -2577,40 +2601,40 @@ Partial Class PopUpVerFactura
Else
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
End If
- If CveConcepto = 21 Then
+ If CveConcepto = 21 Then
ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
- ElseIf CveConcepto = 22 Then
- ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
- End If
-
- 'Case 22 'ENTRADA POR PRESTAMO
- ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
- ' Dim params As New List(Of ReportParameter)
-
- ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
- ' If Imagen.Exists Then
- ' params.Add(New ReportParameter("LogoPath", logouri))
- ' Else
- ' params.Add(New ReportParameter("LogoPath", ""))
- ' End If
-
- ' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
- ' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
- ' params.Add(New ReportParameter("Almacen", Almacen))
- ' params.Add(New ReportParameter("Fecha", Fecha))
- ' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
- ' params.Add(New ReportParameter("Folio", Folio))
- ' params.Add(New ReportParameter("Descuentos", ""))
- ' params.Add(New ReportParameter("IVA", ""))
- ' params.Add(New ReportParameter("Total", ""))
- ' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
- ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
- ' params.Add(New ReportParameter("FacturadoA", NombreCliente))
- ' If (UsuarioActual.CveEmpresa = 72) Then
- ' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
- ' End If
- ' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
-
+ ElseIf CveConcepto = 22 Then
+ ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
+ End If
+
+ 'Case 22 'ENTRADA POR PRESTAMO
+ ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ ' Dim params As New List(Of ReportParameter)
+
+ ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+ ' If Imagen.Exists Then
+ ' params.Add(New ReportParameter("LogoPath", logouri))
+ ' Else
+ ' params.Add(New ReportParameter("LogoPath", ""))
+ ' End If
+
+ ' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
+ ' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
+ ' params.Add(New ReportParameter("Almacen", Almacen))
+ ' params.Add(New ReportParameter("Fecha", Fecha))
+ ' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
+ ' params.Add(New ReportParameter("Folio", Folio))
+ ' params.Add(New ReportParameter("Descuentos", ""))
+ ' params.Add(New ReportParameter("IVA", ""))
+ ' params.Add(New ReportParameter("Total", ""))
+ ' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
+ ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
+ ' params.Add(New ReportParameter("FacturadoA", NombreCliente))
+ ' If (UsuarioActual.CveEmpresa = 72) Then
+ ' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
+ ' End If
+ ' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
+
Case 24 'SALIDA POR RESGUARDO
If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -3024,71 +3048,71 @@ Partial Class PopUpVerFactura
End If
End If
- End If
-
+ End If
+
Case 42 'ENTRADAS USADOS
- Dim ObjAcum As New ClsAcumuladores
- Dim DatosEntradasUsados As New DataTable
- Dim CveAlmacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", String.Format("Almacen = '{0}'", Almacen))
- If ObjAcum.EntradasUsadosGet(UsuarioActual.CveEmpresa, CveAlmacen.ToEntero, Convert.ToDateTime(Fecha.ToString), Convert.ToDateTime(Today.ToString)) Then
- DatosEntradasUsados = ObjAcum.DtResultados
-
- End If
+ Dim ObjAcum As New ClsAcumuladores
+ Dim DatosEntradasUsados As New DataTable
+ Dim CveAlmacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", String.Format("Almacen = '{0}'", Almacen))
+ If ObjAcum.EntradasUsadosGet(UsuarioActual.CveEmpresa, CveAlmacen.ToEntero, Convert.ToDateTime(Fecha.ToString), Convert.ToDateTime(Today.ToString)) Then
+ DatosEntradasUsados = ObjAcum.DtResultados
+
+ End If
ObjAcum.Dispose()
- Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
- Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
-
- Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
-
- Dim params As New List(Of ReportParameter)
-
- params.Add(New ReportParameter("Direccion", Almacen))
- params.Add(New ReportParameter("FechaConFormato", FechaConFormato))
- params.Add(New ReportParameter("FechaInicial", Fecha))
- params.Add(New ReportParameter("FechaFinal", Today.ToString))
- params.Add(New ReportParameter("Sucursal", "Sucursal"))
- params.Add(New ReportParameter("Cliente", NombreCliente))
-
- ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepUsadosEntradas.rdlc", UsuarioActual.CveEmpresa), DtMovimientos, params, "Reporte entrada usados", "PDF", "DsInventarios")
+ Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2))
+ Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
+
+ Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
+
+ Dim params As New List(Of ReportParameter)
+
+ params.Add(New ReportParameter("Direccion", Almacen))
+ params.Add(New ReportParameter("FechaConFormato", FechaConFormato))
+ params.Add(New ReportParameter("FechaInicial", Fecha))
+ params.Add(New ReportParameter("FechaFinal", Today.ToString))
+ params.Add(New ReportParameter("Sucursal", "Sucursal"))
+ params.Add(New ReportParameter("Cliente", NombreCliente))
+
+ ImprimirPDF(String.Format("Empresas/{0}/Formatos/RepUsadosEntradas.rdlc", UsuarioActual.CveEmpresa), DtMovimientos, params, "Reporte entrada usados", "PDF", "DsInventarios")
Case 7
Dim params As New List(Of ReportParameter)
- Dim CiudadSucursal As String = ""
- Dim DomicilioSucursal As String = ""
-
- If DtMovimientos(0)("CveVenta").ToString <> "" Then
- CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString)
- DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString)
- End If
- params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
- params.Add(New ReportParameter("Folio", Folio))
- params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE"))
- params.Add(New ReportParameter("Fecha", Fecha))
- params.Add(New ReportParameter("Almacen", Almacen))
- params.Add(New ReportParameter("FacturaProveedor", FolioVenta))
- params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
- params.Add(New ReportParameter("NombreRecibio", Recibio))
- params.Add(New ReportParameter("ExpedidoEn", DomicilioSucursal))
- params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString))
- params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString))
- params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString))
- params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
- params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
-
- ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios")
- 'End If
-
+ Dim CiudadSucursal As String = ""
+ Dim DomicilioSucursal As String = ""
+
+ If DtMovimientos(0)("CveVenta").ToString <> "" Then
+ CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString)
+ DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString)
+ End If
+ params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
+ params.Add(New ReportParameter("Folio", Folio))
+ params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE"))
+ params.Add(New ReportParameter("Fecha", Fecha))
+ params.Add(New ReportParameter("Almacen", Almacen))
+ params.Add(New ReportParameter("FacturaProveedor", FolioVenta))
+ params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
+ params.Add(New ReportParameter("NombreRecibio", Recibio))
+ params.Add(New ReportParameter("ExpedidoEn", DomicilioSucursal))
+ params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString))
+ params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString))
+ params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString))
+ params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
+ params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
+
+ ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios")
+ 'End If
+
End Select
If CveConcepto = 2 Then
ElseIf CveConcepto = 3 Then
End If
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "OP = 'OC' - IMPRIME PDF OC"
Private Sub ImprimePDFOC(CveOrdenCompra As Integer)
Dim reporte As Byte() = NewGeneraBytesOC(CveOrdenCompra, ConBitacora:=(UsuarioActual.Empresa.Funcionalidad(119) = "1"))
@@ -3124,10 +3148,10 @@ Partial Class PopUpVerFactura
ImprimirbytesPDF(reporte, $"OrdenCompra-{Folio.ToString}")
End If
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP = 'VAL' - IMPRIME PDF VAL"
Private Sub GenerarPDFVale(CveVale As Integer)
@@ -3157,9 +3181,9 @@ Partial Class PopUpVerFactura
'End If
End If
ObjAF.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'OS' - IMPRIMIR PDF OS"
Private Sub GenerarPDFOS(CveOS As Integer)
Dim ObjOS As New ClsOS()
@@ -3169,8 +3193,8 @@ Partial Class PopUpVerFactura
Dim ReporteEmpresa As New System.IO.FileInfo(String.Format("{0}Formatos/OrdenServicio.rdlc", UsuarioActual.Empresa.Ruta))
If ObjOS.GetOrdenesServicios(CveOS, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
- If ObjOS.DtResultados.Rows.Count > 0 Then
-
+ If ObjOS.DtResultados.Rows.Count > 0 Then
+
Dim dtOS As DataTable = ObjOS.DtResultados
Dim dr As DataRow = dtOS.Rows(0)
params.Add(New ReportParameter("Cliente", dr("Cliente").ToString))
@@ -3184,56 +3208,56 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("ClienteColonia", dr("Colonia").ToString))
params.Add(New ReportParameter("ClienteCiudad", dr("Ciudad").ToString))
params.Add(New ReportParameter("ClienteEstado", dr("Estado").ToString))
- CveFolio = dr("Folio").ToString
-
- If ReporteEmpresa.Exists Then
- params.Add(New ReportParameter("NoDeCliente", dr("CveCliente").ToString))
- params.Add(New ReportParameter("RFC", dr("RFC").ToString))
- params.Add(New ReportParameter("Vendedor", " "))
- params.Add(New ReportParameter("Correo", dr("Correo").ToString))
- params.Add(New ReportParameter("CodigoDeServicio", dr("CveOS").ToString))
- params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString))
- params.Add(New ReportParameter("TipoServicio", dr("TipoServicio").ToString))
- params.Add(New ReportParameter("TipoEquipo", dr("TipoEquipo").ToString))
- params.Add(New ReportParameter("Descripcion", dr("Descripcion").ToString))
- params.Add(New ReportParameter("Copia", "Copia: Original"))
- params.Add(New ReportParameter("Equipo", dr("Equipo").ToString))
- End If
+ CveFolio = dr("Folio").ToString
+
+ If ReporteEmpresa.Exists Then
+ params.Add(New ReportParameter("NoDeCliente", dr("CveCliente").ToString))
+ params.Add(New ReportParameter("RFC", dr("RFC").ToString))
+ params.Add(New ReportParameter("Vendedor", " "))
+ params.Add(New ReportParameter("Correo", dr("Correo").ToString))
+ params.Add(New ReportParameter("CodigoDeServicio", dr("CveOS").ToString))
+ params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString))
+ params.Add(New ReportParameter("TipoServicio", dr("TipoServicio").ToString))
+ params.Add(New ReportParameter("TipoEquipo", dr("TipoEquipo").ToString))
+ params.Add(New ReportParameter("Descripcion", dr("Descripcion").ToString))
+ params.Add(New ReportParameter("Copia", "Copia: Original"))
+ params.Add(New ReportParameter("Equipo", dr("Equipo").ToString))
+ End If
End If
End If
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
- If Not ReporteEmpresa.Exists Then
- params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
- params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
- params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
-
- If Imagen.Exists Then
- params.Add(New ReportParameter("LogoPath", logouri))
- Else
- params.Add(New ReportParameter("LogoPath", ""))
- End If
-
- End If
-
- If ObjOS.GetOrdenesServiciosDetalle(CveOS) Then
- TmpDTOS = ObjOS.DtResultados
- End If
-
- If ObjOS.GetDetalleMateriales(-1, CveOS) Then
- TmpDTMaterialesOS = ObjOS.DtResultados
- End If
- Dim lrds As New List(Of ReportDataSource)
- Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS}
- Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS}
-
- lrds.Add(rds)
- lrds.Add(rds2)
- ObjOS.Dispose()
-
- ImprimirPDF(String.Format("Empresas/{0}/Formatos/OrdenServicio.rdlc", UsuarioActual.CveEmpresa), lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
+ If Not ReporteEmpresa.Exists Then
+ params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
+ params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
+
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
+ End If
+
+ End If
+
+ If ObjOS.GetOrdenesServiciosDetalle(CveOS) Then
+ TmpDTOS = ObjOS.DtResultados
+ End If
+
+ If ObjOS.GetDetalleMateriales(-1, CveOS) Then
+ TmpDTMaterialesOS = ObjOS.DtResultados
+ End If
+ Dim lrds As New List(Of ReportDataSource)
+ Dim rds As New ReportDataSource With {.Name = "DataSet2", .Value = TmpDTMaterialesOS}
+ Dim rds2 As New ReportDataSource With {.Name = "DataSet1", .Value = TmpDTOS}
+
+ lrds.Add(rds)
+ lrds.Add(rds2)
+ ObjOS.Dispose()
+
+ ImprimirPDF(String.Format("Empresas/{0}/Formatos/OrdenServicio.rdlc", UsuarioActual.CveEmpresa), lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
End Sub
Private Sub CreaDT()
TmpDTOS = New DataTable
@@ -3278,9 +3302,9 @@ Partial Class PopUpVerFactura
TmpDTMaterialesOS.Columns.Add("Clasificacion", GetType(String))
TmpDTMaterialesOS.Columns.Add("PS", GetType(String))
TmpDTMaterialesOS.Columns.Add("UM", GetType(String))
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'OI' - Crear Archivo "
Private Sub CrearArchivo(Archivo As String)
Dim ObjEventos As New ClsOIEventos
@@ -3289,11 +3313,11 @@ Partial Class PopUpVerFactura
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path) '-- if the file exists on the server
DescargarArchivo(file)
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "OP = 'Contratos' - Crear Archivo "
Private Sub CrearArchivoContratos(Archivo As String)
@@ -3301,11 +3325,11 @@ Partial Class PopUpVerFactura
Dim file As System.IO.FileInfo = New System.IO.FileInfo(Archivo) '-- if the file exists on the server
DescargarArchivo(file)
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "OP = 'OI' - Descargar Archivo "
Private Sub DescargarArchivo(File As System.IO.FileInfo)
If File.Exists Then 'set appropriate headers
@@ -3335,11 +3359,11 @@ Partial Class PopUpVerFactura
Alert("Ocurrio un error al descargar el archivo", TipoMensaje.MsgAdvertencia, "window.close()")
End If 'nothing in the URL as HTTP GET
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'AFR' - AF"
-
+
Private Sub ImprimirPDFAFR(CveAFR As Integer, Tipo As Integer)
Dim ObjAF As New ClsAF
'Dim ObjSubProyecto As New ClsSubProyectos
@@ -3525,9 +3549,9 @@ Partial Class PopUpVerFactura
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/ResguardoAF.rdlc", dtVC, params, NomArchivo)
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'POL' "
Private Sub ImprimirPolizaPDF(IdPoliza As Integer)
'Dim ObjConta As New ClsContabilidad
@@ -3566,9 +3590,9 @@ Partial Class PopUpVerFactura
ObjPoliza.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'CAN' - CANCELACION"
Public Sub ImprimeCancelacion(CveVenta As Integer)
Dim ObjVentas As New ClsVentas
@@ -3578,7 +3602,7 @@ Partial Class PopUpVerFactura
Dim SelloCancelacion = drv("SelloCancelacion").ToString
Dim FechaCancelacion = drv("FechaCancelacion").ToString.ToDateTime.ToString("dd/MM/yyyy HH:mm:ss")
Dim RFC = UsuarioActual.Empresa.RFC
- Dim Archivo As New System.IO.FileInfo(String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacion.rdlc", AppDomain.CurrentDomain.BaseDirectory))
+ Dim Archivo As New System.IO.FileInfo(String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacion.rdlc", ModExtensiones.DirectorioBaseEmpresas))
Dim params As New List(Of ReportParameter)
@@ -3593,9 +3617,9 @@ Partial Class PopUpVerFactura
End If
ObjVentas.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = 'DC' - DEPOSITOS CAJA"
Private Sub CargaDepositosCaja(CveIE As Integer, CuentaCaja As String, CuentaDeposito As String)
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DepositoCaja.rdlc", UsuarioActual.Empresa.Ruta))
@@ -3622,11 +3646,11 @@ Partial Class PopUpVerFactura
ObjIE.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "I E C H E Q U E S"
-
+
Private Sub ImprimirIE(CveIE As Integer, CveEmpresa As Integer)
Dim CveTipoTransaccion = -1
Dim ObjIE As New ClsBancos()
@@ -3872,23 +3896,23 @@ Partial Class PopUpVerFactura
ObjIE.Dispose()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "OP = RECIBO DE PAGOS"
Private Sub ImprimirReciboDePagos(CveIE As Integer, CveVenta As Integer)
PDFReciboDePagos(CveVenta, CveIE, -1)
- End Sub
+ End Sub
#End Region
-
+
#Region "OP = VTA - PyME"
-
- ' 04/05/2018 - Pruebas de impresion de factura PyME
+
+ ' 04/05/2018 - Pruebas de impresion de factura PyME
Private Sub GeneraPDFVtaPyMe(Venta As Modelos.Factura, Optional Formato As String = "PDF")
- Dim Directorio1 As String = String.Format("{0}Empresas\{1}\Formatos\Factura.mrt", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)
+ Dim Directorio1 As String = String.Format("{0}Empresas\{1}\Formatos\Factura.mrt", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)
Dim File As FileInfo = New FileInfo(Directorio1)
If File.Exists Then
@@ -3941,7 +3965,7 @@ Partial Class PopUpVerFactura
Else
RegistraScript("alert('No hay un formato de factura predefinido,favor de comunicar a soporte tecnico')")
End If
- End Sub
+ End Sub
#End Region
-
+
End Class
diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb
index 144f2ada6..0d11cf687 100644
--- a/Compras/Proveedores.aspx.vb
+++ b/Compras/Proveedores.aspx.vb
@@ -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(" ", linkDescarga, CveDocumentacionElectronica & "." & extencion)
- Else
- ImgDownLoad.Text = String.Format(" ", linkDescarga, CveDocumentacionElectronica)
- End If
- Else
- ImgDownLoad.Visible = False
- End If
-
- Else
- ImgDownLoad.Visible = False
- End If
-
- If requerido Then
- ImgRequired.Text = " "
- 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(" ", linkDescarga, CveDocumentacionElectronica & "." & extencion)
+ Else
+ ImgDownLoad.Text = String.Format(" ", linkDescarga, CveDocumentacionElectronica)
+ End If
+ Else
+ ImgDownLoad.Visible = False
+ End If
+
+ Else
+ ImgDownLoad.Visible = False
+ End If
+
+ If requerido Then
+ ImgRequired.Text = " "
+ 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
diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb
index 756b806d6..c75979d6e 100644
--- a/Compras/RepComprasAFDetalle.aspx.vb
+++ b/Compras/RepComprasAFDetalle.aspx.vb
@@ -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"
diff --git a/Compras/RepCxPPeriodo.aspx.cs b/Compras/RepCxPPeriodo.aspx.cs
index 77b28bbb4..bd3e49f7a 100644
--- a/Compras/RepCxPPeriodo.aspx.cs
+++ b/Compras/RepCxPPeriodo.aspx.cs
@@ -1,4 +1,11 @@
-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 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(" Registro: {0}", DdlUsuarioRegistro.SelectedItem.Text);
string RutaPDF = "";
- string Ruta = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas/{UsuarioActual.CveEmpresa}/";
+ string Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas/{UsuarioActual.CveEmpresa}/";
RutaPDF = $"{Ruta}/Formatos/RepCxPPeriodo.rdlc";
if (!System.IO.File.Exists(RutaPDF))
{
diff --git a/Compras/RepDocumentacionProveedor.aspx.vb b/Compras/RepDocumentacionProveedor.aspx.vb
index d7322024f..5a05ce29e 100644
--- a/Compras/RepDocumentacionProveedor.aspx.vb
+++ b/Compras/RepDocumentacionProveedor.aspx.vb
@@ -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(" ", linkDescarga, CveDocumentacionElectronica & "." & extencion)
Else
ImgDownLoad.Text = String.Format(" ", 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 = $"
Por medio del presente correo se le notifica que el documento {Documentacion} ha sido rechazado por la siguiente causa: {Obserbaciones} por favor ingrese nuevamente al portal y agréguelo nuevamente.
-
Atentamente:
-
Saludos.
"
-
- 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 = $"
Por medio del presente correo se le notifica que el documento {Documentacion} ha sido rechazado por la siguiente causa: {Obserbaciones} por favor ingrese nuevamente al portal y agréguelo nuevamente.
+
Atentamente:
+
Saludos.
"
+
+ 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
diff --git a/Compras/RepGastosFijos.aspx.cs b/Compras/RepGastosFijos.aspx.cs
index 4fdbd1bd7..92265c1dc 100644
--- a/Compras/RepGastosFijos.aspx.cs
+++ b/Compras/RepGastosFijos.aspx.cs
@@ -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))
diff --git a/Compras/RepPagado.aspx.cs b/Compras/RepPagado.aspx.cs
index 8518db5fd..8a9f73844 100644
--- a/Compras/RepPagado.aspx.cs
+++ b/Compras/RepPagado.aspx.cs
@@ -1,4 +1,11 @@
-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 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(" Moneda: {0}", DdlMoneda.SelectedItem.Text);
string RutaPDF = "";
- string Ruta = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas/{UsuarioActual.CveEmpresa}/";
+ string Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas/{UsuarioActual.CveEmpresa}/";
RutaPDF = $"{Ruta}/Formatos/RepRecuperacion.rdlc";
if (!System.IO.File.Exists(RutaPDF))
{
diff --git a/Compras/RepPagadoDetalle.aspx.cs b/Compras/RepPagadoDetalle.aspx.cs
index 242209e3e..aad25717b 100644
--- a/Compras/RepPagadoDetalle.aspx.cs
+++ b/Compras/RepPagadoDetalle.aspx.cs
@@ -1,4 +1,11 @@
-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 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(" Moneda: {0}", DdlMoneda.SelectedItem.Text);
string RutaPDF = "";
- string Ruta = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas/{UsuarioActual.CveEmpresa}/";
+ string Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas/{UsuarioActual.CveEmpresa}/";
RutaPDF = $"{Ruta}/Formatos/RepPagadoDetalle.rdlc";
if (!System.IO.File.Exists(RutaPDF))
{
diff --git a/Compras/RepPagadoPeriodo.aspx.cs b/Compras/RepPagadoPeriodo.aspx.cs
index b533b6280..e8c67c71f 100644
--- a/Compras/RepPagadoPeriodo.aspx.cs
+++ b/Compras/RepPagadoPeriodo.aspx.cs
@@ -1,4 +1,11 @@
-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 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(" Moneda: {0}", DdlMoneda.SelectedItem.Text);
string RutaPDF = "";
- string Ruta = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas/{UsuarioActual.CveEmpresa}/";
+ string Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas/{UsuarioActual.CveEmpresa}/";
RutaPDF = $"{Ruta}/Formatos/RepPagadoPeriodo.rdlc";
if (!System.IO.File.Exists(RutaPDF))
{
diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb
index efd140531..60ee8f5b2 100644
--- a/Compras/eFacturas.aspx.vb
+++ b/Compras/eFacturas.aspx.vb
@@ -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"))
diff --git a/Contabilidad/RegPoliza.aspx.vb b/Contabilidad/RegPoliza.aspx.vb
index 25dbcc116..afeb6b527 100644
--- a/Contabilidad/RegPoliza.aspx.vb
+++ b/Contabilidad/RegPoliza.aspx.vb
@@ -644,11 +644,11 @@ Partial Class RegPoliza
' Excel.Visible = True
' Excel.ScreenUpdating = True
' Excel.DisplayAlerts = True
- ' Dim ArchivoBase As New System.IO.FileInfo(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza.xlsm")
- ' 'ArchivoBase.CopyTo(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & LtlNumeroPoliza.Text.ToString() & ".xlsm", True)
- ' ArchivoBase.CopyTo(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & TxtNumeroPoliza.Text.ToString() & ".xlsm", True)
- ' 'Dim ArchivoTemp As New System.IO.FileInfo(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & LtlNumeroPoliza.Text.ToString() & ".xlsm")
- ' Dim ArchivoTemp As New System.IO.FileInfo(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & TxtNumeroPoliza.Text.ToString() & ".xlsm")
+ ' Dim ArchivoBase As New System.IO.FileInfo(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza.xlsm")
+ ' 'ArchivoBase.CopyTo(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & LtlNumeroPoliza.Text.ToString() & ".xlsm", True)
+ ' ArchivoBase.CopyTo(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & TxtNumeroPoliza.Text.ToString() & ".xlsm", True)
+ ' 'Dim ArchivoTemp As New System.IO.FileInfo(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & LtlNumeroPoliza.Text.ToString() & ".xlsm")
+ ' Dim ArchivoTemp As New System.IO.FileInfo(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & TxtNumeroPoliza.Text.ToString() & ".xlsm")
' Dim Libro As msExcel.Workbook = Excel.Workbooks.Open(ArchivoTemp.FullName, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing)
' Libro.Activate()
@@ -698,8 +698,8 @@ Partial Class RegPoliza
' Hoja.Range("K" & CeldaF & ":K" & CeldaF).Value = TmpDT.SUM("Abono").FormatoNumero
' 'Exportar PDF
- ' 'Dim pdfFileOut As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & LtlNumeroPoliza.Text.ToString() & ".pdf"
- ' Dim pdfFileOut As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & TxtNumeroPoliza.Text.ToString() & ".pdf"
+ ' 'Dim pdfFileOut As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & LtlNumeroPoliza.Text.ToString() & ".pdf"
+ ' Dim pdfFileOut As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & TxtNumeroPoliza.Text.ToString() & ".pdf"
' Dim outputFileName As Object = pdfFileOut
' Dim fileFormat As msExcel.XlFixedFormatType = msExcel.XlFixedFormatType.xlTypePDF
' Libro.ExportAsFixedFormat(fileFormat, outputFileName, missing, missing, missing, missing, missing, missing, missing)
@@ -1742,7 +1742,7 @@ Partial Class RegPoliza
#Region "DESCARGAR E IMPRIMIR LISTADO"
Public Sub DescargarFormato()
- Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\Formatos\FormatoRegPoliza.xlsx"
+ Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoRegPoliza.xlsx"
Dim Archivo As New IO.FileInfo(Directorio)
If Archivo.Exists Then
@@ -1878,7 +1878,7 @@ Partial Class RegPoliza
Private 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", "xls"), "EXCEL", "CSV")
CargarArchivo(Directorio, file.filename, Tipo)
Else
diff --git a/Contabilidad/RepBalanzaComprobacion.aspx.vb b/Contabilidad/RepBalanzaComprobacion.aspx.vb
index 8a2dbb8c7..04f9191b3 100644
--- a/Contabilidad/RepBalanzaComprobacion.aspx.vb
+++ b/Contabilidad/RepBalanzaComprobacion.aspx.vb
@@ -185,7 +185,7 @@ Partial Class Contabilidad_RepBalanzaComprobacion
' Dim style As StringBuilder = New StringBuilder()
' style.Append(" ")
' 'To Export all pages
' 'Gv.AllowPaging = False
diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx.vb b/Contabilidad2/RepBalanzaComprobacion.aspx.vb
index 8d342b12b..8d167ab63 100644
--- a/Contabilidad2/RepBalanzaComprobacion.aspx.vb
+++ b/Contabilidad2/RepBalanzaComprobacion.aspx.vb
@@ -192,7 +192,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
' Dim style As StringBuilder = New StringBuilder()
' style.Append(" ")
' 'To Export all pages
' 'Gv.AllowPaging = False
diff --git a/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb b/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb
index afa88f803..888fb6018 100644
--- a/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb
+++ b/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb
@@ -191,7 +191,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
' Dim style As StringBuilder = New StringBuilder()
' style.Append(" ")
' 'To Export all pages
' 'Gv.AllowPaging = False
diff --git a/Contabilidad2/RepVariacionHaciendaPublica.aspx.vb b/Contabilidad2/RepVariacionHaciendaPublica.aspx.vb
index 666e1b3a0..047d22a3f 100644
--- a/Contabilidad2/RepVariacionHaciendaPublica.aspx.vb
+++ b/Contabilidad2/RepVariacionHaciendaPublica.aspx.vb
@@ -312,7 +312,7 @@ Partial Class AC_RepVariacionHaciendaPublica
' Dim style As StringBuilder = New StringBuilder()
' style.Append(" ")
' 'To Export all pages
' 'Gv.AllowPaging = False
diff --git a/Contratos/CatContratosPlantillas.aspx.vb b/Contratos/CatContratosPlantillas.aspx.vb
index fda7e912b..e2c1ad0ae 100644
--- a/Contratos/CatContratosPlantillas.aspx.vb
+++ b/Contratos/CatContratosPlantillas.aspx.vb
@@ -211,7 +211,7 @@ Partial Class Contratos_CatContratosPlantillas
Return nombreArchivoFormateado
End Function
Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles LbDescargar.Click
- Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\Grales\Formatos\Plantilla.docx"
+ Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\Grales\Formatos\Plantilla.docx"
Dim Archivo As New System.IO.FileInfo(Path)
If Archivo.Exists Then
diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb
index 340a60c83..aae48ff3f 100644
--- a/Contratos/Contrato.aspx.vb
+++ b/Contratos/Contrato.aspx.vb
@@ -1231,10 +1231,10 @@ Partial Class Contratos_Default
'Renombrar archivo
If ViewState("extencion") IsNot Nothing Then
If ViewState("FUrl").ToString.Length > 0 AndAlso ViewState("extencion").ToString.Length > 0 Then
- If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
- Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
+ If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
+ Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
End If
- Ruta = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
+ Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
'ViewState("extencion") = FileExtension
'ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", ViewState("FName").ToString)
@@ -1368,10 +1368,10 @@ Partial Class Contratos_Default
If ViewState("extencion") IsNot Nothing Then
If ViewState("FUrl").ToString.Length > 0 AndAlso ViewState("extencion").ToString.Length > 0 Then
- If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
- Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
+ If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
+ Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
End If
- Ruta = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
+ Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
Try
If File.Exists(String.Format("{0}{1}.{2}", Ruta, CveContrato.ToString, ViewState("extencion").ToString)) Then
@@ -3169,7 +3169,7 @@ Partial Class Contratos_Default
#Region "SUBIR EXCEL"
Public Sub DescargarFormato()
- Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\Formatos\FormatoContrato.xlsx"
+ Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoContrato.xlsx"
Dim Archivo As New IO.FileInfo(Directorio)
If Archivo.Exists Then
Response.Clear()
@@ -3417,7 +3417,7 @@ Partial Class Contratos_Default
Private 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
@@ -3741,7 +3741,7 @@ Partial Class Contratos_Default
#Region " IMPRIMIR DOCUMENTO - SABE "
Public Sub DescarFormato(documento As String)
- Dim PathRoot As String = Server.MapPath("/")
+ Dim PathRoot As String = ModExtensiones.DirectorioBaseEmpresas
Dim PathSource As String
Dim pathDesti As String
diff --git a/Contratos/Contrato.vb b/Contratos/Contrato.vb
index a881fa49b..4adb7f0ae 100644
--- a/Contratos/Contrato.vb
+++ b/Contratos/Contrato.vb
@@ -597,10 +597,10 @@ Partial Class Contratos_Default
'Renombrar archivo
If ViewState("extencion") IsNot Nothing Then
If ViewState("FUrl").ToString.Length > 0 AndAlso ViewState("extencion").ToString.Length > 0 Then
- If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
- Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
+ If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
+ Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
End If
- Ruta = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
+ Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
'ViewState("extencion") = FileExtension
'ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", ViewState("FName").ToString)
@@ -643,10 +643,10 @@ Partial Class Contratos_Default
If ViewState("extencion") IsNot Nothing Then
If ViewState("FUrl").ToString.Length > 0 AndAlso ViewState("extencion").ToString.Length > 0 Then
- If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
- Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
+ If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos") Then
+ Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos")
End If
- Ruta = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
+ Ruta = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Contratos\"
Try
If File.Exists(String.Format("{0}{1}.{2}", Ruta, CveContrato.ToString, ViewState("extencion").ToString)) Then
@@ -698,10 +698,10 @@ Partial Class Contratos_Default
UpGral.Update()
ObjContratos.Dispose()
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region "INICIO DE PAGINA"
Protected Sub DdlTipoContrato_SelectedIndexChanged(sender As Object, e As EventArgs)
@@ -792,33 +792,33 @@ Partial Class Contratos_Default
UpGral.Update()
UPTipo.Update()
- End Sub
-
+ End Sub
+
#End Region
-
-
+
+
#Region "TAB INFORMACION GENERAL"
-
- 'Protected Sub CargarArchivo(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AFU.UploadedComplete
- ' If AFU.HasFile Then
- ' If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp") Then
- ' Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp")
- ' End If
- ' Dim UploadFolder As String = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\"
- ' Dim Extension As String = System.IO.Path.GetExtension(AFU.PostedFile.FileName)
-
- ' If System.IO.File.Exists(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension) Then
- ' System.IO.File.Delete(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension)
- ' End If
-
- ' AFU.SaveAs(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension)
- ' Session("FileUpload") = UploadFolder & UsuarioActual.CveUsuario.ToString & Extension
- ' Session("FileExtension") = Extension
- ' Session("FileFolder") = UploadFolder
- ' End If
- 'End Sub
-
-
+
+ 'Protected Sub CargarArchivo(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AFU.UploadedComplete
+ ' If AFU.HasFile Then
+ ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp") Then
+ ' Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp")
+ ' End If
+ ' Dim UploadFolder As String = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\"
+ ' Dim Extension As String = System.IO.Path.GetExtension(AFU.PostedFile.FileName)
+
+ ' If System.IO.File.Exists(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension) Then
+ ' System.IO.File.Delete(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension)
+ ' End If
+
+ ' AFU.SaveAs(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension)
+ ' Session("FileUpload") = UploadFolder & UsuarioActual.CveUsuario.ToString & Extension
+ ' Session("FileExtension") = Extension
+ ' Session("FileFolder") = UploadFolder
+ ' End If
+ 'End Sub
+
+
#Region "COMBOS - INFO GENERAL"
Private Sub CargaProyecto()
If UsuarioActual.Empresa.GralSoloProyecto Then
@@ -1946,7 +1946,7 @@ Partial Class Contratos_Default
#Region "SUBIR EXCEL"
Public Sub DescargarFormato()
- Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\Formatos\FormatoContrato.xlsx"
+ Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoContrato.xlsx"
Dim Archivo As New IO.FileInfo(Directorio)
If Archivo.Exists Then
Response.Clear()
@@ -2143,7 +2143,7 @@ Partial Class Contratos_Default
Private 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
diff --git a/Contratos/ContratosSecciones.aspx.vb b/Contratos/ContratosSecciones.aspx.vb
index d8ffe2c0b..72aaba93d 100644
--- a/Contratos/ContratosSecciones.aspx.vb
+++ b/Contratos/ContratosSecciones.aspx.vb
@@ -442,7 +442,7 @@ Partial Class Contratos_ContratosSecciones
- dbLayer = Mapa.AddLayer(AppDomain.CurrentDomain.BaseDirectory & "GIS\Carretera.tab")
+ dbLayer = Mapa.AddLayer(ModExtensiones.DirectorioBaseEmpresas & "GIS\Carretera.tab")
If dbLayer IsNot Nothing AndAlso DtDatos IsNot Nothing Then
If (Not dbLayer.AddRelate("ID_GIS", DtDatos, "ID_GIS")) Then
diff --git a/CxC/RepCxCPeriodo.aspx.cs b/CxC/RepCxCPeriodo.aspx.cs
index 541143841..ea4952923 100644
--- a/CxC/RepCxCPeriodo.aspx.cs
+++ b/CxC/RepCxCPeriodo.aspx.cs
@@ -1,4 +1,11 @@
-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 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;
@@ -280,7 +287,7 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas
StrFiltro.AppendFormat(" Clasificación Cliente: {0}", DdlClienteClasificacion.SelectedItem.Text);
string RutaPDF = "";
- string Ruta = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas/{UsuarioActual.CveEmpresa}/";
+ string Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas/{UsuarioActual.CveEmpresa}/";
RutaPDF = $"{Ruta}/Formatos/RepCxCPeriodo.rdlc";
if (!System.IO.File.Exists(RutaPDF))
{
diff --git a/Empresas/Grales/Formatos/EquiposGPS.rdlc b/Empresas/Grales/Formatos/EquiposGPS.rdlc
new file mode 100644
index 000000000..fc62c6c0b
--- /dev/null
+++ b/Empresas/Grales/Formatos/EquiposGPS.rdlc
@@ -0,0 +1,1000 @@
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Usuario:
+ HTML
+
+
+
+
+ HTML
+
+
+
+ =Parameters!NombreUsuario.Value
+ HTML
+
+
+
+
+
+
+ Textbox9
+ 0.0441cm
+ 0.09671cm
+ 0.478cm
+ 17.92498cm
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 0.62012cm
+ 0.22583cm
+ 0cm
+ 17.79586cm
+ 1
+
+
+
+
+
+
+
+
+ 3.65719cm
+
+
+ 3.49856cm
+
+
+ 1.44923cm
+
+
+ 1.99986cm
+
+
+ 2.68423cm
+
+
+ 2.54257cm
+
+
+ 2.19006cm
+
+
+
+
+ 0.58324cm
+
+
+
+
+ true
+ true
+
+
+
+
+ Tipo Dispositivo
+
+
+
+
+
+
+ Textbox22
+
+
+ Silver
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Vehículo
+
+
+
+
+
+
+ Textbox4
+
+
+ Silver
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Modelo
+
+
+
+
+
+
+ Textbox6
+
+
+ Silver
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Serie
+
+
+
+
+
+
+ Textbox14
+
+
+ Silver
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ IMEI
+
+
+
+
+
+
+ Textbox16
+
+
+ Silver
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Número Teléfono
+
+
+
+
+
+
+ Textbox18
+
+
+ Silver
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Fecha Ing
+
+
+
+
+
+
+ Textbox3
+
+
+ Silver
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.58324cm
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!TipoDispositivoDisplay.Value
+
+
+
+
+
+
+ TipoDispositivoDisplay
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Display.Value
+
+
+
+
+
+
+ Display
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Modelo.Value
+
+
+
+
+
+
+ Modelo
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!Serie.Value
+
+
+
+
+
+
+ Serie
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!IMEI.Value
+
+
+
+
+
+
+ IMEI
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!NumeroTelefono.Value
+
+
+
+
+
+
+ NumeroTelefono
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!FechaIng.Value
+
+
+
+
+
+
+ FechaIng
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+
+
+
+
+
+
+ DataSet1
+ 0.79651cm
+ 1.16648cm
+ 18.02169cm
+ 2
+
+
+
+
+
+ 0.86559in
+
+
+ 7.09515in
+
+
+ 2.25008cm
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ =Parameters!NombreEmpresa.Value
+
+
+
+
+
+
+ Textbox1
+ 0.18521cm
+ 2.99389cm
+ 0.6cm
+ 14.02238cm
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ REPORTE SERVICIOS
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Textbox2
+ 1.10271cm
+ 2.99389cm
+ 0.52945cm
+ 14.02238cm
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ External
+ =Parameters!LogoPath.Value
+ FitProportional
+ 0.16285cm
+ 2.22362cm
+ 2.33715cm
+ 2
+
+
+
+
+
+
+
+
+
+
+ 0.97543cm
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ ="Página " & Globals.PageNumber & " de " & Globals.TotalPages
+
+
+
+
+
+
+ Textbox3
+ 0.14641cm
+ 15.77912cm
+ 0.68085cm
+ 2.09233cm
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Usuario:
+
+
+
+
+
+
+ Textbox8
+ 0.14641cm
+ 0.16285cm
+ 0.68085cm
+ 1.60042cm
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!UsuarioImprimio.Value
+
+
+
+
+
+
+ Textbox9
+ 0.14641cm
+ 1.70718cm
+ 0.68085cm
+ 5.14936cm
+ 2
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Fecha Impresión:
+
+
+
+
+
+
+ Textbox10
+ 0.14641cm
+ 6.71543cm
+ 0.68085cm
+ 2.92333cm
+ 3
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Now
+
+
+
+
+
+
+ Textbox11
+ 0.14641cm
+ 9.62465cm
+ 0.68085cm
+ 4.32745cm
+ 4
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 0.0635cm
+ 0.20158cm
+ 0cm
+ 17.82011cm
+ 5
+
+
+
+
+
+
+
+
+
+ 29.7cm
+ 21cm
+ 0.25cm
+ 0.25cm
+ 1cm
+ 1cm
+ 0.13cm
+
+
+ 0
+
+
+
+ System.Data.DataSet
+ /* Local Connection */
+
+ f55ecc33-47ff-4fc5-a233-35ea9bb1f578
+
+
+
+
+
+ DataSet
+ /* Local Query */
+
+
+
+ TipoDispositivoDisplay
+ System.String
+
+
+ Display
+ System.String
+
+
+ Modelo
+ System.String
+
+
+ Serie
+ System.String
+
+
+ IMEI
+ System.String
+
+
+ NumeroTelefono
+ System.String
+
+
+ FechaIng
+ System.String
+
+
+
+ DataSet
+ C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite9\App_Code\DataSet.xsd
+ DataTable1
+
+
+
+
+
+
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ Cm
+ 40c94aad-a12a-44fb-ab0d-ea36a9656792
+
\ No newline at end of file
diff --git a/Empresas/Grales/Formatos/RepCatEtapasProceso.rdlc b/Empresas/Grales/Formatos/RepCatEtapasProceso.rdlc
index d738cd3d9..8ca6204c4 100644
--- a/Empresas/Grales/Formatos/RepCatEtapasProceso.rdlc
+++ b/Empresas/Grales/Formatos/RepCatEtapasProceso.rdlc
@@ -963,10 +963,10 @@
- =Parameters!FechaImpresion.Value
+ =Now
diff --git a/Empresas/Grales/Formatos/RepCatProbabilidadAcercamiento.rdlc b/Empresas/Grales/Formatos/RepCatProbabilidadAcercamiento.rdlc
index cddde8146..3fd92c938 100644
--- a/Empresas/Grales/Formatos/RepCatProbabilidadAcercamiento.rdlc
+++ b/Empresas/Grales/Formatos/RepCatProbabilidadAcercamiento.rdlc
@@ -5,7 +5,7 @@
0.08792cm0cm
- 20.06868cm
+ 19.15246cm
@@ -16,7 +16,7 @@
- 5.89659cm
+ 7.3197cm4.7613cm
@@ -25,10 +25,10 @@
1.60341cm
- 3.72586cm
+ 2.55502cm
- 4.01284cm
+ 2.80719cm
@@ -457,10 +457,10 @@
DataSet1
- 0.36336cm
- 0.06868cm
+ 0.26431cm
+ 0.10583cm1.06771cm
- 20cm
+ 19.04663cm1
@@ -696,9 +696,9 @@
Textbox100.22726cm
- 6.97591cm
+ 7.92841cm0.36335cm
- 2.92333cm
+ 3.55833cm3
@@ -765,10 +765,10 @@
Textbox8
- 0.2202cm
- 9.89924cm
+ 0.22726cm
+ 10.62431cm0.37041cm
- 2.5cm
+ 5.72096cm5
diff --git a/Empresas/Grales/Formatos/TareaDetalle.rdlc b/Empresas/Grales/Formatos/TareaDetalle.rdlc
new file mode 100644
index 000000000..102c6ce27
--- /dev/null
+++ b/Empresas/Grales/Formatos/TareaDetalle.rdlc
@@ -0,0 +1,1561 @@
+
+
+
+
+
+
+
+
+ 5.141cm
+
+
+ 5.71849cm
+
+
+ 8.78465cm
+
+
+
+
+ 0.54708cm
+
+
+
+
+ true
+ true
+
+
+
+
+ Fecha Ingreso
+
+
+
+
+
+
+ Textbox15
+
+
+
+ White
+
+ 1pt
+
+
+ LightGrey
+
+ 1pt
+
+
+ White
+
+ 1pt
+
+ #d3d3d3
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Nombre Usuario
+
+
+
+
+
+
+ Textbox2
+
+
+
+ White
+
+ 1pt
+
+
+ LightGrey
+
+ 1pt
+
+
+ White
+
+ 1pt
+
+ #d3d3d3
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Evento Comentario
+
+
+
+
+
+
+ Textbox1
+
+
+
+ White
+
+ 1pt
+
+
+ LightGrey
+
+ 1pt
+
+
+ White
+
+ 1pt
+
+ #d3d3d3
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.40421cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!FechaIng.Value
+
+
+
+
+
+
+ FechaIng
+
+
+ 2pt
+ 2pt
+ 1pt
+
+
+
+
+
+
+
+ true
+
+
+
+
+ =Fields!NombreUsuario.Value
+
+
+
+
+
+
+ NombreUsuario
+
+
+ 2pt
+ 2pt
+ 1pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!EventoComentario.Value
+
+
+
+
+
+
+ EventoComentario
+
+
+ 2pt
+ 2pt
+ 1pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+ true
+ true
+
+
+
+
+
+
+ DataSet1
+ 8.14599cm
+ 0.20219cm
+ 0.95129cm
+ 19.64415cm
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Asunto:
+
+
+
+
+
+
+ Textbox2
+ 0.42691cm
+ 0.33722cm
+ 0.67938cm
+ 4.00812cm
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Asunto.Value
+
+
+
+
+
+
+ Asunto
+ 0.42691cm
+ 4.34534cm
+ 0.67938cm
+ 11.71922cm
+ 2
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Descripción:
+
+
+
+
+
+
+ Textbox2
+ 1.14157cm
+ 0.33722cm
+ 0.67938cm
+ 4.00812cm
+ 3
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Descripcion.Value
+
+
+
+
+
+
+ Descripcion
+ 1.14157cm
+ 4.34534cm
+ 0.67938cm
+ 11.71922cm
+ 4
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ De
+
+
+
+
+
+
+ Textbox2
+ 2.44518cm
+ 0.33722cm
+ 0.67938cm
+ 2.42062cm
+ 5
+
+
+ #e0e0e0
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ C.C. Para
+
+
+
+
+
+
+ Textbox2
+ 3.94858cm
+ 0.33722cm
+ 0.67938cm
+ 2.42062cm
+ 6
+
+
+ #e0e0e0
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Para:
+
+
+
+
+
+
+ Textbox2
+ 3.19512cm
+ 0.33722cm
+ 0.67938cm
+ 2.42062cm
+ 7
+
+
+ #e0e0e0
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!De.Value
+
+
+
+
+
+
+ Textbox11
+ 2.44518cm
+ 2.8284cm
+ 0.67938cm
+ 9.47089cm
+ 8
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Para.Value
+
+
+
+
+
+
+ Textbox11
+ 3.19512cm
+ 2.8284cm
+ 0.67938cm
+ 9.47089cm
+ 9
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!CCPara.Value
+
+
+
+
+
+
+ Textbox11
+ 3.94858cm
+ 2.8284cm
+ 0.67938cm
+ 9.47089cm
+ 10
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Fecha Inicio:
+
+
+
+
+
+
+ Textbox14
+ 2.44518cm
+ 12.40512cm
+ 0.6cm
+ 3.71708cm
+ 11
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!FechaInicio.Value
+
+
+
+
+
+
+ Textbox15
+ 3.04871cm
+ 12.40512cm
+ 0.6cm
+ 3.71708cm
+ 12
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Fecha Fin:
+
+
+
+
+
+
+ Textbox14
+ 2.44518cm
+ 16.12926cm
+ 0.6cm
+ 3.71708cm
+ 13
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!FechaFin.Value
+
+
+
+
+
+
+ Textbox15
+ 3.04871cm
+ 16.12926cm
+ 0.6cm
+ 3.71708cm
+ 14
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Prioridad:
+
+
+
+
+
+
+ Textbox18
+ 3.82158cm
+ 12.40512cm
+ 0.6cm
+ 3.71708cm
+ 15
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Prioridad.Value
+
+
+
+
+
+
+ Textbox19
+ 4.42158cm
+ 12.40512cm
+ 0.6cm
+ 3.71708cm
+ 16
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Tema:
+
+
+
+
+
+
+ Textbox18
+ 3.82158cm
+ 16.12926cm
+ 0.6cm
+ 3.71708cm
+ 17
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Tema.Value
+
+
+
+
+
+
+ Textbox19
+ 4.42158cm
+ 16.12926cm
+ 0.6cm
+ 3.71708cm
+ 18
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Estatus:
+
+
+
+
+
+
+ Textbox22
+ 5.53337cm
+ 0.33722cm
+ 0.75875cm
+ 2.5cm
+ 19
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Estatus.Value
+
+
+
+
+
+
+ Estatus
+ 5.53337cm
+ 2.8284cm
+ 0.75875cm
+ 4.27271cm
+ 20
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Fecha Registró:
+
+
+
+
+
+
+ Textbox24
+ 5.53337cm
+ 12.40512cm
+ 0.6cm
+ 3.71708cm
+ 21
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!FechaRegistro.Value
+
+
+
+
+
+
+ Textbox25
+ 6.14395cm
+ 12.40512cm
+ 0.6cm
+ 3.71708cm
+ 22
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Registró:
+
+
+
+
+
+
+ Textbox26
+ 5.53337cm
+ 16.12926cm
+ 0.6cm
+ 3.7453cm
+ 23
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!Registro.Value
+
+
+
+
+
+
+ Textbox27
+ 6.14395cm
+ 16.12926cm
+ 0.6cm
+ 3.7453cm
+ 24
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Registro de actividades
+
+
+
+
+
+
+
+
+
+
+
+
+ 0cm
+ 0cm
+
+
+
+ Textbox21
+ 7.30081cm
+ 0.20219cm
+ 0.65997cm
+ 4.88667cm
+ 25
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 4.05733in
+
+
+ 7.82463in
+
+
+ 3.07057cm
+ true
+ true
+
+
+ External
+ =Parameters!Logo.Value
+ FitProportional
+ 0.15346cm
+ 0.20219cm
+ 2.63137cm
+ 4.43688cm
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!NombreEmpresa.Value
+
+
+
+
+
+
+ NombreEmpresa
+ 0.15346cm
+ 7.31948cm
+ 1.31438cm
+ 5.19875cm
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Detalle de Tarea
+
+
+
+
+
+
+ Textbox3
+ 1.92617cm
+ 7.31948cm
+ 0.85866cm
+ 5.19875cm
+ 2
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 3.00001cm
+ 0.20219cm
+ 0cm
+ 19.64415cm
+ 3
+
+
+
+
+
+
+
+
+
+
+ 1.86619cm
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ Usuario Imprimio:
+
+
+
+
+
+
+ Textbox28
+ 0.43124cm
+ 0.20219cm
+ 0.49417cm
+ 2.84937cm
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!UsuarioImprimio.Value
+
+
+
+
+
+
+ UsuarioImprimio
+ 0.78994cm
+ 0.20219cm
+ 0.49417cm
+ 4.27271cm
+ 1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Fecha Impresión:
+
+
+
+
+
+
+ Textbox10
+ 0.43124cm
+ 8.0074cm
+ 0.49417cm
+ 3.55833cm
+ 2
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Now
+
+
+
+
+
+
+ Textbox8
+ 0.78994cm
+ 8.01798cm
+ 0.37041cm
+ 5.72096cm
+ 3
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ ="Página " & Globals.PageNumber & " de " & Globals.TotalPages
+
+
+
+
+
+
+ Textbox3
+ 0.49389cm
+ 17.78047cm
+ 0.36335cm
+ 2.06587cm
+ 4
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ 0.17639cm
+ 0.23041cm
+ 0cm
+ 19.64415cm
+ 5
+
+
+
+
+
+
+
+
+
+ 27.94cm
+ 21.59cm
+ 0.5cm
+ 0cm
+ 0.5cm
+ 1cm
+ 0.13cm
+
+
+ 0
+
+
+
+ System.Data.DataSet
+ /* Local Connection */
+
+ db271139-498f-42f1-b0bc-9c6d57014da7
+
+
+
+
+
+ DataSet
+ /* Local Query */
+
+
+
+ FechaIng
+ System.String
+
+
+ NombreUsuario
+ System.String
+
+
+ EventoComentario
+ System.String
+
+
+
+ DataSet
+ C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite3\App_Code\DataSet.xsd
+ DataTable1
+
+
+
+
+
+
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ Cm
+ 1d5d9525-4bdd-4783-9df6-cce93069c30f
+
\ No newline at end of file
diff --git a/GPS/CatDistribuidoresMaster.aspx.vb b/GPS/CatDistribuidoresMaster.aspx.vb
index 5aa24c6f5..6b7de01b6 100644
--- a/GPS/CatDistribuidoresMaster.aspx.vb
+++ b/GPS/CatDistribuidoresMaster.aspx.vb
@@ -99,8 +99,8 @@ Partial Class GPS_CatDistribuidoresMaster
'If CveSucursal < 0 Then HuboError = True
End If
If Not HuboError Then
- If Not IO.Directory.Exists(String.Format("{0}\{1}", AppDomain.CurrentDomain.BaseDirectory, objEmpresa.CveEmpresa)) Then
- IO.Directory.CreateDirectory(String.Format("{0}Empresas\{1}", AppDomain.CurrentDomain.BaseDirectory, objEmpresa.CveEmpresa))
+ If Not IO.Directory.Exists(String.Format("{0}\{1}", ModExtensiones.DirectorioBaseEmpresas, objEmpresa.CveEmpresa)) Then
+ IO.Directory.CreateDirectory(String.Format("{0}Empresas\{1}", ModExtensiones.DirectorioBaseEmpresas, objEmpresa.CveEmpresa))
End If
Alert("El distribuidor se agregó correctamente", TipoMensaje.MsgInformacion)
End If
@@ -198,7 +198,7 @@ Partial Class GPS_CatDistribuidoresMaster
Dim archivos As New List(Of ClsSisMail.ArchivoMail)
Dim ListArchivoMail As New List(Of ClsSisMail.ArchivoMail)
Dim ArchivoMail As New ClsSisMail.ArchivoMail
- ArchivoMail.Ruta = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\Grales\LogoSinFondo.png"
+ ArchivoMail.Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\Grales\LogoSinFondo.png"
ArchivoMail.NombreArchivo = "LogoSinFondo.png"
ListArchivoMail.Add(ArchivoMail)
objMail.SendMail(ClsPaginas.EmpresaNotificaciones, TxtMail.Text, "Activación de empresa", body, "", ListArchivoMail)
@@ -246,7 +246,7 @@ Partial Class GPS_CatDistribuidoresMaster
strBody.Append("
Se ha registrado como distribuidor master en SIG GPS
")
diff --git a/GPS/CatDistribuidoresMaster.aspx.vb.exclude b/GPS/CatDistribuidoresMaster.aspx.vb.exclude
index c9dfe18a3..c7d77b3b1 100644
--- a/GPS/CatDistribuidoresMaster.aspx.vb.exclude
+++ b/GPS/CatDistribuidoresMaster.aspx.vb.exclude
@@ -96,8 +96,8 @@ Partial Class GPS_CatDistribuidoresMaster
If CveSucursal < 0 Then HuboError = True
End If
If Not HuboError Then
- If Not IO.Directory.Exists(String.Format("{0}\{1}", AppDomain.CurrentDomain.BaseDirectory, objEmpresa.CveEmpresa)) Then
- IO.Directory.CreateDirectory(String.Format("{0}Empresas\{1}", AppDomain.CurrentDomain.BaseDirectory, objEmpresa.CveEmpresa))
+ If Not IO.Directory.Exists(String.Format("{0}\{1}", ModExtensiones.DirectorioBaseEmpresas, objEmpresa.CveEmpresa)) Then
+ IO.Directory.CreateDirectory(String.Format("{0}Empresas\{1}", ModExtensiones.DirectorioBaseEmpresas, objEmpresa.CveEmpresa))
End If
Alert("El distribuidor se agregó correctamente", TipoMensaje.MsgInformacion)
End If
@@ -195,7 +195,7 @@ Partial Class GPS_CatDistribuidoresMaster
Dim archivos As New List(Of ClsSisMail.ArchivoMail)
Dim ListArchivoMail As New List(Of ClsSisMail.ArchivoMail)
Dim ArchivoMail As New ClsSisMail.ArchivoMail
- ArchivoMail.Ruta = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\Grales\LogoSinFondo.png"
+ ArchivoMail.Ruta = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\Grales\LogoSinFondo.png"
ArchivoMail.NombreArchivo = "LogoSinFondo.png"
ListArchivoMail.Add(ArchivoMail)
objMail.SendMail(ClsPaginas.EmpresaNotificaciones, TxtMail.Text, "Activación de empresa", body, "", ListArchivoMail)
@@ -243,7 +243,7 @@ Partial Class GPS_CatDistribuidoresMaster
strBody.Append("
Se ha registrado como distribuidor master en SIG GPS
")
diff --git a/GPS/CatEventos.aspx.vb b/GPS/CatEventos.aspx.vb
index dc46e72c6..0c19d4965 100644
--- a/GPS/CatEventos.aspx.vb
+++ b/GPS/CatEventos.aspx.vb
@@ -109,7 +109,7 @@ Partial Class GPS_CatEventos
Try
If TxtUpImagen.getfiles().Archivos.Count > 0 Then
Dim ArchivoImagen As Archivo = TxtUpImagen.getfiles().Archivos(0)
- Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}Imagenes"
+ Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}Imagenes"
If Not Directory.Exists(Path) Then
Directory.CreateDirectory(Path)
End If
@@ -122,7 +122,7 @@ Partial Class GPS_CatEventos
If TxtUpSonido.getfiles().Archivos.Count > 0 Then
Dim ArchivoSonido As Archivo = TxtUpSonido.getfiles().Archivos(0)
- Dim PathSonido As String = $"{AppDomain.CurrentDomain.BaseDirectory}Sonidos"
+ Dim PathSonido As String = $"{ModExtensiones.DirectorioBaseEmpresas}Sonidos"
Dim dirSonido As String = String.Format("{0}\{1}.{2}", PathSonido, Sonido, ArchivoSonido.Extencion)
If File.Exists(dirSonido) Then
My.Computer.FileSystem.DeleteFile(dirSonido)
@@ -146,7 +146,7 @@ Partial Class GPS_CatEventos
Try
If TxtUpImagen.getfiles().Archivos.Count > 0 Then
Dim ArchivoImagen As Archivo = TxtUpImagen.getfiles().Archivos(0)
- Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}Imagenes"
+ Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}Imagenes"
If Not Directory.Exists(Path) Then
Directory.CreateDirectory(Path)
End If
@@ -159,7 +159,7 @@ Partial Class GPS_CatEventos
If TxtUpSonido.getfiles().Archivos.Count > 0 Then
Dim ArchivoSonido As Archivo = TxtUpSonido.getfiles().Archivos(0)
- Dim PathSonido As String = $"{AppDomain.CurrentDomain.BaseDirectory}Sonidos"
+ Dim PathSonido As String = $"{ModExtensiones.DirectorioBaseEmpresas}Sonidos"
Dim dirSonido As String = String.Format("{0}\{1}", PathSonido)
If File.Exists(dirSonido) Then
My.Computer.FileSystem.DeleteFile(dirSonido)
@@ -214,7 +214,7 @@ Partial Class GPS_CatEventos
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.VerticalAlign = VerticalAlign.Middle
e.Row.FCLinkButton("ImgE").CommandArgument = e.Row.DataKey("CveEvento").ToString
- If File.Exists($"{AppDomain.CurrentDomain.BaseDirectory}Sonidos/{e.Row.DataKey("Sonido").ToString}") Then
+ If File.Exists($"{ModExtensiones.DirectorioBaseEmpresas}Sonidos/{e.Row.DataKey("Sonido").ToString}") Then
e.Row.FCLinkButton("PlaySonido").OnClientClick = $"javascript:PlaySonidito('{e.Row.DataKey("Sonido").ToString}');return false;"
Else
e.Row.FCLinkButton("PlaySonido").Visible = False
diff --git a/GPS/DispositivosControles.aspx.vb b/GPS/DispositivosControles.aspx.vb
index 9829b41fe..3f7d901bf 100644
--- a/GPS/DispositivosControles.aspx.vb
+++ b/GPS/DispositivosControles.aspx.vb
@@ -155,7 +155,7 @@ Partial Class GPS_DispositivosControles
If TxtCalibración.getfiles().Archivos.Count > 0 AndAlso CveControl > 0 AndAlso Not huboerror Then
Try
Dim Archivo As Archivo = TxtCalibración.getfiles().Archivos(0)
- Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}TablasCalibracion"
+ Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}TablasCalibracion"
Dim dirSonido As String = String.Format("{0}\{1}.{2}", Path, FormatearNombreArchivo(Archivo.filenameO), Archivo.Extencion)
If File.Exists(dirSonido) Then
My.Computer.FileSystem.DeleteFile(dirSonido)
@@ -226,7 +226,7 @@ Partial Class GPS_DispositivosControles
huboerror = Not GPS.CalibracionDelete(CveControl)
If Not huboerror Then
Dim Archivo As Archivo = TxtCalibración.getfiles().Archivos(0)
- Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}TablasCalibracion"
+ Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}TablasCalibracion"
Dim dirSonido As String = String.Format("{0}\{1}.{2}", Path, FormatearNombreArchivo(Archivo.filenameO), Archivo.Extencion)
If File.Exists(dirSonido) Then
My.Computer.FileSystem.DeleteFile(dirSonido)
@@ -448,7 +448,7 @@ Partial Class GPS_DispositivosControles
End Sub
Protected Sub LbDescargaFormato_Click(sender As Object, e As EventArgs)
- Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\FormatoCalibracion.xlsx"
+ Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\FormatoCalibracion.xlsx"
Dim Archivo As New IO.FileInfo(Directorio)
If Archivo.Exists Then
Response.Clear()
diff --git a/GPS/WizardDispositivos.aspx.cs b/GPS/WizardDispositivos.aspx.cs
index 5715ecf01..d82f32cbb 100644
--- a/GPS/WizardDispositivos.aspx.cs
+++ b/GPS/WizardDispositivos.aspx.cs
@@ -766,7 +766,7 @@ public partial class GPS_WizardDispositivos : ClsPaginas
try
{
Archivo Archivo = TxtCalibracion.getfiles().Archivos[0];
- string Path = $"{AppDomain.CurrentDomain.BaseDirectory}TablasCalibracion";
+ string Path = $"{ModExtensiones.DirectorioBaseEmpresas}TablasCalibracion";
string dirSonido = string.Format(@"{0}\{1}.{2}", Path, FormatearNombreArchivo(Archivo.filenameO), Archivo.Extencion);
if (File.Exists(dirSonido)) { File.Delete(dirSonido); }
File.Move(Archivo.FileUrl, dirSonido);
diff --git a/GPS/WizardModelo.aspx.vb b/GPS/WizardModelo.aspx.vb
index 6be879b52..853e433c9 100644
--- a/GPS/WizardModelo.aspx.vb
+++ b/GPS/WizardModelo.aspx.vb
@@ -521,7 +521,7 @@ Partial Class GPS_WizardModelo
If TxtUpImagen.getfiles().Archivos.Count > 0 Then
Dim ArchivoImagen As Archivo = TxtUpImagen.getfiles().Archivos(0)
Imagen = FormatearNombreArchivo(ArchivoImagen.filenameO)
- Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}Imagenes"
+ Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}Imagenes"
If Not Directory.Exists(Path) Then
Directory.CreateDirectory(Path)
End If
@@ -534,7 +534,7 @@ Partial Class GPS_WizardModelo
If TxtUpSonido.getfiles().Archivos.Count > 0 Then
Dim ArchivoSonido As Archivo = TxtUpSonido.getfiles().Archivos(0)
- Dim PathSonido As String = $"{AppDomain.CurrentDomain.BaseDirectory}Sonidos"
+ Dim PathSonido As String = $"{ModExtensiones.DirectorioBaseEmpresas}Sonidos"
Sonido = FormatearNombreArchivo(ArchivoSonido.filenameO)
Dim dirSonido As String = String.Format("{0}\{1}", PathSonido, Sonido)
If File.Exists(dirSonido) Then
@@ -559,7 +559,7 @@ Partial Class GPS_WizardModelo
If TxtUpImagen.getfiles().Archivos.Count > 0 Then
Dim ArchivoImagen As Archivo = TxtUpImagen.getfiles().Archivos(0)
Imagen = FormatearNombreArchivo(ArchivoImagen.filenameO)
- Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}Imagenes"
+ Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}Imagenes"
If Not Directory.Exists(Path) Then
Directory.CreateDirectory(Path)
End If
@@ -573,7 +573,7 @@ Partial Class GPS_WizardModelo
If TxtUpSonido.getfiles().Archivos.Count > 0 Then
Dim ArchivoSonido As Archivo = TxtUpSonido.getfiles().Archivos(0)
Sonido = FormatearNombreArchivo(ArchivoSonido.filenameO)
- Dim PathSonido As String = $"{AppDomain.CurrentDomain.BaseDirectory}Sonidos"
+ Dim PathSonido As String = $"{ModExtensiones.DirectorioBaseEmpresas}Sonidos"
Dim dirSonido As String = String.Format("{0}\{1}", PathSonido, Sonido)
If File.Exists(dirSonido) Then
My.Computer.FileSystem.DeleteFile(dirSonido)
@@ -661,7 +661,7 @@ Partial Class GPS_WizardModelo
End If
e.Row.VerticalAlign = VerticalAlign.Middle
e.Row.FCLinkButton("ImgE").CommandArgument = e.Row.DataKey("CveEvento").ToString
- If e.Row.DBCampo("Sonido").ToString <> "" AndAlso File.Exists($"{AppDomain.CurrentDomain.BaseDirectory}/Sonidos/{e.Row.DataKey("Sonido").ToString}") Then
+ If e.Row.DBCampo("Sonido").ToString <> "" AndAlso File.Exists($"{ModExtensiones.DirectorioBaseEmpresas}/Sonidos/{e.Row.DataKey("Sonido").ToString}") Then
e.Row.FCLinkButton("PlaySonido").Visible = True
e.Row.FCLinkButton("PlaySonido").OnClientClick = $"javascript:PlaySonidito('{e.Row.DataKey("Sonido").ToString}');return false;"
End If
diff --git a/General/RepPaqueteriasGuias.aspx.cs b/General/RepPaqueteriasGuias.aspx.cs
index 1f3bef5fa..de9a07d40 100644
--- a/General/RepPaqueteriasGuias.aspx.cs
+++ b/General/RepPaqueteriasGuias.aspx.cs
@@ -618,7 +618,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
{
try
{
- FileExtension = System.IO.Path.GetExtension(string.Format("{0}Temp\\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
+ FileExtension = System.IO.Path.GetExtension(string.Format("{0}Temp\\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "");
string rutaDestino = UsuarioActual.Empresa.Ruta + "Documentos\\Guias\\" + CvePaqueteriaGuia + "." + FileExtension;
if (!System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta + "Documentos\\Guias\\"))
{
@@ -773,7 +773,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
string FechIngaFinal = TxtFechaFinalIngreso.Text;
- 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/RepPaqueteriasGuias.rdlc", Ruta);
if (!File.Exists(RutaPDF))
diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb
index d2f4a0026..9eaa492e7 100644
--- a/General/SaldosIniciales.aspx.vb
+++ b/General/SaldosIniciales.aspx.vb
@@ -18,7 +18,7 @@ Partial Class General_SaldosIniciales
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
@@ -2023,25 +2023,25 @@ Partial Class General_SaldosIniciales
Dim Directorio As String = ""
If RblFormato.SelectedValue = "1" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoProveedor.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoProveedor.xlsx"
ElseIf RblFormato.SelectedValue = "2" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoClientes.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoClientes.xlsx"
ElseIf RblFormato.SelectedValue = "3" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoProveedores-Facturas.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoProveedores-Facturas.xlsx"
ElseIf RblFormato.SelectedValue = "4" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoClientes-Facturas.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoClientes-Facturas.xlsx"
ElseIf RblFormato.SelectedValue = "5" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoPS.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoPS.xlsx"
ElseIf RblFormato.SelectedValue = "6" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoRH-Personal.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoRH-Personal.xlsx"
ElseIf RblFormato.SelectedValue = "7" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoAF-ActivosFijos.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoAF-ActivosFijos.xlsx"
ElseIf RblFormato.SelectedValue = "8" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
ElseIf RblFormato.SelectedValue = "9" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
ElseIf RblFormato.SelectedValue = "12" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoAlmacen.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoAlmacen.xlsx"
End If
Dim Archivo As New IO.FileInfo(Directorio)
diff --git a/Global.asax b/Global.asax
index 973a330a8..51e12d39c 100644
--- a/Global.asax
+++ b/Global.asax
@@ -536,8 +536,8 @@
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1") Then
Application("GlobalDTEmpresas") = ObjEmpresas.DtResultados
'verifico si existe la carpeta de la empresa, sino la crea
- For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows
- Dim Ruta As String = String.Format("{0}Empresas\{1}", AppDomain.CurrentDomain.BaseDirectory, dr("CveEmpresa"))
+ For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows
+ Dim Ruta As String = String.Format("{0}Empresas\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa"))
If Not IO.Directory.Exists(Ruta) Then IO.Directory.CreateDirectory(Ruta)
If Not System.IO.Directory.Exists(String.Format("{0}\XML\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\XML\", Ruta))
If Not System.IO.Directory.Exists(String.Format("{0}\PDF\", Ruta)) Then System.IO.Directory.CreateDirectory(String.Format("{0}\PDF\", Ruta))
diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb
index 29ed2e629..266efe3e5 100644
--- a/Inicio.aspx.vb
+++ b/Inicio.aspx.vb
@@ -225,7 +225,7 @@ Partial Class Inicio
Private Sub MuestraComprasPUE()
Dim objCompras As New ClsCompras
Dim FechaInicio As Date = Now.AddYears(-2)
- LblComprasPUE.Text = "Facturas apartir de " & FechaInicio.ToShortDateString
+ LblComprasPUE.Text = "Facturas a partir de: " & FechaInicio.ToShortDateString
If objCompras.GetPUESinPago(FechaInicio, Now, -1, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
If objCompras.DtResultados.Rows.Count > 0 Then
GvCompPUE.DataSource = objCompras.DtResultados
diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx
index e95b81ae4..0b6a8f2a0 100644
--- a/Inventarios/EntradasSalidas.aspx
+++ b/Inventarios/EntradasSalidas.aspx
@@ -146,6 +146,7 @@
");
+ // return strSQL.ToString().Replace("@Estatus@", Estatus).Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema);
+ //}
#endregion
protected void DDlEstatus_SelectedIndexChanged(object sender, EventArgs e)
{
- pnlTerminarPadre.Visible = (DDlEstatus.SelectedValue.ToEntero() > 3 && CveEventoPadre > 0);
+ pnlTerminarPadre.Visible = ((DDlEstatus.SelectedValue.ToEntero() == 3 || DDlEstatus.SelectedValue.ToEntero() == 4) && CveEventoPadre > 0);
}
-}
\ No newline at end of file
+
+ protected void LnkUpVinculo_Click(object sender, EventArgs e)
+ {
+ RegistraScript(string.Format("$('#{0}').modal();", idUpVinculo));
+ }
+
+ protected void DdlViculos_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ int CveVinculo = DdlViculos.SelectedValue.ToEntero();
+ PnlActivoFijo.Visible = (CveVinculo == 1);
+ PnlCliente.Visible = (CveVinculo == 2);
+ PnlPersonal.Visible = (CveVinculo == 3);
+ PnlProveedor.Visible = (CveVinculo == 4);
+ if (PnlActivoFijo.Visible)
+ {
+ ;
+ //using ( ClsAF ObjAF = new ClsAF())
+ //{
+
+ // if (ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", DateTime.Now.Year, -1, -1,-1,-1, "-1",-1))
+ // {
+ // GvActividades.DataSource = ObjAF.DtResultados;
+ // GvActividades.DataBind();
+ // }
+
+ //}
+ }
+ if (PnlCliente.Visible)
+ {
+
+ //using (ClsClientes ObjClientes = new ClsClientes())
+ //{
+ // if (ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1))
+ // {
+ // GvClientes.DataSource = ObjClientes.DtResultados;
+ // GvClientes.DataBind();
+ // }
+ //}
+ }
+ if (PnlPersonal.Visible)
+ {
+
+ using (ClsRH ObjPersonal = new ClsRH())
+ {
+ if (ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) && ObjPersonal.DtResultados.Rows.Count > 0)
+ {
+ DdlPersonal.DataSource = ObjPersonal.DtResultados;
+ }
+ else
+ {
+ DdlPersonal.DataSource = new System.Data.DataTable();
+ }
+ }
+ DdlPersonal.DataBind();
+ DdlPersonal.Items.Insert(0, new ListItem("Seleccione Personal", "-1"));
+ }
+ if (PnlProveedor.Visible)
+ {
+
+ }
+ UpVinculoModal.Update();
+ }
+
+ protected void LnkUpVinculoAF_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ protected void LnkUpVinculoCliente_Click(object sender, EventArgs e)
+ {
+
+ }
+
+
+ protected void LnkEliminar_Click(object sender, EventArgs e)
+ {
+ using (ClsOIEventos ev = new ClsOIEventos())
+ {
+ if (ev.RemoveEvento2(RCveEvento, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario))
+ {
+ Alert("Tarea Eliminada");
+ }
+ }
+ }
+
+ protected void LnkUpRelacion_Click(object sender, EventArgs e)
+ {
+ Alert("ocurrio un error al actualizar lla relación ");
+ }
+}
diff --git a/Planeacion/CargarArchivo.aspx.vb b/Planeacion/CargarArchivo.aspx.vb
index a3dcb58b6..929ee65a1 100644
--- a/Planeacion/CargarArchivo.aspx.vb
+++ b/Planeacion/CargarArchivo.aspx.vb
@@ -1,4 +1,5 @@
Imports System.IO
+Imports Extensiones
Partial Class CargarArchivo
Inherits ClsPaginas
@@ -16,10 +17,10 @@ Partial Class CargarArchivo
Protected Sub AFU_UploadedComplete(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AFU.UploadedComplete
If AFU.HasFile Then
- If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp") Then
- Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp")
+ If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp") Then
+ Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp")
End If
- Dim UploadFolder As String = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\"
+ Dim UploadFolder As String = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\"
Dim Extension As String = System.IO.Path.GetExtension(AFU.PostedFile.FileName)
If System.IO.File.Exists(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension) Then
diff --git a/Planeacion/CargarImagen.aspx.vb b/Planeacion/CargarImagen.aspx.vb
index 1489cc2ba..96af0e798 100644
--- a/Planeacion/CargarImagen.aspx.vb
+++ b/Planeacion/CargarImagen.aspx.vb
@@ -13,10 +13,10 @@ Partial Class CargarImagen
Protected Sub AFU_UploadedComplete(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AFU.UploadedComplete
If AFU.HasFile Then
- If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp") Then
- Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp")
+ If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp") Then
+ Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp")
End If
- Dim UploadFolder As String = Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\"
+ Dim UploadFolder As String = ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\"
Dim Extension As String = System.IO.Path.GetExtension(AFU.PostedFile.FileName)
If System.IO.File.Exists(UploadFolder & UsuarioActual.CveUsuario.ToString & Extension) Then
diff --git a/Planeacion/CatSucursales.aspx.vb b/Planeacion/CatSucursales.aspx.vb
index 70453234c..46146339d 100644
--- a/Planeacion/CatSucursales.aspx.vb
+++ b/Planeacion/CatSucursales.aspx.vb
@@ -105,7 +105,7 @@ Partial Class CatSucursales
e.Row.FCLiteral("LtlFecha").Text = Liga & e.Row.FCLiteral("LtlFecha").Text & ""
e.Row.FCLiteral("LtlUsuario").Text = Liga & e.Row.FCLiteral("LtlUsuario").Text & ""
- If System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\" & e.Row.DBCampo("FormatoFactura")) Then
+ If System.IO.File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\" & e.Row.DBCampo("FormatoFactura")) Then
e.Row.FCLiteral("LtlFormato").Text = "Ver"
Else
e.Row.FCLiteral("LtlFormato").Text = "Cargar Factura"
diff --git a/Planeacion/Sucursal.aspx.vb b/Planeacion/Sucursal.aspx.vb
index 11256efc1..a5844ccba 100644
--- a/Planeacion/Sucursal.aspx.vb
+++ b/Planeacion/Sucursal.aspx.vb
@@ -62,7 +62,7 @@ Partial Class Sucursal
Else
Matriz.Checked = False
End If
- If System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\" & DT.Rows(0)("FormatoFactura").ToString) Then
+ If System.IO.File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\" & DT.Rows(0)("FormatoFactura").ToString) Then
'DirectCast("HLVer", HtmlLink). = "Ver"
End If
diff --git a/PortalCliente/PortalCliente.aspx.vb b/PortalCliente/PortalCliente.aspx.vb
index dbe6c9e10..8712a2117 100644
--- a/PortalCliente/PortalCliente.aspx.vb
+++ b/PortalCliente/PortalCliente.aspx.vb
@@ -359,7 +359,7 @@ Partial Class Ventas_PortalCliente
'Dim ObjEmprea As New ClsEmpresas()
'If ObjEmprea.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
Dim ObjMail As New ClsSisMail()
- Dim Ruta As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
+ Dim Ruta As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\"
If File.Exists(Ruta & "PDF\" & HdnFolioVenta.Value & ".pdf") AndAlso File.Exists(Ruta & "XML\" & HdnFolioVenta.Value & ".xml") Then
Dim PDF As String = Ruta & "PDF\" & HdnFolioVenta.Value & ".pdf"
@@ -1328,11 +1328,11 @@ Partial Class Ventas_PortalCliente
If e.Row.RowIndex >= 0 Then
e.Row.Cells(0).Width = Unit.Pixel(100)
'CARGAR IMAGENES DE PERSONAL
- If File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & e.Row.DBCampo("URL") & ".png") Then
+ If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & e.Row.DBCampo("URL") & ".png") Then
e.Row.FCImage("ImgPersonal").ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & e.Row.DBCampo("URL") & ".png"
End If
- 'If File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & e.Row.DBCampo("URL")) Then
+ 'If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & e.Row.DBCampo("URL")) Then
'e.Row.FCLiteral("LtlImgPersonal").Text = ""
'Else
'e.Row.FCLiteral("LtlImgPersonal").Text = ""
diff --git a/PortalGPS/Penske.aspx.vb b/PortalGPS/Penske.aspx.vb
index 2d4586d4b..5df25f0cd 100644
--- a/PortalGPS/Penske.aspx.vb
+++ b/PortalGPS/Penske.aspx.vb
@@ -95,7 +95,7 @@ Partial Class PortalGPS_Penske
' 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}\LogPenske.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
+ ArchivoW = New StreamWriter(String.Format("{0}\log\LogPenske.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
Catch ex As UnauthorizedAccessException
'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError)
Exit Sub
diff --git a/PortalGPS/ServiciosGPS.aspx.vb b/PortalGPS/ServiciosGPS.aspx.vb
index b59d82da9..d0d8d1aa0 100644
--- a/PortalGPS/ServiciosGPS.aspx.vb
+++ b/PortalGPS/ServiciosGPS.aspx.vb
@@ -66,7 +66,7 @@ Partial Class PortalGPS_ServiciosGPS
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}\LogCanBus.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
+ ArchivoW = New StreamWriter(String.Format("{0}\log\LogCanBus.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
Catch ex As Exception
Exit Sub
End Try
diff --git a/PortalProveedor/PortalProveedor.aspx.vb b/PortalProveedor/PortalProveedor.aspx.vb
index 9b5100c61..74ae350dd 100644
--- a/PortalProveedor/PortalProveedor.aspx.vb
+++ b/PortalProveedor/PortalProveedor.aspx.vb
@@ -2,13 +2,13 @@
Option Strict On
Imports System.Data
-Imports System.IO
+Imports System.IO
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Portal_PortalProveedor
- Inherits ClsPaginas
-
+ Inherits ClsPaginas
+
#Region "PROPIEDADES"
Private Property CveProveedor As Integer
Get
@@ -103,14 +103,14 @@ Partial Class Portal_PortalProveedor
Set(value As DataTable)
ViewState("DTGvAH") = value
End Set
- End Property
-
+ End Property
+
#End Region
-
-#Region " D O C U M E N T A C I O N"
-
-
-
+
+#Region " D O C U M E N T A C I O N"
+
+
+
Property CveDocumentacionElectronica As Integer
Get
If ViewState("CvePersonalClienteDocumentacion") Is Nothing Then
@@ -122,8 +122,8 @@ Partial Class Portal_PortalProveedor
Set(value As Integer)
ViewState("CvePersonalClienteDocumentacion") = value
End Set
- End Property
-
+ End Property
+
Property CveDocumentacion As Integer
Get
If ViewState("CveDocumentacion") Is Nothing Then
@@ -135,8 +135,8 @@ Partial Class Portal_PortalProveedor
Set(value As Integer)
ViewState("CveDocumentacion") = value
End Set
- End Property
-
+ End Property
+
Property Documentacion As String
Get
If ViewState("Documentacion") Is Nothing Then
@@ -148,8 +148,8 @@ Partial Class Portal_PortalProveedor
Set(value As String)
ViewState("Documentacion") = value
End Set
- End Property
-
+ End Property
+
Property AdjuntoDocumentacion As String
Get
If ViewState("AdjuntoDocumentacion") Is Nothing Then
@@ -161,10 +161,10 @@ Partial Class Portal_PortalProveedor
Set(value As String)
ViewState("AdjuntoDocumentacion") = value
End Set
- End Property
-
-
-
+ End Property
+
+
+
Property DiasVigencia As Integer
Get
If ViewState("DiasVigencia") Is Nothing Then
@@ -176,8 +176,8 @@ Partial Class Portal_PortalProveedor
Set(value As Integer)
ViewState("DiasVigencia") = value
End Set
- End Property
-
+ End Property
+
Property AplicaFechaVencimiento As Boolean
Get
If ViewState("AplicaFechaVencimiento") Is Nothing Then
@@ -189,8 +189,8 @@ Partial Class Portal_PortalProveedor
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
@@ -202,8 +202,8 @@ Partial Class Portal_PortalProveedor
Set(value As Date)
ViewState("FechaVigencia") = value
End Set
- End Property
-
+ End Property
+
Property Estatus As Integer
Get
If ViewState("Estatus") Is Nothing Then
@@ -215,8 +215,8 @@ Partial Class Portal_PortalProveedor
Set(value As Integer)
ViewState("Estatus") = value
End Set
- End Property
-
+ End Property
+
Property ObservacionDocumentacion As String
Get
If ViewState("ObservacionDocumentacion") Is Nothing Then
@@ -228,8 +228,8 @@ Partial Class Portal_PortalProveedor
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
@@ -241,11 +241,11 @@ Partial Class Portal_PortalProveedor
Set(value As Date)
ViewState("FechaLimite") = value
End Set
- End Property
-
-
-#End Region
-
+ End Property
+
+
+#End Region
+
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -254,9 +254,9 @@ Partial Class Portal_PortalProveedor
ViewState("Orden") = ""
CargaDatos()
- CargaDocumentacion()
-
- 'CARGAN PESTANIAS SEGUN PERMISOS
+ CargaDocumentacion()
+
+ 'CARGAN PESTANIAS SEGUN PERMISOS
If UsuarioActual.TienePermisoProceso(236) Then ' CARGA TAB HISTORIAL DE VENTAS
TabHistorial.Visible = True
CargaHistorial("-1", 20)
@@ -288,11 +288,11 @@ Partial Class Portal_PortalProveedor
If UsuarioActual.CvePlataforma = 7 Then TabContraseña.Visible = True
End If
- End Sub
-
-
+ End Sub
+
+
#Region "C A R G A - D A T O S"
-
+
Protected Sub CargaDatos()
GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimero($"CveProveedor = {CveProveedor}")
Dim ObjProveedor As New ClsCompProveedores()
@@ -310,8 +310,8 @@ Partial Class Portal_PortalProveedor
End If
ObjProveedor.Dispose()
- End Sub
-
+ End Sub
+
#Region "CARGA GRIDS"
Private Sub CargaHistorial(SerieSucursal As String, SelectTop As Integer)
Dim ObjProveedores As New ClsCompProveedores()
@@ -449,9 +449,9 @@ Partial Class Portal_PortalProveedor
GvBancosCuentas.DataBind()
UpCuentasBancos.Update()
- End Sub
+ End Sub
#End Region
-
+
#Region "ROW DATA BOUND"
Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -574,7 +574,7 @@ Partial Class Portal_PortalProveedor
Protected Sub GvBancos_comprobante(sender As Object, e As EventArgs)
Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- Dim Path As String = String.Format("{0}{1}{2}{3}{4}{5}", AppDomain.CurrentDomain.BaseDirectory, "Empresas\", UsuarioActual.CveEmpresa, "\IE\", Gvr.FCHiddenField("CveIe").Value, ".png")
+ Dim Path As String = String.Format("{0}{1}{2}{3}{4}{5}", ModExtensiones.DirectorioBaseEmpresas, "Empresas\", UsuarioActual.CveEmpresa, "\IE\", Gvr.FCHiddenField("CveIe").Value, ".png")
Dim Archivo As New System.IO.FileInfo(Path)
If Archivo.Exists Then
@@ -589,13 +589,13 @@ Partial Class Portal_PortalProveedor
End If
Archivo = Nothing
Alert("No se encontro el documento")
- End Sub
+ End Sub
#End Region
-
-
+
+
#End Region
-
-
+
+
#Region " BTNS VER MÁS"
Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs)
@@ -647,289 +647,289 @@ Partial Class Portal_PortalProveedor
GvCxPHistorial.DataBind()
' UpDatos.Update()
- End Sub
-
+ End Sub
+
#End Region
-
-
+
+
#Region "Usuarios Portal"
-
- 'Private Sub CargaUsuariosPortal()
- ' Dim ObjUsrs As New ClsSisUsuarios()
- ' If ObjUsrs.GetUsuariosPortal(-1, -1, CveProveedor) Then
- ' Dim dtUsr As DataTable = ObjUsrs.DtResultados
- ' 'Dim dr As DataRow = dtUsr.FiltroPrimero(String.Format("CveUsuario = {0}", UsuarioActual.CveUsuario))
- ' 'If dr IsNot Nothing Then
-
- ' ' If True Then TabHistorial.Visible = True 'dr("Permiso1").ToString = "True"
- ' ' If True Then TabCxP.Visible = True
- ' ' If True Then TabAnticipos.Visible = True
- ' ' If True Then TabBancos.Visible = True
- ' ' If True Then TabSistema.Visible = True
-
- ' 'End If
-
- ' 'dtUsr = dtUsr '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
-
- ' ViewState("OrdenUsuarios") = ""
- ' GvUsuariosPortal.DataSource = dtUsr
- ' ViewState("DTUsuariosProveedor") = dtUsr
- ' Else
- ' GvUsuariosPortal.DataSource = Nothing
- ' ViewState("DTUsuariosProveedor") = Nothing
- ' End If
- ' ObjUsrs.Dispose()
- ' GvUsuariosPortal.DataBind()
- 'End Sub
-
-
- 'Private Sub CargaGridUsuarios(Orden As String)
- ' If CType(ViewState("DTUsuariosProveedor"), DataTable).Rows.Count > 0 Then
- ' If Orden <> String.Empty Then
- ' Dim DV As New DataView(CType(ViewState("DTUsuariosProveedor"), DataTable), "", Orden, DataViewRowState.CurrentRows)
- ' GvUsuariosPortal.DataSource = DV.ToTable() '.FiltraParametros("Nombre <> 'Administrador' AND CveUsuario <> " & UsuarioActual.CveUsuario)
- ' DV.Dispose()
- ' Else
- ' GvUsuariosPortal.DataSource = CType(ViewState("DTUsuariosProveedor"), DataTable) '.FiltraParametros("Nombre <> 'Administrador' AND CveUsuario <> " & UsuarioActual.CveUsuario)
- ' End If
- ' End If
- ' GvUsuariosPortal.DataBind()
- ' UPPUsuarios.Update()
- 'End Sub
-
- ''ajustar el tamaño de las celdas de la GvUsuarios Portal
- 'Protected Sub GvUsuariosPortal_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvUsuariosPortal.RowDataBound
- ' If e.Row.RowType = DataControlRowType.DataRow Then
-
- ' 'El usuario Admin no se puede editar ni eliminar
- ' If e.Row.DataKey("Nombre") = "Admin" Then
- ' e.Row.FCLinkButton("imgE").Visible = False
- ' e.Row.FCLinkButton("imgD").Visible = False
- ' e.Row.FCLinkButton("imgC").Visible = False
- ' End If
-
- ' If e.Row.RowIndex = 0 Then
- ' '' e.Row.Cells(0).Width = Unit.Pixel(120)
- ' 'e.Row.Cells(0).Width = Unit.Pixel(120)
- ' 'e.Row.Cells(1).Width = Unit.Pixel(150)
- ' 'e.Row.Cells(2).Width = Unit.Pixel(55)
- ' 'e.Row.Cells(3).Width = Unit.Pixel(55)
- ' 'e.Row.Cells(4).Width = Unit.Pixel(55)
- ' 'e.Row.Cells(5).Width = Unit.Pixel(55)
- ' 'e.Row.Cells(6).Width = Unit.Pixel(55)
- ' 'e.Row.Cells(7).Width = Unit.Pixel(55)
-
- ' 'e.Row.Cells(8).Width = Unit.Pixel(75)
- ' 'e.Row.Cells(9).Width = Unit.Pixel(100)
- ' 'e.Row.Cells(10).Width = Unit.Pixel(150)
- ' End If
- ' End If
- 'End Sub
-
- ''Editar usuarios
- 'Protected Sub GvUsuariosPortal_RowEditing(ByVal sender As Object, ByVal e As GridViewEditEventArgs) Handles GvUsuariosPortal.RowEditing
- ' GvUsuariosPortal.EditIndex = e.NewEditIndex
- ' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
- ' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
- ' Else
- ' CargaGridUsuarios("")
- ' End If
- 'End Sub
-
- 'Protected Sub GvUsuariosPortal_RowUpdating(ByVal sender As Object, ByVal e As GridViewUpdateEventArgs) Handles GvUsuariosPortal.RowUpdating
- ' Dim ObjUsuario As New ClsSisUsuarios
- ' Dim Nombre, Correo As String
- ' Dim Estatus As Boolean
- ' Dim gvr As GridViewRow = GvUsuariosPortal.Rows(e.RowIndex)
-
- ' 'Usuario = gvr.FCLiteral("LtlUUsuario").Text.Trim
- ' Nombre = gvr.FCTextBox("TxtUsuarioPortalEdit").Text.Trim
- ' Correo = gvr.FCTextBox("TxtCorreoEdit").Text.Trim
- ' Estatus = gvr.FCCheckBox("ChkEstatus").Checked
-
- ' Dim CveUsuarioPortal As Integer = gvr.DataKey("CveUsuario").ToEntero
- ' Dim pCveProveedor As Integer = gvr.DataKey("CveProveedor").ToEntero
-
- ' If ObjUsuario.UpdateUsuarioPortal(Correo, Nombre, Correo, Estatus, "-1", -1, CveProveedor, CveUsuarioPortal, UsuarioActual.CveUsuario) Then
- ' GvUsuariosPortal.EditIndex = -1
- ' ObjUsuario.GetUsuariosPortal(-1, -1, CveProveedor) '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
- ' ViewState("DTUsuariosProveedor") = ObjUsuario.DtResultados
- ' End If
- ' ObjUsuario.Dispose()
-
- ' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
- ' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
- ' Else
- ' CargaGridUsuarios("")
- ' End If
-
- 'End Sub
-
- ''Cancelar Edición
- 'Protected Sub GvUsuariosPortal_RowCancelingEdit(ByVal sender As Object, ByVal e As GridViewCancelEditEventArgs) Handles GvUsuariosPortal.RowCancelingEdit
- ' GvUsuariosPortal.EditIndex = -1
- ' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
- ' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
- ' Else
- ' CargaGridUsuarios("")
- ' End If
- 'End Sub
-
- ''Restablecer contraseña
- 'Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand
-
- ' If e.CommandName = "RestablecerContraseña" Then
- ' Dim cveUsuarioPortal As Integer = e.CommandArgument.ToString.ToEntero
- ' Dim Usuario As New ClsSisUsuarios
- ' If Usuario.GetUsuariosPortal(cveUsuarioPortal, -1, -1) Then
- ' Dim dr As DataRow = Usuario.DtResultados.FiltroPrimero("")
-
- ' If Usuario.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString, dr("Correo").ToString, CType(dr("Estatus"), Boolean), ContraseñaPredeterminadaEncriptada, -1, CveProveedor, cveUsuarioPortal, UsuarioActual.CveUsuario) Then
- ' GvUsuariosPortal.EditIndex = -1
- ' ViewState("DTUsuariosProveedor") = Usuario.DtResultados '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
- ' Alert("Contraseña Restablecida. La nueva contraseña es: """ & ContraseñaPredeterminada & "")
- ' End If
- ' End If
- ' Usuario.Dispose()
- ' End If
-
- ' If e.CommandName = "ReenviarCorreo" Then
- ' Dim cveUsuarioPortal As Integer = e.CommandArgument.ToString.ToEntero
- ' Dim Usuario As New ClsSisUsuarios
- ' Usuario.IniciaTransacSQL()
- ' Dim TieneError = False
-
- ' If Usuario.GetUsuariosPortal(cveUsuarioPortal, -1, -1) Then
- ' Dim dr As DataRow = Usuario.DtResultados.FiltroPrimero("")
-
- ' 'ACTUALIZA USUARIO, CONTRASEÑA Y ESTATUS
- ' If Not Usuario.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString, dr("Correo").ToString, True, ContraseñaPredeterminadaEncriptada, -1, CveProveedor, cveUsuarioPortal, UsuarioActual.CveUsuario) Then
- ' TieneError = True
- ' Alert("Ocurrió un error al actualizar el usuario. Por favor vuelva a intentar.", TipoMensaje.MsgError)
- ' End If
-
- ' 'MANDA CORREO ACTIVACION
- ' If Not TieneError Then
- ' Dim ObjParametro As SisParametro = GlobalDTParametros(SisParametros.URL)
- ' Dim Liga As String = ObjParametro.Cadena1 & "LogIn.aspx"
- ' Dim LigaActivar = Liga & "?p=" & Encripta("CveU=" & cveUsuarioPortal & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks & "&CveE=" & UsuarioActual.CveEmpresa)
-
- ' Dim ObjMail As New ClsSisMail()
-
- ' If dr("Correo").ToString <> "" Then
- ' Dim Correos As String() = dr("Correo").ToString.Split(New Char() {";"c})
- ' Dim Texto = ""
- ' For Each Correo As String In Correos
- ' Texto = String.Format("Direccion de Acceso: Portal del Proveedor Usuario: {2} Haga click para activar su cuenta Activar", Liga, CveProveedor, dr("Usuario").ToString, LigaActivar)
- ' 'If Not ObjMail.MandaCorreo(EmpresaNotificaciones, Correo, "Activación de cuenta", "", "", {""}, Texto) Then
- ' If Not ObjMail.SendMail(EmpresaNotificaciones, Correo, "Activación de cuenta", Texto) Then
- ' Alert("Error al mandar el correo. Por favor vuelva a intentar", TipoMensaje.MsgError)
- ' TieneError = True
- ' Exit For
- ' End If
- ' Next
-
- ' Else
- ' Alert("No se ha registrado ningún correo al usuario.", TipoMensaje.MsgAdvertencia)
- ' TieneError = True
- ' End If
- ' End If
-
- ' If Not TieneError Then
- ' Usuario.Commit()
- ' ViewState("DTUsuariosProveedor") = Usuario.DtResultados
- ' Alert(String.Format("Se envio correo al usuario y se restablecio contraseña . La nueva contraseña es: ""{0}""", ContraseñaPredeterminada), TipoMensaje.MsgInformacion)
- ' Else
- ' Usuario.RollBack()
- ' End If
-
- ' End If
- ' Usuario.Dispose()
- ' End If
-
- 'End Sub
-
- ''Eliminar Usuarios
- 'Protected Sub GvUsuariosPortal_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GvUsuariosPortal.RowDeleting
- ' Dim Usuario As New ClsSisUsuarios
- ' If Usuario.RemoveUsuarioPortal(GvUsuariosPortal.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then
- ' GvUsuariosPortal.EditIndex = -1
- ' ViewState("DTUsuariosProveedor") = Usuario.DtResultados
- ' End If
- ' Usuario.Dispose()
- ' Alert("Usuario Eliminado")
- ' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
- ' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
- ' Else
- ' CargaGridUsuarios("")
- ' End If
- 'End Sub
-
- ''Agregar Usuario
- 'Protected Sub LnkAgregarUsuario_Click(sender As Object, e As EventArgs) Handles LnkAgregarUsuario.Click
- ' Dim ObjUsuario As New ClsSisUsuarios
- ' Dim CvePlataforma As Integer = 7
-
- ' ObjUsuario.IniciaTransacSQL()
-
- ' Dim CveUsuario As Integer = ObjUsuario.AddUsuarioPortal(TxtCorreo.Text.Trim, ContraseñaPredeterminadaEncriptada, TxtNombrePortal.Text.Trim, TxtCorreo.Text.Trim, -1, CveProveedor, CvePlataforma, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
-
- ' If CveUsuario > 0 Then
- ' If ObjUsuario.UpdateUsuariosModulos(CveUsuario, 1201, True, UsuarioActual.CveUsuario) Then
- ' If ObjUsuario.GetUsuariosPortal(-1, -1, CveProveedor) Then
- ' ViewState("DTUsuariosProveedor") = ObjUsuario.DtResultados.FiltraParametros("Nombre <> 'Admin' AND CveUsuario <> " & UsuarioActual.CveUsuario)
- ' End If
-
- ' TxtNombrePortal.Text = ""
- ' TxtCorreo.Text = ""
- ' Alert("Usuario Creado. El usuario accesará con la contraseña '" & ContraseñaPredeterminada & "'")
- ' ObjUsuario.Commit()
- ' Else
- ' ObjUsuario.RollBack()
- ' End If
- ' Else
- ' ObjUsuario.RollBack()
- ' Alert("No se ha podido registrar al nuevo Usuario, Verifique si el Usuario ya está registrado")
- ' End If
-
- ' ObjUsuario.Dispose()
- ' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
- ' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
- ' Else
- ' CargaGridUsuarios("")
- ' End If
- 'End Sub
-
+
+ 'Private Sub CargaUsuariosPortal()
+ ' Dim ObjUsrs As New ClsSisUsuarios()
+ ' If ObjUsrs.GetUsuariosPortal(-1, -1, CveProveedor) Then
+ ' Dim dtUsr As DataTable = ObjUsrs.DtResultados
+ ' 'Dim dr As DataRow = dtUsr.FiltroPrimero(String.Format("CveUsuario = {0}", UsuarioActual.CveUsuario))
+ ' 'If dr IsNot Nothing Then
+
+ ' ' If True Then TabHistorial.Visible = True 'dr("Permiso1").ToString = "True"
+ ' ' If True Then TabCxP.Visible = True
+ ' ' If True Then TabAnticipos.Visible = True
+ ' ' If True Then TabBancos.Visible = True
+ ' ' If True Then TabSistema.Visible = True
+
+ ' 'End If
+
+ ' 'dtUsr = dtUsr '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
+
+ ' ViewState("OrdenUsuarios") = ""
+ ' GvUsuariosPortal.DataSource = dtUsr
+ ' ViewState("DTUsuariosProveedor") = dtUsr
+ ' Else
+ ' GvUsuariosPortal.DataSource = Nothing
+ ' ViewState("DTUsuariosProveedor") = Nothing
+ ' End If
+ ' ObjUsrs.Dispose()
+ ' GvUsuariosPortal.DataBind()
+ 'End Sub
+
+
+ 'Private Sub CargaGridUsuarios(Orden As String)
+ ' If CType(ViewState("DTUsuariosProveedor"), DataTable).Rows.Count > 0 Then
+ ' If Orden <> String.Empty Then
+ ' Dim DV As New DataView(CType(ViewState("DTUsuariosProveedor"), DataTable), "", Orden, DataViewRowState.CurrentRows)
+ ' GvUsuariosPortal.DataSource = DV.ToTable() '.FiltraParametros("Nombre <> 'Administrador' AND CveUsuario <> " & UsuarioActual.CveUsuario)
+ ' DV.Dispose()
+ ' Else
+ ' GvUsuariosPortal.DataSource = CType(ViewState("DTUsuariosProveedor"), DataTable) '.FiltraParametros("Nombre <> 'Administrador' AND CveUsuario <> " & UsuarioActual.CveUsuario)
+ ' End If
+ ' End If
+ ' GvUsuariosPortal.DataBind()
+ ' UPPUsuarios.Update()
+ 'End Sub
+
+ ''ajustar el tamaño de las celdas de la GvUsuarios Portal
+ 'Protected Sub GvUsuariosPortal_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvUsuariosPortal.RowDataBound
+ ' If e.Row.RowType = DataControlRowType.DataRow Then
+
+ ' 'El usuario Admin no se puede editar ni eliminar
+ ' If e.Row.DataKey("Nombre") = "Admin" Then
+ ' e.Row.FCLinkButton("imgE").Visible = False
+ ' e.Row.FCLinkButton("imgD").Visible = False
+ ' e.Row.FCLinkButton("imgC").Visible = False
+ ' End If
+
+ ' If e.Row.RowIndex = 0 Then
+ ' '' e.Row.Cells(0).Width = Unit.Pixel(120)
+ ' 'e.Row.Cells(0).Width = Unit.Pixel(120)
+ ' 'e.Row.Cells(1).Width = Unit.Pixel(150)
+ ' 'e.Row.Cells(2).Width = Unit.Pixel(55)
+ ' 'e.Row.Cells(3).Width = Unit.Pixel(55)
+ ' 'e.Row.Cells(4).Width = Unit.Pixel(55)
+ ' 'e.Row.Cells(5).Width = Unit.Pixel(55)
+ ' 'e.Row.Cells(6).Width = Unit.Pixel(55)
+ ' 'e.Row.Cells(7).Width = Unit.Pixel(55)
+
+ ' 'e.Row.Cells(8).Width = Unit.Pixel(75)
+ ' 'e.Row.Cells(9).Width = Unit.Pixel(100)
+ ' 'e.Row.Cells(10).Width = Unit.Pixel(150)
+ ' End If
+ ' End If
+ 'End Sub
+
+ ''Editar usuarios
+ 'Protected Sub GvUsuariosPortal_RowEditing(ByVal sender As Object, ByVal e As GridViewEditEventArgs) Handles GvUsuariosPortal.RowEditing
+ ' GvUsuariosPortal.EditIndex = e.NewEditIndex
+ ' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
+ ' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
+ ' Else
+ ' CargaGridUsuarios("")
+ ' End If
+ 'End Sub
+
+ 'Protected Sub GvUsuariosPortal_RowUpdating(ByVal sender As Object, ByVal e As GridViewUpdateEventArgs) Handles GvUsuariosPortal.RowUpdating
+ ' Dim ObjUsuario As New ClsSisUsuarios
+ ' Dim Nombre, Correo As String
+ ' Dim Estatus As Boolean
+ ' Dim gvr As GridViewRow = GvUsuariosPortal.Rows(e.RowIndex)
+
+ ' 'Usuario = gvr.FCLiteral("LtlUUsuario").Text.Trim
+ ' Nombre = gvr.FCTextBox("TxtUsuarioPortalEdit").Text.Trim
+ ' Correo = gvr.FCTextBox("TxtCorreoEdit").Text.Trim
+ ' Estatus = gvr.FCCheckBox("ChkEstatus").Checked
+
+ ' Dim CveUsuarioPortal As Integer = gvr.DataKey("CveUsuario").ToEntero
+ ' Dim pCveProveedor As Integer = gvr.DataKey("CveProveedor").ToEntero
+
+ ' If ObjUsuario.UpdateUsuarioPortal(Correo, Nombre, Correo, Estatus, "-1", -1, CveProveedor, CveUsuarioPortal, UsuarioActual.CveUsuario) Then
+ ' GvUsuariosPortal.EditIndex = -1
+ ' ObjUsuario.GetUsuariosPortal(-1, -1, CveProveedor) '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
+ ' ViewState("DTUsuariosProveedor") = ObjUsuario.DtResultados
+ ' End If
+ ' ObjUsuario.Dispose()
+
+ ' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
+ ' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
+ ' Else
+ ' CargaGridUsuarios("")
+ ' End If
+
+ 'End Sub
+
+ ''Cancelar Edición
+ 'Protected Sub GvUsuariosPortal_RowCancelingEdit(ByVal sender As Object, ByVal e As GridViewCancelEditEventArgs) Handles GvUsuariosPortal.RowCancelingEdit
+ ' GvUsuariosPortal.EditIndex = -1
+ ' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
+ ' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
+ ' Else
+ ' CargaGridUsuarios("")
+ ' End If
+ 'End Sub
+
+ ''Restablecer contraseña
+ 'Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand
+
+ ' If e.CommandName = "RestablecerContraseña" Then
+ ' Dim cveUsuarioPortal As Integer = e.CommandArgument.ToString.ToEntero
+ ' Dim Usuario As New ClsSisUsuarios
+ ' If Usuario.GetUsuariosPortal(cveUsuarioPortal, -1, -1) Then
+ ' Dim dr As DataRow = Usuario.DtResultados.FiltroPrimero("")
+
+ ' If Usuario.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString, dr("Correo").ToString, CType(dr("Estatus"), Boolean), ContraseñaPredeterminadaEncriptada, -1, CveProveedor, cveUsuarioPortal, UsuarioActual.CveUsuario) Then
+ ' GvUsuariosPortal.EditIndex = -1
+ ' ViewState("DTUsuariosProveedor") = Usuario.DtResultados '.FiltraParametros("Usuario <> 'Admin' AND CveUsuarioPortal <> " & UsuarioActual.CveUsuario)
+ ' Alert("Contraseña Restablecida. La nueva contraseña es: """ & ContraseñaPredeterminada & "")
+ ' End If
+ ' End If
+ ' Usuario.Dispose()
+ ' End If
+
+ ' If e.CommandName = "ReenviarCorreo" Then
+ ' Dim cveUsuarioPortal As Integer = e.CommandArgument.ToString.ToEntero
+ ' Dim Usuario As New ClsSisUsuarios
+ ' Usuario.IniciaTransacSQL()
+ ' Dim TieneError = False
+
+ ' If Usuario.GetUsuariosPortal(cveUsuarioPortal, -1, -1) Then
+ ' Dim dr As DataRow = Usuario.DtResultados.FiltroPrimero("")
+
+ ' 'ACTUALIZA USUARIO, CONTRASEÑA Y ESTATUS
+ ' If Not Usuario.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString, dr("Correo").ToString, True, ContraseñaPredeterminadaEncriptada, -1, CveProveedor, cveUsuarioPortal, UsuarioActual.CveUsuario) Then
+ ' TieneError = True
+ ' Alert("Ocurrió un error al actualizar el usuario. Por favor vuelva a intentar.", TipoMensaje.MsgError)
+ ' End If
+
+ ' 'MANDA CORREO ACTIVACION
+ ' If Not TieneError Then
+ ' Dim ObjParametro As SisParametro = GlobalDTParametros(SisParametros.URL)
+ ' Dim Liga As String = ObjParametro.Cadena1 & "LogIn.aspx"
+ ' Dim LigaActivar = Liga & "?p=" & Encripta("CveU=" & cveUsuarioPortal & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks & "&CveE=" & UsuarioActual.CveEmpresa)
+
+ ' Dim ObjMail As New ClsSisMail()
+
+ ' If dr("Correo").ToString <> "" Then
+ ' Dim Correos As String() = dr("Correo").ToString.Split(New Char() {";"c})
+ ' Dim Texto = ""
+ ' For Each Correo As String In Correos
+ ' Texto = String.Format("Direccion de Acceso: Portal del Proveedor Usuario: {2} Haga click para activar su cuenta Activar", Liga, CveProveedor, dr("Usuario").ToString, LigaActivar)
+ ' 'If Not ObjMail.MandaCorreo(EmpresaNotificaciones, Correo, "Activación de cuenta", "", "", {""}, Texto) Then
+ ' If Not ObjMail.SendMail(EmpresaNotificaciones, Correo, "Activación de cuenta", Texto) Then
+ ' Alert("Error al mandar el correo. Por favor vuelva a intentar", TipoMensaje.MsgError)
+ ' TieneError = True
+ ' Exit For
+ ' End If
+ ' Next
+
+ ' Else
+ ' Alert("No se ha registrado ningún correo al usuario.", TipoMensaje.MsgAdvertencia)
+ ' TieneError = True
+ ' End If
+ ' End If
+
+ ' If Not TieneError Then
+ ' Usuario.Commit()
+ ' ViewState("DTUsuariosProveedor") = Usuario.DtResultados
+ ' Alert(String.Format("Se envio correo al usuario y se restablecio contraseña . La nueva contraseña es: ""{0}""", ContraseñaPredeterminada), TipoMensaje.MsgInformacion)
+ ' Else
+ ' Usuario.RollBack()
+ ' End If
+
+ ' End If
+ ' Usuario.Dispose()
+ ' End If
+
+ 'End Sub
+
+ ''Eliminar Usuarios
+ 'Protected Sub GvUsuariosPortal_RowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Handles GvUsuariosPortal.RowDeleting
+ ' Dim Usuario As New ClsSisUsuarios
+ ' If Usuario.RemoveUsuarioPortal(GvUsuariosPortal.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then
+ ' GvUsuariosPortal.EditIndex = -1
+ ' ViewState("DTUsuariosProveedor") = Usuario.DtResultados
+ ' End If
+ ' Usuario.Dispose()
+ ' Alert("Usuario Eliminado")
+ ' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
+ ' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
+ ' Else
+ ' CargaGridUsuarios("")
+ ' End If
+ 'End Sub
+
+ ''Agregar Usuario
+ 'Protected Sub LnkAgregarUsuario_Click(sender As Object, e As EventArgs) Handles LnkAgregarUsuario.Click
+ ' Dim ObjUsuario As New ClsSisUsuarios
+ ' Dim CvePlataforma As Integer = 7
+
+ ' ObjUsuario.IniciaTransacSQL()
+
+ ' Dim CveUsuario As Integer = ObjUsuario.AddUsuarioPortal(TxtCorreo.Text.Trim, ContraseñaPredeterminadaEncriptada, TxtNombrePortal.Text.Trim, TxtCorreo.Text.Trim, -1, CveProveedor, CvePlataforma, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+
+ ' If CveUsuario > 0 Then
+ ' If ObjUsuario.UpdateUsuariosModulos(CveUsuario, 1201, True, UsuarioActual.CveUsuario) Then
+ ' If ObjUsuario.GetUsuariosPortal(-1, -1, CveProveedor) Then
+ ' ViewState("DTUsuariosProveedor") = ObjUsuario.DtResultados.FiltraParametros("Nombre <> 'Admin' AND CveUsuario <> " & UsuarioActual.CveUsuario)
+ ' End If
+
+ ' TxtNombrePortal.Text = ""
+ ' TxtCorreo.Text = ""
+ ' Alert("Usuario Creado. El usuario accesará con la contraseña '" & ContraseñaPredeterminada & "'")
+ ' ObjUsuario.Commit()
+ ' Else
+ ' ObjUsuario.RollBack()
+ ' End If
+ ' Else
+ ' ObjUsuario.RollBack()
+ ' Alert("No se ha podido registrar al nuevo Usuario, Verifique si el Usuario ya está registrado")
+ ' End If
+
+ ' ObjUsuario.Dispose()
+ ' If ViewState("OrdenUsuarios").ToString() <> String.Empty Then
+ ' CargaGridUsuarios(ViewState("OrdenUsuarios").ToString())
+ ' Else
+ ' CargaGridUsuarios("")
+ ' End If
+ 'End Sub
+
#End Region
-
-
+
+
#Region "O R D E N A M I E N T O"
- 'Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
- ' Dim Orden As String = ""
- ' Dim Campo As String = ""
- ' Dim Literal As Literal = Nothing
- ' Const OrdenInicial As String = ""
- ' Dim Arg(2) As String
-
- ' Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
- ' Campo = Arg(0)
- ' Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
-
- ' If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
- ' ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
- ' Literal.Text = String.Format("")
- ' Else
- ' ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
- ' Literal.Text = String.Format("")
- ' End If
- ' Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
- ' ViewState("Orden") = Orden
- ' CargaGridUsuarios(Orden)
- 'End Sub
-
+ 'Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
+ ' Dim Orden As String = ""
+ ' Dim Campo As String = ""
+ ' Dim Literal As Literal = Nothing
+ ' Const OrdenInicial As String = ""
+ ' Dim Arg(2) As String
+
+ ' Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
+ ' Campo = Arg(0)
+ ' Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
+
+ ' If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
+ ' ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
+ ' Literal.Text = String.Format("")
+ ' Else
+ ' ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
+ ' Literal.Text = String.Format("")
+ ' End If
+ ' Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
+ ' ViewState("Orden") = Orden
+ ' CargaGridUsuarios(Orden)
+ 'End Sub
+
#End Region
-
-
+
+
#Region " BANCOS"
Protected Sub BtnExcelGvBancosCuentas_Click(sender As Object, e As EventArgs)
Dim retorno As Byte() = ImprimirReporteGvBancosCuentas("EXCEL")
@@ -1039,12 +1039,12 @@ Partial Class Portal_PortalProveedor
End If
ObjMovtos.Dispose()
Return retorno
- End Function
+ End Function
#End Region
-
-
+
+
#Region "Crédito por Aplicar Impresión"
-
+
Protected Sub BtnExcelCredito_Click(sender As Object, e As EventArgs)
Dim retorno As Byte() = ImprimeReporteNTPorAplicar("EXCEL")
If retorno IsNot Nothing Then
@@ -1160,14 +1160,14 @@ Partial Class Portal_PortalProveedor
Return retorno
- End Function
-
-
+ End Function
+
+
#End Region
-
-
+
+
#Region "Historial de Ventas IMPRESION"
-
+
Protected Sub BtnExcelVentas_Click(sender As Object, e As EventArgs)
Dim retorno As Byte() = ImprimirReporteVentas("EXCEL")
If retorno IsNot Nothing Then
@@ -1227,11 +1227,11 @@ Partial Class Portal_PortalProveedor
End If
ObjProveedores.Dispose()
Return retorno
- End Function
-
+ End Function
+
#End Region
-
-
+
+
#Region "CxP Pagadas IMPRESION"
Protected Sub BtnExcelPagadas_Click(sender As Object, e As EventArgs)
Dim retorno As Byte() = ImprimirReporteCxPPagadas("EXCEL")
@@ -1290,13 +1290,13 @@ Partial Class Portal_PortalProveedor
End If
ObjMovtos.Dispose()
Return retorno
- End Function
-
+ End Function
+
#End Region
-
-
+
+
#Region "CxCActivas IMPRESION"
-
+
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
Dim retorno As Byte() = ImprimirReporteCxCHistorial("EXCEL")
If retorno IsNot Nothing Then
@@ -1358,11 +1358,11 @@ Partial Class Portal_PortalProveedor
End If
ObjMovtos.Dispose()
Return retorno
- End Function
+ End Function
#End Region
-
+
#Region "TAB CONTRASENIA"
-
+
Protected Sub BtnGuardarContraseña_Click(sender As Object, e As EventArgs) Handles BtnGuardarContraseña.Click
If Decripta(UsuarioActual.Contraseña) = TxtContraseniaActual.Text Then
@@ -1385,35 +1385,35 @@ Partial Class Portal_PortalProveedor
Alert("La Contraseña Actual es incorrecta.", TipoMensaje.MsgAdvertencia)
End If
- End Sub
+ End Sub
#End Region
-
-
-#Region "AUDITORIA"
-
- Property DTDocumentacion As DataTable
- Get
- If ViewState("DTDocumentacion") Is Nothing Then
- Return New DataTable
- Else
- Return DirectCast(ViewState("DTDocumentacion"), DataTable)
- End If
- End Get
- Set(value As DataTable)
-
- End Set
-
- End Property
-
+
+
+#Region "AUDITORIA"
+
+ Property DTDocumentacion As DataTable
+ Get
+ If ViewState("DTDocumentacion") Is Nothing Then
+ Return New DataTable
+ Else
+ Return DirectCast(ViewState("DTDocumentacion"), DataTable)
+ End If
+ End Get
+ Set(value As DataTable)
+
+ End Set
+
+ End Property
+
Private Sub CargaDocumentacion()
- Dim ObjEDoc As New ClsEdocumentacion
-
- 'If objRH.DocumentacionElectronicaGet(-1, -1, CveProveedor, UsuarioActual.Empresa.CveEmpresa, -1, -1, 3) Then
-
- If ObjEDoc.DocumentacionElectronicaAuditoriaGet(CveProveedor, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, 3, -1) Then
-
-
+ Dim ObjEDoc As New ClsEdocumentacion
+
+ 'If objRH.DocumentacionElectronicaGet(-1, -1, CveProveedor, UsuarioActual.Empresa.CveEmpresa, -1, -1, 3) Then
+
+ If ObjEDoc.DocumentacionElectronicaAuditoriaGet(CveProveedor, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, 3, -1) Then
+
+
DTDocumentacion = ObjEDoc.DtResultados
GvDocumentos.DataSource = ObjEDoc.DtResultados
Else
@@ -1425,15 +1425,15 @@ Partial Class Portal_PortalProveedor
GvDocumentos.DataBind()
UPGvDocumentos.Update()
- End Sub
-
-
-
+ End Sub
+
+
+
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")
@@ -1470,24 +1470,24 @@ Partial Class Portal_PortalProveedor
RegistraScript("$('#ModalUploadDoc').modal({ backdrop: 'static', keyboard: false});")
- End Sub
-
-
-
+ End Sub
+
+
+
Protected Sub GvDocumentos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
- Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString
-
+ 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 txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
- Dim txtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia")
- Dim CveDocumentacionElectronica As String = e.Row.DataKey("CveDocumentacionElectronica")
-
+ 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")
@@ -1519,9 +1519,9 @@ Partial Class Portal_PortalProveedor
extencion = array(array.Length - 1)
End If
- If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(3) Then
- ' chkEstatus.Checked = True
- ImgUpload.Visible = False
+ If e.Row.DBCampo("Estatus").ToString.ToEntero.Contiene(3) Then
+ ' chkEstatus.Checked = True
+ ImgUpload.Visible = False
Else
'chkEstatus.Checked = False
End If
@@ -1563,107 +1563,107 @@ Partial Class Portal_PortalProveedor
'chkEstatus.Checked = ImgDownLoad.Visible
End If
- 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 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()
-
+ tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
+
+
+
+
+ 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
Next
- RegistraScript("$('#ModalUploadDoc').modal('hide')", "hidemodal3")
-
-
+ RegistraScript("$('#ModalUploadDoc').modal('hide')", "hidemodal3")
+
+
'Dim FileExtension As String = "-1"
'Dim Filesgral As List(Of Archivo) = TxtFileDocumentacion.getfiles().Archivos
'Dim Filename As String = ""
@@ -1672,11 +1672,11 @@ Partial Class Portal_PortalProveedor
' 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(".", "")
+ ' FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "")
' Dim tempArray() As String
' tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
@@ -1695,26 +1695,26 @@ Partial Class Portal_PortalProveedor
' System.IO.File.Delete(rutaDestino)
' End If
- ' System.IO.File.Move(fileItem.FileUrl, rutaDestino)
-
-
- ' Dim objEdoc As New ClsEdocumentacion
-
- ' If CveDocumentacionElectronica = -1 Then
- ' If objEdoc.DocumentacionElectronicaAdd(CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, Documentacion & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) > 0 Then
-
- ' End If
- ' Else
- ' If objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, Documentacion & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
-
- ' End If
- ' End If
-
- ' objEdoc.Dispose()
-
- ' 'GuardarDocumentos(CveDocumentacion)
- ' CargaDocumentacion()
-
+ ' System.IO.File.Move(fileItem.FileUrl, rutaDestino)
+
+
+ ' Dim objEdoc As New ClsEdocumentacion
+
+ ' If CveDocumentacionElectronica = -1 Then
+ ' If objEdoc.DocumentacionElectronicaAdd(CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, Documentacion & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) > 0 Then
+
+ ' End If
+ ' Else
+ ' If objEdoc.DocumentacionElectronicaUpdate(CveDocumentacionElectronica, CveDocumentacion, -1, -1, CveProveedor, 2, ObservacionDocumentacion, Documentacion & "." & FileExtension, UsuarioActual.CveUsuario, FechaLimite, FechaVigencia) Then
+
+ ' End If
+ ' End If
+
+ ' objEdoc.Dispose()
+
+ ' 'GuardarDocumentos(CveDocumentacion)
+ ' CargaDocumentacion()
+
' TxtFileDocumentacion.Text = ""
' UPModalUploadDoc.Update()
@@ -1728,8 +1728,8 @@ Partial Class Portal_PortalProveedor
'RegistraScript("$('#ModalUploadDoc').modal('hide')", "hidemodal3")
- End Sub
-
+ End Sub
+
Private Sub GuardarDocumentos(Optional _CveDocumentacionExcluir As Integer = -1)
Dim hasError As Boolean = True
@@ -1805,9 +1805,9 @@ Partial Class Portal_PortalProveedor
CargaDocumentacion()
objDocumentos.Dispose()
- End Sub
-
-#End Region
-
-
+ End Sub
+
+#End Region
+
+
End Class
\ No newline at end of file
diff --git a/Prospeccion/Prospectos.aspx.vb b/Prospeccion/Prospectos.aspx.vb
index 80eb78ad7..963c1c36b 100644
--- a/Prospeccion/Prospectos.aspx.vb
+++ b/Prospeccion/Prospectos.aspx.vb
@@ -435,7 +435,7 @@ Partial Class Prospectos_Prospectos
' 'GuardaLog("Inicia Petición de Aplicación")
' oWordApp = New Microsoft.Office.Interop.Word.Application
' oWordApp.Visible = True
- ' oWordDoc = oWordApp.Documents.Open(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Prospectos\" & "ApartarLote.doc")
+ ' oWordDoc = oWordApp.Documents.Open(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Prospectos\" & "ApartarLote.doc")
' 'GuardaLog("Inicia Petición de Documento")
' If oWordDoc IsNot Nothing Then
' 'GuardaLog("Creación de Documento")
@@ -458,10 +458,10 @@ Partial Class Prospectos_Prospectos
' 'GuardaLog("Termina de reemplazo de variables")
' objSelection.TypeBackspace()
' objSelection.TypeBackspace()
- ' If Not System.IO.Directory.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\") Then
- ' System.IO.Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\")
+ ' If Not System.IO.Directory.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\") Then
+ ' System.IO.Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\")
' End If
- ' ArchivoPath = AppDomain.CurrentDomain.BaseDirectory & "Temp\" & UsuarioActual.CveUsuario & ".doc"
+ ' ArchivoPath = ModExtensiones.DirectorioBaseEmpresas & "Temp\" & UsuarioActual.CveUsuario & ".doc"
' oWordDoc.SaveAs(ArchivoPath.ToString)
' oWordDoc.Close()
@@ -574,7 +574,7 @@ Partial Class Prospectos_Prospectos
'Dim FillColor, LineColor As Color
Mapa.RemoveAllLayers()
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Accesos.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Accesos.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
@@ -585,7 +585,7 @@ Partial Class Prospectos_Prospectos
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios_Polyline.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios_Polyline.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
@@ -597,7 +597,7 @@ Partial Class Prospectos_Prospectos
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios2.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios2.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
@@ -609,7 +609,7 @@ Partial Class Prospectos_Prospectos
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Cajones_Polyline.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Cajones_Polyline.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
@@ -619,7 +619,7 @@ Partial Class Prospectos_Prospectos
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lineas.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lineas.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
@@ -629,7 +629,7 @@ Partial Class Prospectos_Prospectos
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Texto.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Texto.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 8
@@ -655,7 +655,7 @@ Partial Class Prospectos_Prospectos
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\TextoEspecial.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\TextoEspecial.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 12
@@ -683,7 +683,7 @@ Partial Class Prospectos_Prospectos
'End If
- dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lotes.shp", AppDomain.CurrentDomain.BaseDirectory, 1))
+ dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lotes.shp", ModExtensiones.DirectorioBaseEmpresas, 1))
dbLayer.Name = "Stand"
diff --git a/Prospeccion/RepProspectosGIS.aspx.vb b/Prospeccion/RepProspectosGIS.aspx.vb
index 2af47dc4b..9c8e84744 100644
--- a/Prospeccion/RepProspectosGIS.aspx.vb
+++ b/Prospeccion/RepProspectosGIS.aspx.vb
@@ -161,7 +161,7 @@ Partial Class Prospeccion_RepProspectosGIS
'Dim FillColor, LineColor As Color
Mapa.RemoveAllLayers()
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Accesos.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Accesos.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
@@ -172,7 +172,7 @@ Partial Class Prospeccion_RepProspectosGIS
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios_Polyline.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios_Polyline.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
@@ -184,7 +184,7 @@ Partial Class Prospeccion_RepProspectosGIS
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios2.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios2.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
@@ -196,7 +196,7 @@ Partial Class Prospeccion_RepProspectosGIS
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Cajones_Polyline.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Cajones_Polyline.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
@@ -206,7 +206,7 @@ Partial Class Prospeccion_RepProspectosGIS
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lineas.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lineas.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
@@ -216,7 +216,7 @@ Partial Class Prospeccion_RepProspectosGIS
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Texto.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Texto.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 8
@@ -242,7 +242,7 @@ Partial Class Prospeccion_RepProspectosGIS
'End If
- 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\TextoEspecial.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
+ 'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\TextoEspecial.shp", ModExtensiones.DirectorioBaseEmpresas, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 12
@@ -270,7 +270,7 @@ Partial Class Prospeccion_RepProspectosGIS
'End If
- dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lotes.shp", AppDomain.CurrentDomain.BaseDirectory, 1))
+ dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lotes.shp", ModExtensiones.DirectorioBaseEmpresas, 1))
dbLayer.Name = "Stand"
diff --git a/Proveedores/PortalProveedor.aspx.vb b/Proveedores/PortalProveedor.aspx.vb
index 59cc47128..2a3a50e6d 100644
--- a/Proveedores/PortalProveedor.aspx.vb
+++ b/Proveedores/PortalProveedor.aspx.vb
@@ -412,7 +412,7 @@ Partial Class Portal_PortalProveedor
Protected Sub GvBancos_comprobante(sender As Object, e As EventArgs)
Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- Dim Path As String = String.Format("{0}{1}{2}{3}{4}{5}", AppDomain.CurrentDomain.BaseDirectory, "Empresas\", UsuarioActual.CveEmpresa, "\IE\", Gvr.FCHiddenField("CveIe").Value, ".png")
+ Dim Path As String = String.Format("{0}{1}{2}{3}{4}{5}", ModExtensiones.DirectorioBaseEmpresas, "Empresas\", UsuarioActual.CveEmpresa, "\IE\", Gvr.FCHiddenField("CveIe").Value, ".png")
Dim Archivo As New System.IO.FileInfo(Path)
If Archivo.Exists Then
diff --git a/PyME/Sistemas/WizardRegistro.aspx.vb b/PyME/Sistemas/WizardRegistro.aspx.vb
index 15c8a9d38..a78e1faf7 100644
--- a/PyME/Sistemas/WizardRegistro.aspx.vb
+++ b/PyME/Sistemas/WizardRegistro.aspx.vb
@@ -368,7 +368,7 @@ Partial Class Sistemas_WizardRegistro
objPS.Dispose()
objInv.Dispose()
- Dim DirFactura = AppDomain.CurrentDomain.BaseDirectory + String.Format("Empresas\{0}\Formatos\Factura.mrt", CveEmpresa)
+ Dim DirFactura = ModExtensiones.DirectorioBaseEmpresas + String.Format("Empresas\{0}\Formatos\Factura.mrt", CveEmpresa)
Dim Factura As New FileInfo(DirFactura)
RblFormatoFactura.Items.Item(1).Enabled = Factura.Exists
RblFormatoFactura.Items.Item(1).Selected = Factura.Exists
@@ -493,7 +493,7 @@ Partial Class Sistemas_WizardRegistro
Case 4
If TxtFormatoFactura.getfiles().Archivos().Count > 0 Then
Dim FormatoFactura As Archivo = TxtFormatoFactura.getfiles().Archivos(0)
- Dim PathFormato = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{CveEmpresa}\Formatos\"
+ Dim PathFormato = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}\Formatos\"
Dim dirFormato As String = String.Format("{0}\Factura.{1}", PathFormato, FormatoFactura.Extencion)
If File.Exists(dirFormato) Then
My.Computer.FileSystem.DeleteFile(dirFormato)
@@ -549,7 +549,7 @@ Partial Class Sistemas_WizardRegistro
Dim ObjEmpresas As New ClsSisEmpresas
ObjEmpresas.IniciaTransacSQL()
Try
- Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{CveEmpresa}\Certificados"
+ Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}\Certificados"
DirectoryExistsCreate(Path)
Dim ArchivoDestino As String = String.Format("{0}\{1}", Path, ArchivoFiel.filename)
If File.Exists(ArchivoDestino) Then
@@ -589,7 +589,7 @@ Partial Class Sistemas_WizardRegistro
Dim ObjEmpresas As New ClsSisEmpresas
ObjEmpresas.IniciaTransacSQL()
Try
- Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{CveEmpresa}\Certificados"
+ Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}\Certificados"
DirectoryExistsCreate(Path)
Dim ArchivoDestino As String = String.Format("{0}\{1}", Path, ArchivoCSD.filenameO)
If File.Exists(ArchivoDestino) Then
@@ -889,7 +889,7 @@ Partial Class Sistemas_WizardRegistro
Dim ArchivoLogo As Archivo = TextLogo.getfiles().Archivos(0)
If ArchivoLogo.filenameO.Length <= 114 Then
Try
- Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{CveEmpresa}"
+ Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}"
DirectoryExistsCreate(Path)
Dim ArchivoDestino As String = String.Format("{0}\Logo.{1}", Path, ArchivoLogo.Extencion)
If File.Exists(ArchivoDestino) Then
@@ -923,7 +923,7 @@ Partial Class Sistemas_WizardRegistro
End Sub
Protected Sub RblFormatoFactura_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblFormatoFactura.SelectedIndexChanged
Dim StrParams As New StringBuilder
- Dim Directorio = AppDomain.CurrentDomain.BaseDirectory + String.Format("Empresas\{0}\Formatos\Factura.mrt", CveEmpresa)
+ Dim Directorio = ModExtensiones.DirectorioBaseEmpresas + String.Format("Empresas\{0}\Formatos\Factura.mrt", CveEmpresa)
Dim Archivo As New FileInfo(Directorio)
RblFormatoFactura.Items.Item(1).Enabled = Archivo.Exists
DivSubirFactura.Visible = (RblFormatoFactura.SelectedValue = "2")
@@ -943,7 +943,7 @@ Partial Class Sistemas_WizardRegistro
UpFormatoFactura.Update()
End Sub
Private Sub VerEditarFactura()
- Dim Directorio = AppDomain.CurrentDomain.BaseDirectory + String.Format("Empresas\{0}\Formatos\Factura.mrt", CveEmpresa)
+ Dim Directorio = ModExtensiones.DirectorioBaseEmpresas + String.Format("Empresas\{0}\Formatos\Factura.mrt", CveEmpresa)
Dim Archivo As New FileInfo(Directorio)
RblFormatoFactura.Items.Item(1).Enabled = Archivo.Exists
If Archivo.Exists Then
@@ -1620,7 +1620,7 @@ Partial Class Sistemas_WizardRegistro
Protected Sub BtnClasificacion_Click(sender As Object, e As EventArgs) Handles btnClasificacion.Click
If TxtAddClasificacion.getfiles().Archivos.Count > 0 Then
Dim file As Archivo = TxtAddClasificacion.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")
CargarExcelClasificaciones(Directorio, file.filename, Tipo)
Else
@@ -1629,10 +1629,10 @@ Partial Class Sistemas_WizardRegistro
'If TxtAddClasificacion.getfiles().Archivos.Count > 0 Then
'Dim file As Archivo = TxtAddClasificacion.getfiles().Archivos(0)
- 'Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch & file.filename
+ 'Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch & file.filename
'CargarExcelClasificaciones(Directorio)
' Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
- ' ' CargarArchivoClasificaciones(AppDomain.CurrentDomain.BaseDirectory & file.patch, file.filename, Tipo)
+ ' ' CargarArchivoClasificaciones(ModExtensiones.DirectorioBaseEmpresas & file.patch, file.filename, Tipo)
'Else
' Alert("No existe el archivo.Favor de subir un archivo de excel a la plataforma", TipoMensaje.MsgError)
'End If
@@ -1939,7 +1939,7 @@ Partial Class Sistemas_WizardRegistro
Protected Sub BtnDivAddUnidadesMedida_Click(sender As Object, e As EventArgs) Handles BtnDivAddUnidadesMedida.Click
If TxtAddUnidadesMedida.getfiles().Archivos.Count > 0 Then
Dim file As Archivo = TxtAddUnidadesMedida.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")
CargarExcelUnidadesMedida(Directorio, file.filename, Tipo)
Else
@@ -2240,7 +2240,7 @@ Partial Class Sistemas_WizardRegistro
Protected Sub BtnDivAddPS_Click(sender As Object, e As EventArgs) Handles BtnDivAddPS.Click
If TxtAddPS.getfiles().Archivos.Count > 0 Then
Dim ArchivoExcel As Archivo = TxtAddPS.getfiles().Archivos(0)
- Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & ArchivoExcel.patch & ArchivoExcel.filename
+ Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & ArchivoExcel.patch & ArchivoExcel.filename
Dim Tipo As String = If(ArchivoExcel.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "OTRO")
CargarExcelPS(Directorio, Tipo)
Else
@@ -2432,7 +2432,7 @@ Partial Class Sistemas_WizardRegistro
Protected Sub BtnCargaExcelProveedor_Click(sender As Object, e As EventArgs) Handles BtnCargaExcelProveedor.Click
If TxtAddProveedor.getfiles().Archivos.Count > 0 Then
Dim file As Archivo = TxtAddProveedor.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")
CargarArchivoProveedor(Directorio, file.filename, Tipo)
Else
@@ -2614,7 +2614,7 @@ Partial Class Sistemas_WizardRegistro
Protected Sub BtnCargaExcelCliente_Click(sender As Object, e As EventArgs) Handles BtnCargaExcelCliente.Click
If TxtAddClientes.getfiles().Archivos.Count > 0 Then
Dim file As Archivo = TxtAddClientes.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")
CargarArchivoCliente(Directorio, file.filename, Tipo)
Else
@@ -2806,7 +2806,7 @@ Partial Class Sistemas_WizardRegistro
Private Sub BtnCargaExcelFacturas_Click(sender As Object, e As EventArgs) Handles BtnCargaExcelFacturas.Click
If TxtAddFactura.getfiles().Archivos.Count > 0 Then
Dim file As Archivo = TxtAddFactura.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")
CargarArchivoFactura(Directorio, file.filename, Tipo)
Else
@@ -3182,21 +3182,21 @@ Partial Class Sistemas_WizardRegistro
Dim Directorio As String = ""
Select Case Tipo
Case "Clasi"
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\FormatoClasificaciones.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\FormatoClasificaciones.xlsx"
Case "UM"
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\FormatoUnidadesMedida.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\FormatoUnidadesMedida.xlsx"
Case "PS"
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoPS.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoPS.xlsx"
Case "Prove"
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoProveedores.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoProveedores.xlsx"
Case "Cli"
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoClientes.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoClientes.xlsx"
Case "Fact"
If RblFormato.SelectedValue = "1" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoProveedores-Facturas.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoProveedores-Facturas.xlsx"
End If
If RblFormato.SelectedValue = "2" Then
- Directorio = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\SaldosIniciales\FormatoClientes-Facturas.xlsx"
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoClientes-Facturas.xlsx"
End If
@@ -3368,7 +3368,7 @@ Partial Class Sistemas_WizardRegistro
' Try
' If TxtModalFielArchivo.getfiles().Archivos.Count > 0 Then
' Dim ArchivoFiel As Archivo = TxtModalFielArchivo.getfiles().Archivos(0)
- ' Dim Path As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{CveEmpresa}\Certificados"
+ ' Dim Path As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}\Certificados"
' If Not Directory.Exists(Path) Then
' Directory.CreateDirectory(Path)
' End If
@@ -3381,7 +3381,7 @@ Partial Class Sistemas_WizardRegistro
' If TxtCSD.getfiles().Archivos.Count > 0 Then
' Dim ArchivoCSD As Archivo = TxtCSD.getfiles().Archivos(0)
- ' Dim PathCSD As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{CveEmpresa}\Certificados"
+ ' Dim PathCSD As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}\Certificados"
' Dim dirCSD As String = String.Format("{0}\{1}.{2}", PathCSD, CSD, ArchivoCSD.Extencion)
' If File.Exists(dirCSD) Then
' My.Computer.FileSystem.DeleteFile(dirCSD)
@@ -3391,7 +3391,7 @@ Partial Class Sistemas_WizardRegistro
' If TextLogo.getfiles().Archivos().Count > 0 Then
' Dim Logo As Archivo = TextLogo.getfiles().Archivos(0)
- ' Dim PathLogo As String = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{CveEmpresa}\"
+ ' Dim PathLogo As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}\"
' Dim dirLogo As String = String.Format("{0}\logo.{1}", PathLogo, Logo.Extencion)
' If File.Exists(dirLogo) Then
' My.Computer.FileSystem.DeleteFile(dirLogo)
@@ -3401,7 +3401,7 @@ Partial Class Sistemas_WizardRegistro
' If TxtFormatoFactura.getfiles().Archivos().Count > 0 Then
' Dim FormatoFactura As Archivo = TxtFormatoFactura.getfiles().Archivos(0)
- ' Dim PathFormato = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{CveEmpresa}\Formatos\"
+ ' Dim PathFormato = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}\Formatos\"
' Dim dirFormato As String = String.Format("{0}\Factura.{1}", PathFormato, FormatoFactura.Extencion)
' If File.Exists(dirFormato) Then
' My.Computer.FileSystem.DeleteFile(dirFormato)
diff --git a/RH/MiPerfil.aspx.vb b/RH/MiPerfil.aspx.vb
index 93b917727..71fbb09af 100644
--- a/RH/MiPerfil.aspx.vb
+++ b/RH/MiPerfil.aspx.vb
@@ -467,7 +467,7 @@ Partial Class RH_MiPerfil
puestoProp = ""
End If
- If File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then
+ If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then
ImgPersonal.ImageUrl = $"/Empresas/{UsuarioActual.CveEmpresa}/RH/Personal/{ObjPersonal.URL}"
End If
diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb
index 01f2facb9..832bb36c8 100644
--- a/RH/Personal.aspx.vb
+++ b/RH/Personal.aspx.vb
@@ -10,8 +10,8 @@ Imports Microsoft.Reporting.WebForms
Imports System.Globalization
Partial Class RH_Personal
- Inherits ClsPaginas
-
+ Inherits ClsPaginas
+
#Region "P R O P I E D A D E S"
Private Property DTCuentasBancos As DataTable
Get
@@ -298,7 +298,7 @@ Partial Class RH_Personal
End Set
End Property
- Private Property PU As Decimal
+ Private Property PU As Decimal
Get
Return CInt(ViewState("PU"))
End Get
@@ -321,14 +321,14 @@ Partial Class RH_Personal
Set(value As Integer)
ViewState("CveMovimientoDetalleUniforme") = value
End Set
- End Property
-
-
-
+ End Property
+
+
+
#End Region
-
+
#Region "V A C A C I O N E S - P E R M I S O S"
-
+
Private Property VacInicioPeriodo As Date
Get
If ViewState("VacInicioPeriodo") Is Nothing Then
@@ -528,13 +528,13 @@ Partial Class RH_Personal
Set(value As Integer)
ViewState("CvePermiso") = value
End Set
- End Property
-
+ End Property
+
#End Region
-
-
-#Region "PROPIEDADES FAMILIARES"
-
+
+
+#Region "PROPIEDADES FAMILIARES"
+
Private Property ActualizarFamiliar As Boolean
Get
If ViewState("ActualizarFamiliar") Is Nothing Then
@@ -560,8 +560,8 @@ Partial Class RH_Personal
Set(value As Integer)
ViewState("CveFamiliar") = value
End Set
- End Property
-
+ End Property
+
Private Property IndexActual As Integer
Get
If ViewState("IndexActual") Is Nothing Then
@@ -573,8 +573,8 @@ Partial Class RH_Personal
Set(value As Integer)
ViewState("IndexActual") = value
End Set
- End Property
-
+ End Property
+
Property DTFamiliares As DataTable
Get
Return DirectCast(ViewState("DTFamiliares"), DataTable)
@@ -582,9 +582,9 @@ Partial Class RH_Personal
Set(value As DataTable)
ViewState("DTFamiliares") = value
End Set
- End Property
-
-
+ End Property
+
+
Private Property ValPadre As Boolean
Get
If ViewState("ValPadre") Is Nothing Then
@@ -609,154 +609,154 @@ Partial Class RH_Personal
Set(value As Boolean)
ViewState("ValMadre") = value
End Set
- End Property
-
-
-#End Region
-
-
-
+ End Property
+
+
+#End Region
+
+
+
Const wdPageBreak As Integer = 7
Const wdCharacter As Integer = 1
'Configuración
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
- If Not IsPostBack Then
- If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
- pnlSalarioIMSS.Visible = False
- End If
-
- ViewState("Orden") = ""
- ViewState("Orden1") = ""
- Session("FileUpload") = ""
- ViewState("Archivo") = ""
- DTConsumos = Nothing
-
- If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then
- TabGES.Visible = True
- End If
-
- SetValues()
- 'SetPermisos()
-
- CargaEscolaridad()
- CargaEstadoCivil()
- CargaDepartamento()
- CargaPuestos()
- CargaEstatusPersonal()
- CargaGenero()
- CargaMotivoBaja()
- CargaRuta()
- CargaTiposContrato()
- CargaTipoPeriodo()
- CargaTurno()
- CargaJornadas()
- CargaProyecto()
- CargaTiposAsistencia()
- 'CargaMotivoHoraExtra()
- CargaMotivosHorasExtras()
- CargaSupervisores()
- CargaMetodosPago()
- CargaTipoRegimen()
- CargaRiesgoPuesto()
- CargaBancos()
- CargaSubProyectosZona()
- CargaEstados(1)
- CargaMonedas()
- CargaSuperioresOrganigrama()
- CargaUsuariosNomina()
- CargaComboUniformes()
- CargaPermisos()
- CargaCombosBuzon()
- CargaPermisosReemplazos()
-
-
- If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then
- ViewState("CvePersonal") = Request("CvePersonal")
- 'CvePersonal = ViewState("CvePersonal").ToString.ToEntero
- CargaDatos()
- CargaDocumentacionFirmaDecontratos()
- 'LnkAddLicencias.Visible = True
- 'TabLicencias.Visible = True
- 'Configuración de Modalidad Update
- BtnGuardar.Text = "Guardar Cambios"
- LtlTitulo.Text = "Consulta de Personal:"
- If UsuarioActual.CveRol = 1 Then
- 'ImgImprimir.Visible = True
- ImgImprimirExpediente.Visible = True
- End If
-
- 'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
- If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero - 1
-
- 'Inicia Permisos
- If UsuarioActual.TienePermisoProceso(228) Then
- GVAsistencia.Columns(10).Visible = True
- End If
- 'Fin Permisos
- HlEvento.Visible = True
- HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;"
-
- CargaViaticosPersonal()
-
- divBitacora.Visible = True
- CargaGvBitacora()
- Else
-
- 'Configuración de Modalidad Insert
-
- ImgAddObs.Visible = False
- LblFechaCaptura.Text = Now.ToShortDateString()
- LblUsuarioCapturo.Text = UsuarioActual.Usuario
- ViewState("CvePersonal") = -1
- BtnEliminar.Visible = False
- CarcaConceptosNomina()
- For Each Gvr As GridViewRow In GVConceptos.Rows
- If CBool(Gvr.DataKey("Obligatorio")) Then
- Gvr.FCCheckBox("ChkAplica").Checked = True
- Else
- Gvr.Visible = False
- End If
- Next
- 'Inicia Permisos
- 'Fin Permisos
- End If
- CargaCuentasBancarias()
-
- If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
-
- CrearEstructuraFamiliares()
- CargaFamiliares()
-
- LIFamiliaresAcciones.Visible = True
- DivFamiliares.Visible = True
- DivPadres.Visible = False
-
-
- End If
-
-
-
-
- 'If UsuarioActual.TienePermisoProceso(84) Then 'abonar pago
- ' HplAbonarMasivo.Visible = True
- ' GvGxC.Columns(7).Visible = True
- 'End If
-
-
- If Not CvePersonal > 0 Then
- DivSuperiorInmediato.Visible = False
- End If
-
- '09/05/2018 - Si el Personal tiene consumos, muestra boton para generar reporte
- If DTConsumos IsNot Nothing Then
- If DTConsumos.Rows.Count > 0 Then
- UpDescargaConsumos.Visible = True
- End If
- End If
- CargaLicencias()
+ If Not IsPostBack Then
+ If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
+ pnlSalarioIMSS.Visible = False
+ End If
+
+ ViewState("Orden") = ""
+ ViewState("Orden1") = ""
+ Session("FileUpload") = ""
+ ViewState("Archivo") = ""
+ DTConsumos = Nothing
+
+ If UsuarioActual.CveRol = 1 Or UsuarioActual.CveEmpresa = 74 Then
+ TabGES.Visible = True
+ End If
+
+ SetValues()
+ 'SetPermisos()
+
+ CargaEscolaridad()
+ CargaEstadoCivil()
+ CargaDepartamento()
+ CargaPuestos()
+ CargaEstatusPersonal()
+ CargaGenero()
+ CargaMotivoBaja()
+ CargaRuta()
+ CargaTiposContrato()
+ CargaTipoPeriodo()
+ CargaTurno()
+ CargaJornadas()
+ CargaProyecto()
+ CargaTiposAsistencia()
+ 'CargaMotivoHoraExtra()
+ CargaMotivosHorasExtras()
+ CargaSupervisores()
+ CargaMetodosPago()
+ CargaTipoRegimen()
+ CargaRiesgoPuesto()
+ CargaBancos()
+ CargaSubProyectosZona()
+ CargaEstados(1)
+ CargaMonedas()
+ CargaSuperioresOrganigrama()
+ CargaUsuariosNomina()
+ CargaComboUniformes()
+ CargaPermisos()
+ CargaCombosBuzon()
+ CargaPermisosReemplazos()
+
+
+ If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then
+ ViewState("CvePersonal") = Request("CvePersonal")
+ 'CvePersonal = ViewState("CvePersonal").ToString.ToEntero
+ CargaDatos()
+ CargaDocumentacionFirmaDecontratos()
+ 'LnkAddLicencias.Visible = True
+ 'TabLicencias.Visible = True
+ 'Configuración de Modalidad Update
+ BtnGuardar.Text = "Guardar Cambios"
+ LtlTitulo.Text = "Consulta de Personal:"
+ If UsuarioActual.CveRol = 1 Then
+ 'ImgImprimir.Visible = True
+ ImgImprimirExpediente.Visible = True
+ End If
+
+ 'ImgAddObs.Attributes.Add("onclick", "javascript: PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ")
+ If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero - 1
+
+ 'Inicia Permisos
+ If UsuarioActual.TienePermisoProceso(228) Then
+ GVAsistencia.Columns(10).Visible = True
+ End If
+ 'Fin Permisos
+ HlEvento.Visible = True
+ HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CvePersonal=" & CvePersonal & "&TB_iframe=true&height=370&width=600;"
+
+ CargaViaticosPersonal()
+
+ divBitacora.Visible = True
+ CargaGvBitacora()
+ Else
+
+ 'Configuración de Modalidad Insert
+
+ ImgAddObs.Visible = False
+ LblFechaCaptura.Text = Now.ToShortDateString()
+ LblUsuarioCapturo.Text = UsuarioActual.Usuario
+ ViewState("CvePersonal") = -1
+ BtnEliminar.Visible = False
+ CarcaConceptosNomina()
+ For Each Gvr As GridViewRow In GVConceptos.Rows
+ If CBool(Gvr.DataKey("Obligatorio")) Then
+ Gvr.FCCheckBox("ChkAplica").Checked = True
+ Else
+ Gvr.Visible = False
+ End If
+ Next
+ 'Inicia Permisos
+ 'Fin Permisos
+ End If
+ CargaCuentasBancarias()
+
+ If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
+
+ CrearEstructuraFamiliares()
+ CargaFamiliares()
+
+ LIFamiliaresAcciones.Visible = True
+ DivFamiliares.Visible = True
+ DivPadres.Visible = False
+
+
+ End If
+
+
+
+
+ 'If UsuarioActual.TienePermisoProceso(84) Then 'abonar pago
+ ' HplAbonarMasivo.Visible = True
+ ' GvGxC.Columns(7).Visible = True
+ 'End If
+
+
+ If Not CvePersonal > 0 Then
+ DivSuperiorInmediato.Visible = False
+ End If
+
+ '09/05/2018 - Si el Personal tiene consumos, muestra boton para generar reporte
+ If DTConsumos IsNot Nothing Then
+ If DTConsumos.Rows.Count > 0 Then
+ UpDescargaConsumos.Visible = True
+ End If
+ End If
+ CargaLicencias()
LtlTareaNueva.Text = String.Format(" Tarea", CvePersonal)
-
- End If
+
+ End If
AgregarEventosAsincronosGvVacaciones()
End Sub
@@ -811,10 +811,10 @@ Partial Class RH_Personal
Private Sub SetPermisos()
'Permisos
- End Sub
-
+ End Sub
+
#Region "Carga Combos"
-
+
Private Sub CargaEscolaridad()
DdlEscolaridad.DataSource = GlobalDTEscolaridad
DdlEscolaridad.DataBind()
@@ -1043,16 +1043,16 @@ Partial Class RH_Personal
Nom.Dispose()
GvNominas.DataBind()
- End Sub
-
-
-
-
+ End Sub
+
+
+
+
#End Region
-
+
#Region "Asistencias"
-
-
+
+
Protected Sub LnkEliminarAsistencia_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim ObjRH As New ClsRH
@@ -1094,9 +1094,9 @@ Partial Class RH_Personal
End Sub
Protected Sub GVAsistencia_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAsistencia.RowDataBound
- If e.Row.RowType = DataControlRowType.DataRow Then
-
-
+ If e.Row.RowType = DataControlRowType.DataRow Then
+
+
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
@@ -1160,7 +1160,7 @@ Partial Class RH_Personal
ObjPersonal.Dispose()
BtnConsultarAsistencia_Click(sender, e)
- End Sub
+ End Sub
#End Region
Private Sub CargaConsignacion()
@@ -1233,7 +1233,7 @@ Partial Class RH_Personal
End If
- If File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then
+ If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then
ImgPersonal.ImageUrl = $"/Empresas/{UsuarioActual.CveEmpresa}/RH/Personal/{ObjPersonal.URL}"
End If
'BtnCargarArchivo_Click(Me, New EventArgs)
@@ -1410,9 +1410,9 @@ Partial Class RH_Personal
Dim ObjCuentasDeposito As New ClsGenerales(ObjPersonal.IniciaTransacSQL())
Dim ObjAF As New ClsAF(ObjPersonal.IniciaTransacSQL())
- Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\RH\" & ViewState("Archivo").ToString)
+ Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\RH\" & ViewState("Archivo").ToString)
Dim URL As String = CvePersonal & Extension
- Dim Ruta = String.Format("{0}Empresas\{1}\Temp\RH\{2}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, ViewState("Archivo").ToString)
+ Dim Ruta = String.Format("{0}Empresas\{1}\Temp\RH\{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, ViewState("Archivo").ToString)
Dim Archivo As New System.IO.FileInfo(Ruta)
@@ -1434,8 +1434,8 @@ Partial Class RH_Personal
End If
End If
- If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
- TxtSalarioCotizado.Text = TxtSDI.Text
+ If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
+ TxtSalarioCotizado.Text = TxtSDI.Text
End If
If CvePersonal = -1 Then
@@ -1475,8 +1475,8 @@ Partial Class RH_Personal
ViewState("CvePersonal") = ObjPersonal.CvePersonal
'Funsion usa RH Familiares
- If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
- ProcesaDTFamiliares(ObjPersonal)
+ If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
+ ProcesaDTFamiliares(ObjPersonal)
End If
If TempDTCuentasBancos.Rows.Count > 0 Then
@@ -1511,7 +1511,7 @@ Partial Class RH_Personal
End If
Else
- 'If File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
+ 'If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
If ObjPersonal.UpdatePersonal(TxtCodigo.Text.Trim, TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim, TxtCorreo.Text.Trim, TxtFechaIngreso.Text.ToDate,
DdlTipoPeriodo.SelectedValue.ToEntero, TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, TxtSalarioDiarioPago.Text.Trim.ToDouble,
TxtSalarioDiario.Text.Trim.ToDouble, TxtSDI.Text.Trim.ToDouble, TxtSalarioCotizado.Text.Trim.ToDouble, TxtBono.Text.Trim.ToDouble, TxtNumDiasAguinaldo.Text.Trim.ToEntero,
@@ -1533,11 +1533,11 @@ Partial Class RH_Personal
URL, DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text,
DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero,
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario,
- FechaActivo:=FechaActivo, FechaReingreso:=FechaReingreso) Then
-
- 'Funsion usa RH Familiares
- If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
- ProcesaDTFamiliares(ObjPersonal)
+ FechaActivo:=FechaActivo, FechaReingreso:=FechaReingreso) Then
+
+ 'Funsion usa RH Familiares
+ If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
+ ProcesaDTFamiliares(ObjPersonal)
End If
@@ -1581,7 +1581,7 @@ Partial Class RH_Personal
ObjPersonal.Commit()
Alert(Mensaje, TipoMensaje.MsgInformacion, Accion)
- 'If File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then
+ 'If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then
' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & ObjPersonal.URL
'End If
@@ -1650,7 +1650,7 @@ Partial Class RH_Personal
' 'GuardaLog("Inicia Petición de Aplicación")
' oWordApp = New Word.Application
' oWordApp.Visible = True
- ' oWordDoc = oWordApp.Documents.Open(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Contratos\" & "SOGO.doc")
+ ' oWordDoc = oWordApp.Documents.Open(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Contratos\" & "SOGO.doc")
' 'GuardaLog("Inicia Petición de Documento")
' If oWordDoc IsNot Nothing Then
' 'GuardaLog("Creación de Documento")
@@ -1679,10 +1679,10 @@ Partial Class RH_Personal
' 'GuardaLog("Termina de reemplazo de variables")
' objSelection.TypeBackspace()
' objSelection.TypeBackspace()
- ' If Not System.IO.Directory.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\") Then
- ' System.IO.Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\")
+ ' If Not System.IO.Directory.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\") Then
+ ' System.IO.Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\")
' End If
- ' ArchivoPath = AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & UsuarioActual.CveUsuario & ".doc"
+ ' ArchivoPath = ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & UsuarioActual.CveUsuario & ".doc"
' oWordDoc.SaveAs(ArchivoPath.ToString)
' oWordDoc.Close()
@@ -1760,11 +1760,11 @@ Partial Class RH_Personal
DdlClienteAsignado.Attributes.Remove("onclick")
DdlClienteAsistenciaC.Attributes.Remove("onclick")
DdlClienteAsistenciaA.Attributes.Remove("onclick")
- End Sub
-
+ End Sub
+
#Region "Buzón de Calidad"
-
-
+
+
Private Sub CargaBuzonCalidad()
Dim ObjPersonal As New ClsRH
@@ -2100,12 +2100,12 @@ Partial Class RH_Personal
End If
GvBuzonCalidad.DataBind()
UpDatos.Update()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "Resguardos"
-
+
Protected Sub GvResguardos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvResguardos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -2128,13 +2128,13 @@ Partial Class RH_Personal
e.Row.FCLiteral("LtlAF").Text = Liga & e.Row.FCLiteral("LtlAF").Text & ""
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "Nómina"
-
-
+
+
Private Sub CarcaConceptosNomina()
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonalConceptos(CvePersonal, UsuarioActual.CveEmpresa) Then
@@ -2182,46 +2182,46 @@ Partial Class RH_Personal
Dim TipoAplicacion As String = e.Row.DBCampo("TipoAplicacion").ToString()
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Clear()
e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Seleccione", "-1"))
- If (e.Row.DBCampo("CveSistema").ToString() = "3") Then
- e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Movto Permanente)", "5000"))
- e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Porcentaje)", "5001"))
- e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Factor Descuento)", "5002"))
- e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Cuota Fija)", "5003"))
-
- ElseIf (e.Row.DBCampo("CveSistema").ToString() = "4") Then
- e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Fonacot(Importe fijo)", "3001"))
- e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Fonacot(Por días Labarados)", "3002"))
- Else
- e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Saldo", "1"))
- e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("No. Pagos", "2"))
- e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Permanente", "2600"))
- End If
-
-
- If e.Row.DBCampo("TipoAplicacion").ToEntero > 5 Then
- TipoAplicacion = "2600"
- End If
- e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValueExist(TipoAplicacion)
- End If
-
- 'If e.Row.DBCampo("TipoCalculo") = "False" Then
- ' e.Row.FCTextBox("TxtImporte").Visible = False
- ' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False
- 'Else
- ' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero
- ' Case 1
- ' 'Saldo
- ' e.Row.FCLiteral("LtlSaldo").Visible = True
- ' e.Row.FCTextBox("TxtSaldoIni").Visible = True
- ' Case 2
- ' 'Numero de Pagos
- ' e.Row.FCLiteral("LtlNoPago").Visible = True
- ' e.Row.FCTextBox("TxtNoPagos").Visible = True
- ' Case 2600
- ' 'Permanente
- ' End Select
- 'End If
-
+ If (e.Row.DBCampo("CveSistema").ToString() = "3") Then
+ e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Movto Permanente)", "5000"))
+ e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Porcentaje)", "5001"))
+ e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Factor Descuento)", "5002"))
+ e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Infonavit(Cuota Fija)", "5003"))
+
+ ElseIf (e.Row.DBCampo("CveSistema").ToString() = "4") Then
+ e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Fonacot(Importe fijo)", "3001"))
+ e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Fonacot(Por días Labarados)", "3002"))
+ Else
+ e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Saldo", "1"))
+ e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("No. Pagos", "2"))
+ e.Row.FCDropDownList("DdlTipoAplicacion").Items.Add(New ListItem("Permanente", "2600"))
+ End If
+
+
+ If e.Row.DBCampo("TipoAplicacion").ToEntero > 5 Then
+ TipoAplicacion = "2600"
+ End If
+ e.Row.FCDropDownList("DdlTipoAplicacion").SelectedValueExist(TipoAplicacion)
+ End If
+
+ 'If e.Row.DBCampo("TipoCalculo") = "False" Then
+ ' e.Row.FCTextBox("TxtImporte").Visible = False
+ ' e.Row.FCDropDownList("DdlTipoAplicacion").Visible = False
+ 'Else
+ ' Select Case e.Row.DBCampo("TipoAplicacion").ToEntero
+ ' Case 1
+ ' 'Saldo
+ ' e.Row.FCLiteral("LtlSaldo").Visible = True
+ ' e.Row.FCTextBox("TxtSaldoIni").Visible = True
+ ' Case 2
+ ' 'Numero de Pagos
+ ' e.Row.FCLiteral("LtlNoPago").Visible = True
+ ' e.Row.FCTextBox("TxtNoPagos").Visible = True
+ ' Case 2600
+ ' 'Permanente
+ ' End Select
+ 'End If
+
End If
End Sub
@@ -2305,9 +2305,9 @@ Partial Class RH_Personal
ObjPersonal.Dispose()
End If
- End Sub
+ End Sub
#End Region
-
+
Protected Sub DdlTipoAplicacion_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Ddl As DropDownList = DirectCast(sender, DropDownList)
@@ -2389,10 +2389,10 @@ Partial Class RH_Personal
End If
End If
- End Sub
-
+ End Sub
+
#Region "G A S T O S X C O M P R O B A R"
-
+
Protected Sub RBLTipoGastos_SelectedIndexChanged(sender As Object, e As EventArgs)
If RBLTipoGastos.SelectedValue = "1" Then
@@ -2481,10 +2481,10 @@ Partial Class RH_Personal
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "E V E N T O - B I T A C O R A"
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -2560,9 +2560,9 @@ Partial Class RH_Personal
HttpContext.Current.Response.End()
Archivo = Nothing
- End Sub
+ End Sub
#End Region
-
+
Protected Sub GvGxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvGxC.RowDataBound, GvGxCHistorial.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 1 Then
@@ -2615,7 +2615,7 @@ Partial Class RH_Personal
- End Sub
+ End Sub
#Region "TAB BANCOS"
Private Sub CargaMonedas()
DdlMoneda.DataSource = GlobalDTMonedas
@@ -2763,8 +2763,8 @@ Partial Class RH_Personal
ObjCuentasBancos.Dispose()
CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
- End Sub
-
+ End Sub
+
#Region "GRIDVIEW - CUENTAS BANCARIAS"
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -2818,8 +2818,8 @@ Partial Class RH_Personal
Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString.ToEntero
Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
- Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
-
+ Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
+
Dim BBVAAlias As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtBBVAAlias").Text
Dim RefCrediProveedor = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim
@@ -2917,11 +2917,11 @@ Partial Class RH_Personal
CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString)
ObjCuentasBancos.Dispose()
CargaGvBitacora()
- End Sub
+ End Sub
#End Region
#End Region
-
-
+
+
#Region "O R D E N A M I E N T O"
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim Orden As String = ""
@@ -2957,10 +2957,10 @@ Partial Class RH_Personal
ViewState("Orden1") = Orden
CargaGvAsistencias()
End If
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region "I M P R I M I R N O M I N A"
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
@@ -2968,11 +2968,11 @@ Partial Class RH_Personal
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "Recibo")
- End Sub
-
+ End Sub
+
#End Region
-
-
+
+
#Region " ORGANIGRAMA "
Private Sub CargaSuperioresOrganigrama()
Dim ObjRH As New ClsRH
@@ -2993,10 +2993,10 @@ Partial Class RH_Personal
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region "I M P R I M I R "
Private Sub GenerarPDF(Optional Formato As String = "PDF")
@@ -3067,7 +3067,7 @@ Partial Class RH_Personal
- If File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL & ".png") Then
+ If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL & ".png") Then
params.Add(New ReportParameter("LogoUri", "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & ObjPersonal.URL & ".png"))
Else
params.Add(New ReportParameter("LogoUri", ""))
@@ -3169,7 +3169,7 @@ Partial Class RH_Personal
- If File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL & ".png") Then
+ If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL & ".png") Then
params.Add(New ReportParameter("LogoUri", "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & ObjPersonal.URL & ".png"))
Else
params.Add(New ReportParameter("LogoUri", ""))
@@ -3215,7 +3215,7 @@ Partial Class RH_Personal
- If File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.CvePersonal & ".png") Then
+ If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.CvePersonal & ".png") Then
params.Add(New ReportParameter("LogoUri", String.Format("{0}://{1}:{2}/Empresas/{3}/RH/Personal/{4}.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, ObjPersonal.CvePersonal)))
Else
params.Add(New ReportParameter("LogoUri", ""))
@@ -3298,12 +3298,12 @@ Partial Class RH_Personal
End Sub
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
GenerarPDFGastosXComp("Excel")
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "D O C U M E N T A C I O N C O N T R A T O S"
-
+
Private Sub CargaDocumentacionFirmaDecontratos()
If CvePersonal > 0 Then
@@ -3614,7 +3614,7 @@ Partial Class RH_Personal
End Sub
Public Sub DescarFormato(documento As String)
- Dim PathRoot As String = Server.MapPath("/")
+ Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
Dim PathSource As String
Dim pathDesti As String
@@ -3994,10 +3994,10 @@ Partial Class RH_Personal
RegistraScript("Download('" & baseUrl & "')")
- End Sub
-
+ End Sub
+
#End Region
-
+
Protected Sub LBCancelar_Click(sender As Object, e As EventArgs)
Dim FolioFiscal = CType(sender, LinkButton).CommandArgument.ToString
@@ -4018,10 +4018,10 @@ Partial Class RH_Personal
Obj = Nothing
- End Sub
-
+ End Sub
+
#Region "VACACIONES"
-
+
Private Sub CargaVacaciones()
Dim objRH As New ClsRH
@@ -4263,7 +4263,7 @@ Partial Class RH_Personal
'ElseIf UsuarioActual.CveEmpresa = 72 Then
- ' Dim PathRoot As String = Server.MapPath("/")
+ ' Dim PathRoot As String = ModExtensiones.DirectorioBaseEmpresas
' Dim FormatoNombre As String = "PermisoSolicitud.docx"
' Dim RutaFormato As String = $"{PathRoot}\Empresas\{UsuarioActual.CveEmpresa}\Formatos\{FormatoNombre} "
' Dim RutaDocGral As String = $"{PathRoot}\Empresas\Grales\Formatos\{FormatoNombre} "
@@ -4539,59 +4539,59 @@ Partial Class RH_Personal
Response.ContentType = "application/force-download"
Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicitud_Vacaciones_" & Now.ToString("yyyyMMddhhmmss") & ".pdf")
Response.BinaryWrite(bytesInStream)
- Response.End()
- Else
- Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.", TipoMensaje.MsgAdvertencia)
+ Response.End()
+ Else
+ Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.", TipoMensaje.MsgAdvertencia)
End If
End Sub
Public Sub DownLoad_ClickSolicitudPermiso(sender As Object, e As EventArgs)
- Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- 'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
- 'DescarSolicitudVacaciones(Folio)
- Dim RutaFormato As String = String.Format("{0}Formatos\PermisoSolicitud.docx", UsuarioActual.Empresa.Ruta)
-
- Dim NombreEmpleado As String = String.Format("{0} {1} {2}", TxtAPaterno.Text, TxtAMaterno.Text, TxtNombres.Text)
- Dim Codigo As String = TxtCodigo.Text
- Dim Departamento As String = DdlDepartamento.SelectedItem.Text
- Dim JefeInmediato As String = DdlSupervisorOrganigrama.SelectedItem.Text
- Dim FechaInicio As String = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy")
- Dim FechaFin As String = GvRow.DataKey("FechaFin").ToDateTime().ToString("dd/MM/yyyy")
- Dim diasPermiso As String = $"{(GvRow.DataKey("FechaFin").ToDate() - GvRow.DataKey("FechaInicio").ToDate()).Days}"
- Dim HorasPermiso As String = "" 'String.Format("{0}", ((GvRow.DataKey("FechaInicio").ToDateTime() - GvRow.DataKey("FechaFin").ToDateTime()).Hours))
- Dim MotivoPermiso As String = String.Format("{0},{1}", GvRow.DataKey("Descripcion"), GvRow.DataKey("Motivo"))
- If File.Exists(RutaFormato) Then
-
- Dim objGemDocument As New clsGemBoxDocument(RutaFormato)
- Dim ListaTags As New List(Of TagsDocumentos)
-
- ListaTags = GetDatosTagsDocumentos()
-
- ListaTags.Add(New TagsDocumentos("{NombreEmpleado}", NombreEmpleado))
- ListaTags.Add(New TagsDocumentos("{Codigo}", Codigo))
- ListaTags.Add(New TagsDocumentos("{Departamento}", Departamento))
- ListaTags.Add(New TagsDocumentos("{JefeInmediato}", JefeInmediato))
- ListaTags.Add(New TagsDocumentos("{FechaInicio}", FechaInicio))
- ListaTags.Add(New TagsDocumentos("{FechaFin}", FechaFin))
- ListaTags.Add(New TagsDocumentos("{diasPermiso}", diasPermiso))
- ListaTags.Add(New TagsDocumentos("{HorasPermiso}", HorasPermiso))
- ListaTags.Add(New TagsDocumentos("{MotivoPermiso}", MotivoPermiso))
-
- objGemDocument.SustituirTags(ListaTags)
-
- 'objGemDocument.GuardarStream()
- objGemDocument.GuardarStreamPDF()
- Dim bytesInStream As Byte() = objGemDocument.GetBytesDocumento()
- 'Dim bytesInStream As Byte() = objGemDocument.memoryStream.ToArray
- objGemDocument.Dispose()
-
- Response.Clear()
- Response.ContentType = "application/force-download"
- Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicituddepermiso_" & Now.ToString("yyyyMMddhhmmss") & ".pdf")
- Response.BinaryWrite(bytesInStream)
- Response.End()
- Else
- Alert("No se encontro el formato de Permisos", TipoMensaje.ToastAdventencia)
+ Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
+ 'Dim Folio As Integer = GvRow.DataKey("Folio").ToEntero
+ 'DescarSolicitudVacaciones(Folio)
+ Dim RutaFormato As String = String.Format("{0}Formatos\PermisoSolicitud.docx", UsuarioActual.Empresa.Ruta)
+
+ Dim NombreEmpleado As String = String.Format("{0} {1} {2}", TxtAPaterno.Text, TxtAMaterno.Text, TxtNombres.Text)
+ Dim Codigo As String = TxtCodigo.Text
+ Dim Departamento As String = DdlDepartamento.SelectedItem.Text
+ Dim JefeInmediato As String = DdlSupervisorOrganigrama.SelectedItem.Text
+ Dim FechaInicio As String = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy")
+ Dim FechaFin As String = GvRow.DataKey("FechaFin").ToDateTime().ToString("dd/MM/yyyy")
+ Dim diasPermiso As String = $"{(GvRow.DataKey("FechaFin").ToDate() - GvRow.DataKey("FechaInicio").ToDate()).Days}"
+ Dim HorasPermiso As String = "" 'String.Format("{0}", ((GvRow.DataKey("FechaInicio").ToDateTime() - GvRow.DataKey("FechaFin").ToDateTime()).Hours))
+ Dim MotivoPermiso As String = String.Format("{0},{1}", GvRow.DataKey("Descripcion"), GvRow.DataKey("Motivo"))
+ If File.Exists(RutaFormato) Then
+
+ Dim objGemDocument As New clsGemBoxDocument(RutaFormato)
+ Dim ListaTags As New List(Of TagsDocumentos)
+
+ ListaTags = GetDatosTagsDocumentos()
+
+ ListaTags.Add(New TagsDocumentos("{NombreEmpleado}", NombreEmpleado))
+ ListaTags.Add(New TagsDocumentos("{Codigo}", Codigo))
+ ListaTags.Add(New TagsDocumentos("{Departamento}", Departamento))
+ ListaTags.Add(New TagsDocumentos("{JefeInmediato}", JefeInmediato))
+ ListaTags.Add(New TagsDocumentos("{FechaInicio}", FechaInicio))
+ ListaTags.Add(New TagsDocumentos("{FechaFin}", FechaFin))
+ ListaTags.Add(New TagsDocumentos("{diasPermiso}", diasPermiso))
+ ListaTags.Add(New TagsDocumentos("{HorasPermiso}", HorasPermiso))
+ ListaTags.Add(New TagsDocumentos("{MotivoPermiso}", MotivoPermiso))
+
+ objGemDocument.SustituirTags(ListaTags)
+
+ 'objGemDocument.GuardarStream()
+ objGemDocument.GuardarStreamPDF()
+ Dim bytesInStream As Byte() = objGemDocument.GetBytesDocumento()
+ 'Dim bytesInStream As Byte() = objGemDocument.memoryStream.ToArray
+ objGemDocument.Dispose()
+
+ Response.Clear()
+ Response.ContentType = "application/force-download"
+ Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicituddepermiso_" & Now.ToString("yyyyMMddhhmmss") & ".pdf")
+ Response.BinaryWrite(bytesInStream)
+ Response.End()
+ Else
+ Alert("No se encontro el formato de Permisos", TipoMensaje.ToastAdventencia)
End If
End Sub
@@ -4710,12 +4710,12 @@ Partial Class RH_Personal
objRH.Dispose()
Return ListaTags
- End Function
-
+ End Function
+
#End Region
-
+
#Region "CURSOS"
-
+
Private Sub CargaCursos()
Dim objRH As New ClsRH
@@ -4813,11 +4813,11 @@ Partial Class RH_Personal
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "UNIFORMES"
Private Sub CargaComboUniformes()
@@ -4942,12 +4942,12 @@ Partial Class RH_Personal
CargaUniformesPersonal()
End If
ObjInv.Dispose()
- End Sub
-
-
-
+ End Sub
+
+
+
#End Region
-
+
#Region "CARGAR IMAGEN"
Private Sub LnkSubirFacturas_Click(sender As Object, e As EventArgs) Handles LnkSubirFacturas.Click
RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo"))
@@ -4963,27 +4963,27 @@ Partial Class RH_Personal
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
filemove = fileItem.filename
- Dim yaExistente As String = String.Format("{0}Empresas\{1}\RH\Personal\{2}.jpg", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, CvePersonal)
- If File.Exists(yaExistente) Then
- File.Delete(yaExistente)
- End If
-
+ Dim yaExistente As String = String.Format("{0}Empresas\{1}\RH\Personal\{2}.jpg", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, CvePersonal)
+ If File.Exists(yaExistente) Then
+ File.Delete(yaExistente)
+ End If
+
If filemove <> "" Then
filemove.FilesMove(CvePersonal.ToString, String.Format("Empresas\{0}\RH\Personal\", UsuarioActual.CveEmpresa))
End If
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString, FileExtension)
Next
- If File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & ".jpg") Then
- ImgPersonal.ImageUrl = $"/Empresas/{UsuarioActual.CveEmpresa}/RH/Personal/{CvePersonal}.jpg?version={Now}"
+ If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & ".jpg") Then
+ ImgPersonal.ImageUrl = $"/Empresas/{UsuarioActual.CveEmpresa}/RH/Personal/{CvePersonal}.jpg?version={Now}"
End If
UpImage.Update()
TxtCargaImg.Text = "[]"
UpAddArchivo.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo"))
- End Sub
-
+ End Sub
+
#Region "PERMISOS"
-
+
Public Sub CargaPermisos()
Dim ObjRH As New ClsRH
@@ -5109,57 +5109,57 @@ Partial Class RH_Personal
ObjRH.Dispose()
CargaPermisos()
- End Sub
-
-
-
+ End Sub
+
+
+
#End Region
-
-
-
+
+
+
#End Region
-
-
- 'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click
- ' Preguntar si existe en temporales
- ' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString) Then
- ' Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString)
- ' If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
- ' If File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
- ' File.Delete(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
- ' File.Move(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
- ' Else
- ' File.Move(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
- ' End If
-
- ' Else
- ' Imagen Default
- ' If ImgPersonal.ImageUrl = "../Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" Then
- ' ImgPersonal.ImageUrl = "/Imagenes/SinImagen.jpg"
- ' End If
- ' End If
-
-
- ' Si existe mover de temporales a .../Empresas/RH/Personal, SINO Session("FileUpload") = ""
- ' Si existe en: .../Empresas/RH/Personal Guardar, SINO Session("FileUpload") = ""
-
-
-
-
- ' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString) Then
- ' Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString)
- ' If Not Directory.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
- ' Session("FileUpload") = ""
-
- ' If File.Exists(Request.PhysicalApplicationPath + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
- ' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & CvePersonal & Extension
-
- ' End If
- ' End If
- 'End Sub
-
+
+
+ 'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click
+ ' Preguntar si existe en temporales
+ ' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString) Then
+ ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString)
+ ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
+ ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
+ ' File.Delete(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
+ ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString, ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
+ ' Else
+ ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString, ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension)
+ ' End If
+
+ ' Else
+ ' Imagen Default
+ ' If ImgPersonal.ImageUrl = "../Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" Then
+ ' ImgPersonal.ImageUrl = "/Imagenes/SinImagen.jpg"
+ ' End If
+ ' End If
+
+
+ ' Si existe mover de temporales a .../Empresas/RH/Personal, SINO Session("FileUpload") = ""
+ ' Si existe en: .../Empresas/RH/Personal Guardar, SINO Session("FileUpload") = ""
+
+
+
+
+ ' If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString) Then
+ ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString)
+ ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal")
+ ' Session("FileUpload") = ""
+
+ ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then
+ ' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & CvePersonal & Extension
+
+ ' End If
+ ' End If
+ 'End Sub
+
#Region "Consumos"
-
+
Private Sub Consumos()
Dim ObjCompras As New ClsCompras
@@ -5202,7 +5202,7 @@ Partial Class RH_Personal
Protected Sub GenerarPDFConsumo(Optional Formato As String = "PDF")
Dim CodigoP As String = ""
Dim NombreCompletoP As String = ""
- Dim Ruta As String = String.Format("{0}Empresas/{1}/", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa)
+ Dim Ruta As String = String.Format("{0}Empresas/{1}/", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)
Dim RutaPDF As String = String.Format("{0}/Formatos/RepConsumoPersonal.rdlc", Ruta)
If Not File.Exists(RutaPDF) Then
RutaPDF = "Empresas/Grales/Formatos/RepConsumoPersonal.rdlc"
@@ -5238,10 +5238,10 @@ Partial Class RH_Personal
End Sub
Protected Sub LnkImprimirPDFConsumo_Click(sender As Object, e As EventArgs)
GenerarPDFConsumo()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region ""
Protected Sub LbMail_Click(sender As Object, e As EventArgs)
@@ -5325,9 +5325,9 @@ Partial Class RH_Personal
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "VIATICOS"
Protected Sub CargaViaticosPersonal()
Dim ObjBancos As ClsBancos = New ClsBancos
@@ -5362,11 +5362,11 @@ Partial Class RH_Personal
If (e.Row.RowType = DataControlRowType.Footer) Then
e.Row.FCLiteral("LtTotalImporte").Text = DTViaticosDetalle.SUM("Importe").FormatoNumero()
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "BITACORA"
-
+
Private Sub CargaGvBitacora()
If CvePersonal > 0 Then
@@ -5379,12 +5379,12 @@ Partial Class RH_Personal
UpHistorialModificacion.Update()
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "PAGO DE FACTURAS"
-
+
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaPagoFactura()
UpnHistorial.Update()
@@ -5397,10 +5397,10 @@ Partial Class RH_Personal
End If
ObjRH.Dispose()
GVPagoFactura.DataBind()
- End Sub
-
+ End Sub
+
#End Region
-
+
Protected Sub BtnSaldoInicial_Click(sender As Object, e As EventArgs)
Dim SaldoInicial As Double = TxtSaldoInicial.Text.ToDouble()
Dim Fecha As DateTime = TxtFechaSaldo.Text.ToDateTime()
@@ -5416,8 +5416,8 @@ Partial Class RH_Personal
End Sub
Private Function AgregarSaldoInicial(SaldoInicial As Double, Fecha As DateTime, CveMoneda As Integer, ObjMov As ClsContabilidad) As Integer
Return ObjMov.AddPrePolizas("RH/Personal", 13, SaldoInicial, SaldoInicial, CveMoneda, Fecha, "Saldo Inicial", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
- End Function
-
+ End Function
+
#Region "L I C E N C I A S"
Public Sub CargaLicencias()
If CvePersonal > 0 Then
@@ -5564,7 +5564,7 @@ Partial Class RH_Personal
End If
RegistraScript("$('#DivAddLicencias').modal('hide');")
- End Sub
+ End Sub
#End Region
Protected Sub BtnPDFResguardo_Click(sender As Object, e As EventArgs)
GenerarPDFResguardosAF()
@@ -5640,14 +5640,14 @@ Partial Class RH_Personal
Alert("No se encontraron registros .", TipoMensaje.MsgAdvertencia)
End If
- End Sub
-
-
-#Region "FAMILIARES"
-
-
- Private Sub CargaFamiliares()
-
+ End Sub
+
+
+#Region "FAMILIARES"
+
+
+ Private Sub CargaFamiliares()
+
If CvePersonal <> -1 Then
Dim objRH As New ClsRH
@@ -5672,12 +5672,12 @@ Partial Class RH_Personal
UPTabFamiliares.Update()
End If
- End Sub
-
- Private Sub CrearEstructuraFamiliares()
-
- Dim Familiares As New DataTable
-
+ End Sub
+
+ Private Sub CrearEstructuraFamiliares()
+
+ Dim Familiares As New DataTable
+
Familiares.Columns.Add("CveFamiliar", Type.GetType("System.Int32"))
Familiares.Columns.Add("CvePersonal", Type.GetType("System.Int32"))
Familiares.Columns.Add("CveParentesco", Type.GetType("System.Int32"))
@@ -5693,19 +5693,19 @@ Partial Class RH_Personal
Familiares.Columns.Add("Observaciones", Type.GetType("System.String"))
Familiares.Columns.Add("Beneficiario", Type.GetType("System.Boolean"))
- DTFamiliares = Familiares
-
- End Sub
-
-
+ DTFamiliares = Familiares
+
+ End Sub
+
+
Protected Sub BtnAgregarFamiliar_Click(sender As Object, e As EventArgs) Handles BtnAgregarFamiliar.Click
ResetFormFamiliares()
RegistraScript("$('#divAgregarFamiliar').modal({ backdrop: 'static', keyboard: false});")
- End Sub
-
-
- Private Sub ResetFormFamiliares()
-
+ End Sub
+
+
+ Private Sub ResetFormFamiliares()
+
ActualizarFamiliar = False
CveFamiliar = -1
@@ -5722,8 +5722,8 @@ Partial Class RH_Personal
UpModalFamiliar.Update()
- End Sub
-
+ End Sub
+
Protected Sub BtnAgregarFamiliarModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarFamiliarModal.Click
If ActualizarFamiliar Then
@@ -5785,8 +5785,8 @@ Partial Class RH_Personal
CveFamiliar = -1
ActualizarFamiliar = False
- End Sub
-
+ End Sub
+
Public Sub Edit_ClickFamiliar(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = True
@@ -5810,9 +5810,9 @@ Partial Class RH_Personal
UpModalFamiliar.Update()
RegistraScript("$('#divAgregarFamiliar').modal({ backdrop: 'static', keyboard: false});")
- End Sub
-
-
+ End Sub
+
+
Public Sub Remove_ClickFamiliar(sender As Object, e As EventArgs)
@@ -5826,13 +5826,13 @@ Partial Class RH_Personal
DTFamiliares.Rows(IndexActual)("Accion") = "3"
Dim objRH As New ClsRH
- ProcesaDTFamiliares(objRH)
- objRH.Dispose()
-
- CargaFamiliares()
-
-
-
+ ProcesaDTFamiliares(objRH)
+ objRH.Dispose()
+
+ CargaFamiliares()
+
+
+
Else
DTFamiliares.Rows(IndexActual).Delete()
DTFamiliares.AcceptChanges()
@@ -5842,40 +5842,40 @@ Partial Class RH_Personal
End If
IndexActual = -1
- End Sub
-
- Private Sub ProcesaDTFamiliares(ByRef objRH As ClsRH)
-
- 'Dim objRH As New ClsRH
-
+ End Sub
+
+ Private Sub ProcesaDTFamiliares(ByRef objRH As ClsRH)
+
+ 'Dim objRH As New ClsRH
+
ValPadre = False
ValMadre = False
- For Each dRow As DataRow In DTFamiliares.Rows
-
-
-
- If dRow("Accion").ToString = "1" Then 'Actualiza
-
- Dim Beneficiario As Integer = -1
-
- If Boolean.Parse(dRow("Beneficiario").ToString) Then
- Beneficiario = 1
- Else
- Beneficiario = 0
- End If
-
-
+ For Each dRow As DataRow In DTFamiliares.Rows
+
+
+
+ If dRow("Accion").ToString = "1" Then 'Actualiza
+
+ Dim Beneficiario As Integer = -1
+
+ If Boolean.Parse(dRow("Beneficiario").ToString) Then
+ Beneficiario = 1
+ Else
+ Beneficiario = 0
+ End If
+
+
objRH.PersonalFamiliaresUpdate(dRow("CveFamiliar").ToString.ToEntero, CvePersonal, dRow("CveParentesco").ToString.ToEntero, dRow("Nombre").ToString, dRow("Domicilio").ToString, dRow("Edad").ToString.ToEntero, dRow("Ocupacion").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString, If(dRow("Observaciones").ToString.Trim = "", "-1", dRow("Observaciones").ToString.Trim), Beneficiario)
End If
- If dRow("Accion").ToString = "2" Then 'Inserta
-
-
- Dim Beneficiario As Boolean = Boolean.Parse(dRow("Beneficiario").ToString)
-
-
-
+ If dRow("Accion").ToString = "2" Then 'Inserta
+
+
+ Dim Beneficiario As Boolean = Boolean.Parse(dRow("Beneficiario").ToString)
+
+
+
objRH.PersonalFamiliaresAdd(CvePersonal, dRow("CveParentesco").ToString.ToEntero, dRow("Nombre").ToString, dRow("Domicilio").ToString, dRow("Edad").ToString.ToEntero, dRow("Ocupacion").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, dRow("Telefono").ToString, If(dRow("Observaciones").ToString.Trim = "", "-1", dRow("Observaciones").ToString.Trim), Beneficiario)
End If
@@ -5896,16 +5896,16 @@ Partial Class RH_Personal
'objRH.Dispose()
- End Sub
-
-#End Region
-
-
- Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs)
- Dim ddl As DropDownList = DirectCast(sender, DropDownList)
- Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow)
- If ddl.SelectedItem.Text = "Retardo" Then
- gvrow.FCTextBox("TxtPorPago").Text = "87.5"
- End If
- End Sub
+ End Sub
+
+#End Region
+
+
+ Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs)
+ Dim ddl As DropDownList = DirectCast(sender, DropDownList)
+ Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow)
+ If ddl.SelectedItem.Text = "Retardo" Then
+ gvrow.FCTextBox("TxtPorPago").Text = "87.5"
+ End If
+ End Sub
End Class
diff --git a/RH/Reclutamiento.aspx.vb b/RH/Reclutamiento.aspx.vb
index 1a334f1a0..9a2d3f88e 100644
--- a/RH/Reclutamiento.aspx.vb
+++ b/RH/Reclutamiento.aspx.vb
@@ -5352,8 +5352,8 @@ Partial Class RH_Reclutamiento
End If
Dim CveCaptacion As Integer = If(DdlCaptacion.SelectedValue.ToEntero = 0, -1, DdlCaptacion.SelectedValue.ToEntero)
- Edad = Now.Year - TxtFechaN4.Text.ToDate.Year
-
+ Edad = Now.Year - TxtFechaN4.Text.ToDate.Year
+
If ValidaGuardaFirmaContratoEvento() Then
If objRh.PersonalReclutamientoUpdate(CvePersonal, TxtNombres4.Text, TxtAPaterno4.Text, TxtAmaterno4.Text, TxtEstatura4.Text.ToDecimal, TxtPeso4.Text.ToDecimal,
TxtLugarnacimiento4.Text, TxtContactoEmergencia4.Text, TxtTipoSangre4.Text, TxtViveCon4.Text, txtCasaDondevive4.Text, DDLEstadoCivil4.Text.ToEntero,
@@ -5449,8 +5449,8 @@ Partial Class RH_Reclutamiento
DDLUsuarioNomina.DataBind()
- If Not UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) Then
- DDLUsuarioNomina.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
+ If Not UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) Then
+ DDLUsuarioNomina.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
End If
DdlUniforme.DataBind()
diff --git a/RH/RepBuzonCalidad.aspx.vb b/RH/RepBuzonCalidad.aspx.vb
index f04d7b913..85ec18f65 100644
--- a/RH/RepBuzonCalidad.aspx.vb
+++ b/RH/RepBuzonCalidad.aspx.vb
@@ -66,7 +66,7 @@ Partial Class RH_RepBuzonCalidad
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
Else
'
- If System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & e.Row.DBCampo("CvePersonal") & ".png") Then
+ If System.IO.File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & e.Row.DBCampo("CvePersonal") & ".png") Then
e.Row.FCImage("ImgPersonal").ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & e.Row.DBCampo("CvePersonal") & ".png"
End If
e.Row.Cells(0).Visible = False
diff --git a/Sistemas/Empresa.aspx.vb b/Sistemas/Empresa.aspx.vb
index 5123b5744..7eed1fdc5 100644
--- a/Sistemas/Empresa.aspx.vb
+++ b/Sistemas/Empresa.aspx.vb
@@ -589,8 +589,8 @@ Partial Class Sistemas_Empresa
'verifico si existe la carpeta de la empresa, sino la crea
For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows
- If Not IO.Directory.Exists(String.Format("{0}\{1}", AppDomain.CurrentDomain.BaseDirectory, dr("CveEmpresa"))) Then
- IO.Directory.CreateDirectory(String.Format("{0}Empresas\{1}", AppDomain.CurrentDomain.BaseDirectory, dr("CveEmpresa")))
+ If Not IO.Directory.Exists(String.Format("{0}\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa"))) Then
+ IO.Directory.CreateDirectory(String.Format("{0}Empresas\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa")))
End If
Next
End If
@@ -1464,8 +1464,8 @@ Partial Class Sistemas_Empresa
Dim Archivopfx As String
Dim Archivokey As Archivo = Nothing
Dim Archivocer As Archivo = Nothing
- Dim dirbase = String.Format("{0}Empresas\{1}\Certificados\Fiel\", AppDomain.CurrentDomain.BaseDirectory, ViewState("CveEmpresa"))
- Dim dirbasepfx = String.Format("{0}Empresas\{1}\Certificados\", AppDomain.CurrentDomain.BaseDirectory, ViewState("CveEmpresa"))
+ Dim dirbase = String.Format("{0}Empresas\{1}\Certificados\Fiel\", ModExtensiones.DirectorioBaseEmpresas, ViewState("CveEmpresa"))
+ Dim dirbasepfx = String.Format("{0}Empresas\{1}\Certificados\", ModExtensiones.DirectorioBaseEmpresas, ViewState("CveEmpresa"))
If (Not Directory.Exists(dirbase)) Then
Directory.CreateDirectory(dirbase)
End If
diff --git a/UserControl/TareaNueva.ascx b/UserControl/TareaNueva.ascx
index 5ac4b74bf..3dab287b5 100644
--- a/UserControl/TareaNueva.ascx
+++ b/UserControl/TareaNueva.ascx
@@ -66,7 +66,7 @@
@@ -255,6 +257,7 @@
$('.TxtTareaNuevaCveContrato').val(obji.CveContrato);
$('.TxtTareaNuevaCveSubProyecto').val(obji.CveSubProyecto);
$('.TxtTareaNuevaCveMovimientoAlmacen').val(obji.CveMovimientoAlmacen);
+ $('.TxtTareaNuevaCveTableroLista').val(obji.CveTableroLista);
//alert(obji.CveCliente);
//$('#iddivAgregarTarea').modal();
$('.BtnopenmodalConPadre').click();
diff --git a/UserControl/TareaNueva.ascx.cs b/UserControl/TareaNueva.ascx.cs
index a70268443..eabbd1f5c 100644
--- a/UserControl/TareaNueva.ascx.cs
+++ b/UserControl/TareaNueva.ascx.cs
@@ -12,7 +12,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl
public Usuario UsuarioActual { get { if (Context.Session["UsuarioSIG"] == null) { return null; } else { return (Usuario)Context.Session["UsuarioSIG"]; } } }
public int CveEventoPadre { get { return ViewState["CveEventoPadre"] != null ? ViewState["CveEventoPadre"].ToString().ToEntero() : 0; } set { ViewState["CveEventoPadre"] = value; } }
public OITipoEventos cveTipoEvento { get { return ViewState["cveTipoEvento"] != null ? (OITipoEventos)ViewState["cveTipoEvento"] : OITipoEventos.Tarea; } set { ViewState["cveTipoEvento"] = value; } }
-
+
//OITipoEventos cveTipoEvento = OITipoEventos.Tarea;
public bool Ismodal { get { return ViewState["Ismodal"] != null ? (bool)ViewState["Ismodal"] : true; } set { ViewState["Ismodal"] = value; } }
public string OnAddedTareaNueva { get { return ViewState["OnAddedTareaNueva"] != null ? ViewState["OnAddedTareaNueva"].ToString() : "OnAddedTareaNueva"; } set { ViewState["OnAddedTareaNueva"] = value; } }
@@ -113,6 +113,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl
TxtCveContrato.Text = TxtCveContrato.Text.ToEntero() > 0 ? TxtCveContrato.Text : "-1";
TxtCveSubProyecto.Text = TxtCveSubProyecto.Text.ToEntero() > 0 ? TxtCveSubProyecto.Text : "-1";
TxtCveMovimientoAlmacen.Text = TxtCveMovimientoAlmacen.Text.ToEntero() > 0 ? TxtCveMovimientoAlmacen.Text : "-1";
+ TxtCveTableroLista.Text = TxtCveTableroLista.Text.ToEntero() > 0 ? TxtCveTableroLista.Text : "-1";
int cveUsuarioDe = UsuarioActual.CveUsuario;
List listaCCP = new List();
@@ -188,12 +189,12 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl
if (cveUsuarioDe <= 0)
{
- errorMessage = "No se selecciono el miembro 'C C Para'";
+ errorMessage = "Asegúrese de seleccionar al menos un miembro \"C C Para\"";
}
if (cveUsuarioPara <= 0)
{
- errorMessage = "No se selecciono el miembro 'Para'";
+ errorMessage = "Asegúrese de seleccionar al menos un miembro \"Para\"";
}
if (errorMessage.Length == 0)
@@ -210,7 +211,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl
CveIE: TxtCveIE.Text.ToEntero(), CveProspecto: TxtCveProspecto.Text.ToEntero(), CveCliente: TxtCveCliente.Text.ToEntero(),
CveOS: TxtCveOS.Text.ToEntero(), CveOC: TxtCveOC.Text.ToEntero(), CvePersonal: TxtCvePersonal.Text.ToEntero(),
CveProveedor: TxtCveProveedor.Text.ToEntero(), CveCompra: TxtCveCompra.Text.ToEntero(), CveVenta: TxtCveVenta.Text.ToEntero(),
- CveContrato: TxtCveContrato.Text.ToEntero(), CveSubProyecto: TxtCveSubProyecto.Text.ToEntero(), CveMovimientoAlmacen: TxtCveMovimientoAlmacen.Text.ToEntero());
+ CveContrato: TxtCveContrato.Text.ToEntero(), CveSubProyecto: TxtCveSubProyecto.Text.ToEntero(), CveMovimientoAlmacen: TxtCveMovimientoAlmacen.Text.ToEntero(), CveTableroLista:TxtCveTableroLista.Text.ToEntero());
CveEvento = objOI.CveEvento;
Folio = objOI.Folio;
@@ -306,7 +307,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl
{
if (objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
- this.Alert("Tema agregada con éxito.", ModExtensiones.TipoMensaje.MsgInformacion);
+ this.Alert(string.Format("El Tema \"{0}\" fue agregada con éxito.", TxtTema.Text.Trim()), ModExtensiones.TipoMensaje.MsgInformacion);
this.RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema));
if (Ismodal)
diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx
index b87da3631..459603c9b 100644
--- a/Ventas/Clientes.aspx
+++ b/Ventas/Clientes.aspx
@@ -291,6 +291,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -494,7 +505,7 @@
-
+
@@ -1348,7 +1359,7 @@
-
+ Cotización
@@ -1477,7 +1488,7 @@
-
+
@@ -1511,7 +1522,7 @@
-
+
@@ -2051,7 +2062,7 @@
-
+
@@ -2107,7 +2118,7 @@
-
+
@@ -4441,12 +4452,19 @@
+
+
+
@@ -4470,7 +4488,7 @@
Descripción
-
+
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index ef9c79f9c..49c2a77f4 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -18,7 +18,7 @@ Partial Class Clientes
Private Opcion As Integer
Public ReadOnly Property RowStyle As TableItemStyle
- Protected ReadOnly Property CveCliente As Integer
+ Private ReadOnly Property CveCliente As Integer
Get
Return ViewState("CveCliente").ToString.ToEntero
End Get
@@ -399,8 +399,8 @@ Partial Class Clientes
Set(value As DataTable)
ViewState("DtPagos") = value
End Set
- End Property
-
+ End Property
+
Private Property DtCotizaciones As DataTable
Get
Return CType(ViewState("DtCotizaciones"), DataTable)
@@ -478,8 +478,8 @@ Partial Class Clientes
Set(value As Boolean)
ViewState("BonificacionUsado") = value
End Set
- End Property
-
+ End Property
+
Private Property linkDescargaPagare As String
Get
Return If(IsNothing(ViewState("linkDescargaPagare")), "", ViewState("linkDescargaPagare").ToString)
@@ -487,10 +487,10 @@ Partial Class Clientes
Set(value As String)
ViewState("linkDescargaPagare") = value
End Set
- End Property
-
+ End Property
+
#End Region
-
+
#Region "Documentacion"
Private Property DTDocumentacion As DataTable
Get
@@ -601,21 +601,21 @@ Partial Class Clientes
Set(value As String)
ViewState("AdjuntoDocumentacion") = value
End Set
- End Property
- 'Private ReadOnly Property CvePersonal As Integer
- ' Get
- ' If ViewState("CvePersonal") Is Nothing Then
- ' Return -1
- ' Else
- ' Return ViewState("CvePersonal").ToString.ToEntero
- ' End If
- ' End Get
- 'End Property
-
+ End Property
+ 'Private ReadOnly Property CvePersonal As Integer
+ ' Get
+ ' If ViewState("CvePersonal") Is Nothing Then
+ ' Return -1
+ ' Else
+ ' Return ViewState("CvePersonal").ToString.ToEntero
+ ' End If
+ ' End Get
+ 'End Property
+
#End Region
-
-
-
+
+
+
#Region " A C U M U L A D O R E S"
Property CveVentaNota As Integer
Get
@@ -655,8 +655,8 @@ Partial Class Clientes
Set(value As String)
ViewState("SerieNotaAcumulador") = value
End Set
- End Property
-
+ End Property
+
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -677,6 +677,7 @@ Partial Class Clientes
TabOtros.Visible = False
TabCuentasEquipos.Visible = True
ReporteDispositivos.Visible = True
+ LnkReporteExcel.Visible = True
TabCuentasEquipos.HeaderText = "Equipos GPS"
TabRH.Visible = False
TabUsuarios.Visible = True
@@ -727,11 +728,11 @@ Partial Class Clientes
If UsuarioActual.TienePermisoProceso(180) Then
ChkEstado.Enabled = True
End If
- End If
-
- If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
- DivTipoRetenciones.Visible = True
- DivRetIVA.Visible = False
+ End If
+
+ If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
+ DivTipoRetenciones.Visible = True
+ DivRetIVA.Visible = False
End If
If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero > 0 Then
@@ -848,6 +849,7 @@ Partial Class Clientes
'PERMISOS PAGINA
If CveCliente > 0 Then
+ LtlTareaNueva.Text = String.Format(" Tarea", CveCliente)
BtnEliminar.Visible = PermiteEliminar()
BtnGuardar.Visible = PermiteEditar()
Else
@@ -886,8 +888,8 @@ Partial Class Clientes
ChkPermiso5.Enabled = False
ChkPermiso6.Enabled = False
- End Sub
-
+ End Sub
+
#Region " PERMISOS PAGINAS "
Private Function PermiteGuardar() As Boolean
Return UsuarioActual.TienePermisoProceso(192)
@@ -897,11 +899,11 @@ Partial Class Clientes
End Function
Private Function PermiteEliminar() As Boolean
Return UsuarioActual.TienePermisoProceso(194)
- End Function
-
+ End Function
+
#End Region
-
-
+
+
#Region "C A R G A S"
Private Sub CreaDtPago()
DtPagos = New DataTable
@@ -1048,14 +1050,14 @@ Partial Class Clientes
DdlMonedaExtranjeraAnticipos.Attributes.Add("onclick", "CargaCuentas(9);")
End Sub
- Private Sub CargaCuentasyConceptos()
- Dim ObjConta As New ClsContabilidad
- If ObjConta.GetCuentasyConceptos(CveCliente) Then
- GvCuentasContable.DataSource = ObjConta.DtResultados
- End If
- ObjConta.Dispose()
- GvCuentasContable.DataBind()
- UpCuentaConceptos.Update()
+ Private Sub CargaCuentasyConceptos()
+ Dim ObjConta As New ClsContabilidad
+ If ObjConta.GetCuentasyConceptos(CveCliente) Then
+ GvCuentasContable.DataSource = ObjConta.DtResultados
+ End If
+ ObjConta.Dispose()
+ GvCuentasContable.DataBind()
+ UpCuentaConceptos.Update()
End Sub
Protected Sub BtnCargarCuentas_Click(sender As Object, e As EventArgs) Handles BtnCargarCuentas.Click
If UsuarioActual.Empresa.ServerContPAQi = "" Then Exit Sub
@@ -1356,9 +1358,9 @@ Partial Class Clientes
'CargaFormaPago33()
'CargaComboCFDI()
- If UsuarioActual.TienePermisoProceso(279) Then
- LnkPorcentajeMarcas.Visible = True
- LnkPorcentajePrecios.Visible = True
+ If UsuarioActual.TienePermisoProceso(279) Then
+ LnkPorcentajeMarcas.Visible = True
+ LnkPorcentajePrecios.Visible = True
End If
If UsuarioActual.TienePermisoProceso(261) Then LnkVerGrafica.Visible = True
@@ -1398,7 +1400,7 @@ Partial Class Clientes
TxtGiro.Text = ObjClientes.Giro
DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString
TxtCC.Text = ObjClientes.NotificarA
- ChkMail.Checked = ObjClientes.EnviarFactura
+ ChkMail.Checked = ObjClientes.EnviarFactura
DdlTipoRetencion.SelectedValueExist(ObjClientes.DtResultados(0)("CveTipoRetencion").ToString)
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
TxtRetIVA.Text = ObjClientes.RetIVA.ToString
@@ -1680,8 +1682,8 @@ Partial Class Clientes
DivBonificacionUsado.Visible = True
CargaUsados()
- If UsuarioActual.TienePermisoProceso(280) Then
- UPUsadosReset.Visible = True
+ If UsuarioActual.TienePermisoProceso(280) Then
+ UPUsadosReset.Visible = True
End If
End If
@@ -1699,9 +1701,9 @@ Partial Class Clientes
Return Retorno
End Function
- Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1")
+ Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
Dim ObjClientes As New ClsClientes()
- If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, TipoDocto:=TipoDocto) Then
+ If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
'Carga Generales
LtlCantidad.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString.FormatoNumero(0)
@@ -1731,7 +1733,7 @@ Partial Class Clientes
GvCxC.DataSource = DtCxCActivas
'solo tomo los 10 ultimos mas el totalizador general
Dim dt As DataTable = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'")
- DtHistorialCxC = dt
+ DtHistorialCxC = dt
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
GvCxCHistorial.DataSource = dt.AsEnumerable().Take(22).CopyToDataTable()
End If
@@ -1753,10 +1755,10 @@ Partial Class Clientes
Private Sub CargaAnticipos(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
- DtClientesAnticipo = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 ")
- GVAnticipos.DataSource = DtClientesAnticipo
- DtAnticipoHistorial = ObjMovtos.DtResultados.FiltraParametros("Saldo <= 0 ")
- GVAnticiposHistorial.DataSource = DtAnticipoHistorial
+ DtClientesAnticipo = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0 ")
+ GVAnticipos.DataSource = DtClientesAnticipo
+ DtAnticipoHistorial = ObjMovtos.DtResultados.FiltraParametros("Saldo <= 0 ")
+ GVAnticiposHistorial.DataSource = DtAnticipoHistorial
Else
GVAnticipos.DataSource = Nothing
DtClientesAnticipo = Nothing
@@ -1882,25 +1884,26 @@ Partial Class Clientes
Private Sub CargaComboCFDI()
DdlUsoCFDI.Items.Clear()
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
- DdlUsoCFDI.DataBind()
- DdlUsoCFDI.Items.Insert(0, New ListItem("Seleccione", "-1"))
-
+ DdlUsoCFDI.DataBind()
+ DdlUsoCFDI.Items.Insert(0, New ListItem("Seleccione", "-1"))
+
DdlSucursalUsoCFDI.Items.Clear()
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
DdlSucursalUsoCFDI.DataBind()
- End Sub
+ End Sub
#End Region
-
+
#Region "V E R M Á S"
-
+
Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs)
If BtnVerMasVentas.Text = "Ver Más" Then
- CargaHistorial(-1, TipoDocto:=RblTipo.SelectedValue)
+ CargaHistorial(-1)
BtnVerMasVentas.Text = "Ver Menos"
Else
- CargaHistorial(21, TipoDocto:=RblTipo.SelectedValue)
+ CargaHistorial(21)
BtnVerMasVentas.Text = "Ver Más"
End If
+ RblTipo_SelectedIndexChanged(RblTipo, EventArgs.Empty)
End Sub
Protected Sub BtnVerMasAnticipos_Click(sender As Object, e As EventArgs)
@@ -1921,12 +1924,12 @@ Partial Class Clientes
CargaBancos(51)
BtnVerMasBancos.Text = "Ver Más"
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "B A N C O S"
- 'CuentasxCobrar Activas (Pagos Recibidos)
+ 'CuentasxCobrar Activas (Pagos Recibidos)
Private Sub CargaBancos(Optional SelectTop As Integer = 51, Optional CveClienteSucursal As Integer = -1)
Dim ObjMovtos As New ClsMovimientos()
'CxC Activas
@@ -1984,9 +1987,9 @@ Partial Class Clientes
TxtParaMail.Text = TxtCobranzaCorreo.Text
UpSendMail.Update()
RegistraScript("$('#ModalDivMail').modal('show');")
- End Sub
+ End Sub
#End Region
-
+
#Region "B T N ´ S"
Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
Dim ObjClientes As New ClsClientes()
@@ -2001,7 +2004,7 @@ Partial Class Clientes
If HdnCveVenta.Value <> "-1" AndAlso HdnFolioVenta.Value <> "-1" Then
Dim ObjMail As New ClsSisMail()
- Dim Ruta As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
+ Dim Ruta As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\"
Dim Cuerpo As String = TxtBody.Text
Dim Asunto As String = ""
@@ -2294,85 +2297,85 @@ Partial Class Clientes
Dim errorContPaq As Boolean = False
Dim IdContPaqi As Integer = 0
- Dim CodigoPersona As Integer = 0
-
-
+ Dim CodigoPersona As Integer = 0
+
+
#Region "comentado"
- 'If UsuarioActual.Empresa.Funcionalidad(522).ToString = "1" Then
-
- ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
-
- ' If ObjContPaqi.GetPersona(TxtRFC.Text) Then
-
- ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
-
- ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString.ToEntero
- ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString.ToEntero
-
- ' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString), 1, 0)
- ' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString
- ' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString
-
- ' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then
- ' errorContPaq = False
- ' Else
- ' errorContPaq = True
- ' End If
-
- ' Else
- ' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then
-
- ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString.ToEntero
- ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString.ToEntero
- ' errorContPaq = False
- ' Else
- ' errorContPaq = True
- ' End If
- ' End If
- ' End If
-
-
- ' If Not errorContPaq Then
- ' Dim IdContPaqiCliente As Integer
-
- ' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then
-
- ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
-
- ' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString.ToEntero
-
- ' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then
- ' errorContPaq = False
- ' Else
- ' errorContPaq = True
- ' End If
- ' Else
- ' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then
- ' errorContPaq = False
- ' Else
- ' errorContPaq = True
- ' End If
- ' End If
- ' Else
- ' errorContPaq = True
- ' End If
- ' End If
-
-
- ' If Not errorContPaq Then
- ' ObjContPaqi.Commit()
- ' ObjContPaqi.Dispose()
- ' Else
- ' ObjContPaqi.RollBack()
- ' ObjContPaqi.Dispose()
- ' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError)
- ' Exit Sub
- ' End If
-
-
- 'End If
+ 'If UsuarioActual.Empresa.Funcionalidad(522).ToString = "1" Then
+
+ ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
+
+ ' If ObjContPaqi.GetPersona(TxtRFC.Text) Then
+
+ ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
+
+ ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString.ToEntero
+ ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString.ToEntero
+
+ ' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString), 1, 0)
+ ' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString
+ ' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString
+
+ ' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then
+ ' errorContPaq = False
+ ' Else
+ ' errorContPaq = True
+ ' End If
+
+ ' Else
+ ' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then
+
+ ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString.ToEntero
+ ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString.ToEntero
+ ' errorContPaq = False
+ ' Else
+ ' errorContPaq = True
+ ' End If
+ ' End If
+ ' End If
+
+
+ ' If Not errorContPaq Then
+ ' Dim IdContPaqiCliente As Integer
+
+ ' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then
+
+ ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
+
+ ' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString.ToEntero
+
+ ' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then
+ ' errorContPaq = False
+ ' Else
+ ' errorContPaq = True
+ ' End If
+ ' Else
+ ' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then
+ ' errorContPaq = False
+ ' Else
+ ' errorContPaq = True
+ ' End If
+ ' End If
+ ' Else
+ ' errorContPaq = True
+ ' End If
+ ' End If
+
+
+ ' If Not errorContPaq Then
+ ' ObjContPaqi.Commit()
+ ' ObjContPaqi.Dispose()
+ ' Else
+ ' ObjContPaqi.RollBack()
+ ' ObjContPaqi.Dispose()
+ ' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError)
+ ' Exit Sub
+ ' End If
+
+
+ 'End If
#End Region
-
+
Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0")
Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0")
@@ -2492,9 +2495,9 @@ Partial Class Clientes
If ErrorProceso Then
ObjClientes.RollBack()
Else
- ObjClientes.Commit()
-
- 'JM 05-02-19: CRM ASIGAN CLIENTE A EMPRESACRM
+ ObjClientes.Commit()
+
+ 'JM 05-02-19: CRM ASIGAN CLIENTE A EMPRESACRM
Dim MensajeCRM As String = ""
If CveEmpresaCRM > 0 Then
If VincularEmpresaCRM() Then
@@ -2532,7 +2535,7 @@ Partial Class Clientes
AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero, CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero, CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero, CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero,
CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero, NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(),
- ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
+ ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero()) Then
@@ -2564,29 +2567,29 @@ Partial Class Clientes
ObjClientes.Commit()
- Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
-
+ Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
+
If EstatusAnteriorCliente <> ChkEstado.Checked Then
Dim DTVendedor As New DataTable
- DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue.ToEntero)
-
- Dim ObjVendedores As New ClsVtaVendedores
- Dim DtVendedores As DataTable = Nothing
- If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
- DtVendedores = ObjVendedores.DtResultados
- End If
+ DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue.ToEntero)
+
+ Dim ObjVendedores As New ClsVtaVendedores
+ Dim DtVendedores As DataTable = Nothing
+ If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
+ DtVendedores = ObjVendedores.DtResultados
+ End If
ObjVendedores.Dispose()
If DTVendedor.Rows.Count > 0 Then
- Dim _CorreoVendedor As String = DTVendedor(0)("Correo").ToString
- Dim _CorreoAsistente As String = ""
- Dim _CorreoCoordinador As String = ""
-
- Dim CveSuperior As Integer = DTVendedor(0)("CveSuperior").ToString.ToEntero
- If DTVendedor.Rows.Count > 0 Then
- _CorreoAsistente = DtVendedores.FiltroPrimeroValor("Correo", "CveSuperior = " & DdlVendedor.SelectedValue.ToEntero)
- _CorreoCoordinador = DtVendedores.FiltroPrimeroValor("Correo", "CveVendedor = " & CveSuperior)
+ Dim _CorreoVendedor As String = DTVendedor(0)("Correo").ToString
+ Dim _CorreoAsistente As String = ""
+ Dim _CorreoCoordinador As String = ""
+
+ Dim CveSuperior As Integer = DTVendedor(0)("CveSuperior").ToString.ToEntero
+ If DTVendedor.Rows.Count > 0 Then
+ _CorreoAsistente = DtVendedores.FiltroPrimeroValor("Correo", "CveSuperior = " & DdlVendedor.SelectedValue.ToEntero)
+ _CorreoCoordinador = DtVendedores.FiltroPrimeroValor("Correo", "CveVendedor = " & CveSuperior)
End If
If (_CorreoVendedor.Length > 0 Or _CorreoAsistente.Length > 0 Or _CorreoCoordinador.Length > 0) And UsuarioActual.Empresa.Funcionalidad(571).ToEntero > 0 Then
@@ -2601,7 +2604,7 @@ Partial Class Clientes
Else
Asunto = "Desactivación de cliente " & TxtNombre.Text
SBBody.Append(String.Format(" Por Medio de la presente se le notifica que el estatus del cliente {0} ha sido desactivado.", TxtNombre.Text))
- End If
+ End If
MandaCorreo(Asunto, Para + "", SBBody.ToString)
End If
End If
@@ -2611,18 +2614,18 @@ Partial Class Clientes
CargaHistorial()
CargaDatos()
UpDatos.Update()
- UpnHistorial.Update()
-
+ UpnHistorial.Update()
+
End If
End If
ObjClientes.Dispose()
objDoc.Dispose()
RecargaGlobal()
- End Sub
-
+ End Sub
+
#End Region
-
-
+
+
#Region "G L O B L A L"
Private Sub RecargaGlobal()
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
@@ -2636,10 +2639,10 @@ Partial Class Clientes
' Application("GlobalDTCliente") = Objclientes.DtResultados
'End If
'Objclientes.Dispose()
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region "G R I D V I E W S"
Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -2800,11 +2803,11 @@ Partial Class Clientes
End If
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "R H"
-
+
Private Sub CargaPersonalAsignado()
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, CveCliente, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
@@ -2877,9 +2880,9 @@ Partial Class Clientes
End If
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "S U C U R S A L E S"
Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click
ChkEstatusSucursal.Checked = True
@@ -2998,10 +3001,10 @@ Partial Class Clientes
CargaDdlSucursalCliente()
ObjCliente.Dispose()
- Me.Actualizar = False
- Me.CveClienteSuc = -1
- RegistraScript("hideDivEC();")
-
+ Me.Actualizar = False
+ Me.CveClienteSuc = -1
+ RegistraScript("hideDivEC();")
+
End Sub
Protected Sub LnkAgragarDireccion_Click(sender As Object, e As EventArgs)
@@ -3013,7 +3016,7 @@ Partial Class Clientes
UpModalDivMapa.Update()
- End Sub
+ End Sub
#Region "G V S U C U R S A L E S"
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVSucursales.RowDataBound
@@ -3132,9 +3135,9 @@ Partial Class Clientes
Else
CargaGrid("", 0)
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "G V U S U A R I O S P O R T A L"
Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand
If e.CommandName = "RestablecerContraseña" Then
@@ -3286,9 +3289,9 @@ Partial Class Clientes
CargaGrid("", 1)
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "O R D E N A M I E N T O"
Private Sub CargaGrid(Orden As String, gvi As Integer)
If gvi = 0 Then
@@ -3320,12 +3323,12 @@ Partial Class Clientes
UPPUsuarios.Update()
End If
- End Sub
+ End Sub
#End Region
-
-
+
+
#End Region
-
+
#Region "U S U A R I O S"
Protected Sub LbSolicitudPortal_Click(sender As Object, e As EventArgs) Handles LbEnviarActivacionPortal.Click
Dim ObjUsuario As New ClsSisUsuarios
@@ -3507,9 +3510,9 @@ Partial Class Clientes
ChkPermiso5.Checked = False
ChkPermiso6.Checked = False
ChkPermiso7.Checked = False
- End Sub
+ End Sub
#End Region
-
+
#Region "E V E N T O - B I T A C O R A"
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -3561,7 +3564,7 @@ Partial Class Clientes
Private Sub CargaEventoBitacora()
Dim ObjEventoBitacora As New ClsOIEventos()
If ObjEventoBitacora.GetAgendaBitacora(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCliente:=CveCliente) Then
- GvEB.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento = 6 OR CveTipoEvento = 2")
+ GvEB.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento IN(6,2,1)")
Else
GvEB.DataSource = Nothing
End If
@@ -3715,11 +3718,11 @@ Partial Class Clientes
BtnActivaRegistroISR.Visible = True
End If
- End Sub
+ End Sub
#End Region
-
+
#Region " I M P R I M I R P D F"
-
+
Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs)
DdlTipoDocto.ClearSelection()
If ChkAntIXCNC.Checked Then
@@ -3733,22 +3736,33 @@ Partial Class Clientes
End Sub
Protected Sub GenerarReporte(sender As Object, e As EventArgs)
- GenerarRepCrystal()
+ GenerarRepCrystal("PDF")
End Sub
- Private Sub GenerarRepCrystal()
- Dim Archivo As New FileInfo(Server.MapPath("~/Empresas/Grales/Formatos/EquiposGPS.rpt"))
- Dim lista = New List(Of CrystalParametro)
- lista.Add(New CrystalParametro("NombreEmpresa", UsuarioActual.Empresa.Empresa))
- lista.Add(New CrystalParametro("NombreUsuario", UsuarioActual.Nombre))
+
+ Protected Sub GenerarReporteExcel(sender As Object, e As EventArgs)
+ GenerarRepCrystal("Excel")
+ End Sub
+
+ Private Sub GenerarRepCrystal(Formato As String)
+ Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+
+ Dim params As New List(Of ReportParameter)
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
+ End If
+ params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("NombreUsuario", UsuarioActual.Usuario))
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
Dim ObjGPS As New ClsGPS
Dim tablaReporte As DataTable
- If ObjGPS.DispositivosGet(-1, Estatus, CveCliente) Then
- tablaReporte = ObjGPS.DtResultados
- Dim VistaFiltro As DataView = New DataView(tablaReporte)
- Dim reporteDatos As DataTable = VistaFiltro.ToTable("Selected", False, "TipoDispositivoDisplay", "Display", "Modelo", "Serie", "IMEI", "NumeroTelefono", "FechaIng")
- Dim file As Byte() = ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/EquiposGPS.rpt"), reporteDatos, lista)
- ImprimirbytesPDF(file)
+ If ObjGPS.DispositivosGet(-1, DdlEstatusDispositivos.SelectedValue.ToEntero(), CveCliente) Then
+ tablaReporte = ObjGPS.DtResultados
+
+ ImprimirPDF("Empresas/Grales/Formatos/EquiposGPS.rdlc", tablaReporte, params, "Equipo GPS", Formato)
Else
Alert("No hay lista de dispositivos para imprimir")
End If
@@ -4016,17 +4030,17 @@ Partial Class Clientes
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoDeCuenta.pdf"})
- Dim Envio As Boolean = Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=LSRutasMail)
-
- If Envio AndAlso GuardarBitacora Then
- Using ObjBitacora As New ClsOIEventos
- ObjBitacora.AddEventoBitacora("Se envió correo con el estado de cuenta del cliente", "", CveUsuario, CveEmpresa, CveCliente:=CveCliente)
- End Using
+ Dim Envio As Boolean = Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=LSRutasMail)
+
+ If Envio AndAlso GuardarBitacora Then
+ Using ObjBitacora As New ClsOIEventos
+ ObjBitacora.AddEventoBitacora("Se envió correo con el estado de cuenta del cliente", "", CveUsuario, CveEmpresa, CveCliente:=CveCliente)
+ End Using
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "E N V I O C O R R E O"
Private Sub EnviaCorreo(Liga As String, LigaActivar As String)
@@ -4094,11 +4108,11 @@ Partial Class Clientes
a.GuardaLog()
Dim Mail As New ClsSisMail()
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
- End Sub
+ End Sub
#End Region
-
+
#Region " COTIZACIONES "
-
+
Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs)
If BtnVerMasCot.Text = "Ver Más" Then
CargaCotizaciones(-1)
@@ -4168,9 +4182,9 @@ Partial Class Clientes
HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}"
End If
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "D I R E C C I O N E N V I O "
Public Sub Edit_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
@@ -4250,12 +4264,12 @@ Partial Class Clientes
End If
CargaDireccionesEnvio()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region " IMPORTAR SALDOS "
-
+
Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click
CargaClientesImportarSaldos()
RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos"))
@@ -4361,9 +4375,9 @@ Partial Class Clientes
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ChkSaldo(this,{0},{1});", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.DBCampo("Saldo")))
e.Row.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo")))
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "Cuentas/Equipos"
Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs)
HdnModalidad.Value = "I"
@@ -4951,9 +4965,9 @@ Partial Class Clientes
End If
Return Retorno
- End Function
+ End Function
#End Region
-
+
#Region "GPS"
Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click
If hdnArrayDispositivo.Value.Length > 0 Then
@@ -5032,20 +5046,20 @@ Partial Class Clientes
End If
End If
- End Sub
+ End Sub
Private Sub CargaClienteDispositivos(CveEmpresa As Integer)
Dim Dt As DataTable = GlobalDTUsuarios(UsuarioActual.CveUsuario)
- If Dt IsNot Nothing AndAlso Dt.Rows.Count > 0 Then
- DdlClienteDispositivo.DataSource = Dt.FiltraParametros($"CvePlataforma = 3 AND CveEmpresa = {CveEmpresa}", "Empresa")
- DdlClienteDispositivo.DataBind()
-
+ If Dt IsNot Nothing AndAlso Dt.Rows.Count > 0 Then
+ DdlClienteDispositivo.DataSource = Dt.FiltraParametros($"CvePlataforma = 3 AND CveEmpresa = {CveEmpresa}", "Empresa")
+ DdlClienteDispositivo.DataBind()
+
DdlClienteDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
End Sub
Protected Sub DdlEmpresaDispositivo_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaClienteDispositivos(DdlEmpresaDispositivo.SelectedValue.ToEntero())
- End Sub
+ End Sub
Protected Sub ImgMoverDispositivo_Click(sender As Object, e As EventArgs)
@@ -5056,10 +5070,10 @@ Partial Class Clientes
UpMoverDispositivo.Update()
RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});")
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "Sucursales"
Public Sub CreaDTSucursales()
@@ -5137,7 +5151,7 @@ Partial Class Clientes
If HdnCveVenta2.Value <> "-1" AndAlso HdnFolioVenta2.Value <> "-1" Then
Dim ObjMail As New ClsSisMail()
- Dim Ruta As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
+ Dim Ruta As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\"
Dim Cuerpo As String = TxtBody2.Text
Dim Asunto As String = ""
@@ -5293,14 +5307,14 @@ Partial Class Clientes
End If
End If
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "G P S"
-
-
-
+
+
+
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
Try
@@ -5371,11 +5385,11 @@ Partial Class Clientes
End If
ObjClientes.Dispose()
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "C O N T R A T O S"
Private Sub CargaDatosContrato()
If CveCliente <= 0 Then
@@ -5421,13 +5435,32 @@ Partial Class Clientes
e.Row.CssClass = "Totales white"
End If
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "M E T O D O S "
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
- CargaHistorial(TipoDocto:=RblTipo.SelectedValue)
+ If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then
+
+ Dim tmp As DataTable = DTHistorialVentas.FiltraParametros($"TipoDocto = '{RblTipo.SelectedValue}'")
+ If tmp.Rows.Count > 0 Then
+ Dim Totales As DataRow = tmp.NewRow
+ Totales("SubTotal") = tmp.SUM("SubTotal")
+ Totales("Total") = tmp.SUM("Total")
+ Totales("Descuento") = tmp.SUM("Descuento")
+ Totales("Amortizacion") = tmp.SUM("Amortizacion")
+ Totales("MAX_Total") = tmp.MAX("MAX_Total")
+ Totales("AVG_Total") = tmp.AVG("AVG_Total")
+ Totales("MIN_Total") = tmp.MIN("MIN_Total")
+ Totales("CountTotal") = tmp.COUNT("CountTotal")
+ tmp.Rows.InsertAt(Totales, 0)
+ End If
+ GVHistorial.DataSource = tmp
+ ElseIf DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue = "-1" Then
+ GVHistorial.DataSource = DTHistorialVentas
+ End If
+ GVHistorial.DataBind()
End Sub
Private Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged
CargaCotizaciones(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) 'listo
@@ -5659,7 +5692,7 @@ Partial Class Clientes
Return stream.ToString()
End Function
Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargar.Click
- Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\FormatoClientes.csv"
+ Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\FormatoClientes.csv"
Dim Archivo As New FileInfo(Directorio)
If Archivo.Exists Then
Response.Clear()
@@ -5748,7 +5781,7 @@ Partial Class Clientes
Dim a As String = String.Format("{0} -- {1} ---- -->", Asunto, Para)
a.GuardaLog()
Dim Mail As New ClsSisMail()
- Dim Envio As Boolean = Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
+ Dim Envio As Boolean = Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
End Sub
Protected Sub BtnCobranzaSMS_Click(sender As Object, e As EventArgs)
@@ -5803,13 +5836,13 @@ Partial Class Clientes
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "IMPRIMIR GVHistorial"
-
-
+
+
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
Dim retorno As Byte() = Nothing
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -5888,18 +5921,18 @@ Partial Class Clientes
ObjClientes.Dispose()
Return retorno
- End Function
-
-
+ End Function
+
+
#End Region
-
+
#Region "C O B R A N Z A"
Public Sub Visitas_Click(sender As Object, e As EventArgs)
RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas"))
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "Usuarios"
Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting
Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero
@@ -5934,12 +5967,12 @@ Partial Class Clientes
e.Row.Cells(5).Visible = False
End If
End If
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region "C U E N T A S - B A N C A R I A S"
-
+
Private Sub CargaCuentasBancarias()
Dim ObjCuentasBancos As New ClsGenerales
ViewState("OrdenCuentasBancos") = ""
@@ -6110,8 +6143,8 @@ Partial Class Clientes
TxtNumeroCuenta2.Text = ""
TxtConvenioCIE2.Text = ""
TxtReferencia2.Text = ""
- End Sub
-
+ End Sub
+
#Region "GRIDVIEW - CUENTAS BANCARIAS"
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -6170,10 +6203,10 @@ Partial Class Clientes
End If
ObjCuentasBancos.Dispose()
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
Private Sub CargaPSGridCuentasBancos()
If CveCliente > 0 Then
GvBancosCuentas.DataSource = DTCuentasBancos
@@ -6231,9 +6264,9 @@ Partial Class Clientes
divestatus.Visible = True
UpAddBancos.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias"))
- End Sub
+ End Sub
#End Region
-
+
#Region "C L I E N T E S P A G O S R E A L I Z A D O S I M P R I M I R P D F/Excel"
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
GenerarPDF("Excel")
@@ -6258,11 +6291,11 @@ Partial Class Clientes
ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato)
- End Sub
+ End Sub
#End Region
-
+
#Region "VENTAS"
-
+
Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte()
Dim ObjVentas As New ClsVentas
Dim Vta As Modelos.Factura = Nothing
@@ -6493,10 +6526,10 @@ Partial Class Clientes
ObjVentas.Dispose()
Return PdfFactura(Vta)
- End Function
-
+ End Function
+
#End Region
-
+
#Region "COMERCIO EXTERIOR"
Public Sub CargaCombosComercioExterior()
@@ -6610,12 +6643,12 @@ Partial Class Clientes
End Sub
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaColonia()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "D O C U M E N T A C I O N "
-
+
Private Sub CargaDocumentacionCliente()
Dim objRH As New ClsEdocumentacion()
@@ -6876,73 +6909,73 @@ Partial Class Clientes
ObjEdoc.Dispose()
End Sub
- Public Sub DownLoad_ClickDocumentacion(sender As Object, e As EventArgs)
- Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- Dim Adjunto As String = GvRow.DataKey("Adjunto")
- linkDescargaPagare = AppDomain.CurrentDomain.BaseDirectory & String.Format("Empresas\{0}\DocElectronica\Clientes\{1}\{2}", UsuarioActual.CveEmpresa, CveCliente, Adjunto)
- TxtDireccionAval.Text = ""
- TxtAval.Text = ""
- RegistraScript("$('#ModalDivPagare').modal('show')")
-
+ Public Sub DownLoad_ClickDocumentacion(sender As Object, e As EventArgs)
+ Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
+ Dim Adjunto As String = GvRow.DataKey("Adjunto")
+ linkDescargaPagare = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\DocElectronica\Clientes\{1}\{2}", UsuarioActual.CveEmpresa, CveCliente, Adjunto)
+ TxtDireccionAval.Text = ""
+ TxtAval.Text = ""
+ RegistraScript("$('#ModalDivPagare').modal('show')")
+
End Sub
- Protected Sub ImprimirPagare(sender As Object, e As EventArgs) Handles BtnAgregarPagare.Click
- Dim memoryStreamDoc As New System.IO.MemoryStream
- Dim objGemBoxDocument As New clsGemBoxDocument(linkDescargaPagare)
- Dim Tags As New List(Of TagsDocumentos)
- Dim ObjClientes As New ClsClientes
-
- Dim monto As String = ""
- Dim razonSocial As String = ""
- Dim direccion As String = ""
- Dim ciudad As String = ""
- Dim Telefono As String = ""
- Dim mesArray = New String() {"Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"}
- Dim hoy As DateTime = DateTime.Now
- Dim fechaConFormato As String = String.Format("{0} de {1} del {2}", hoy.Day, mesArray(hoy.Month), hoy.Year)
-
- If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
- monto = ObjClientes.DtResultados.FiltroPrimeroValor("LimiteCredito").ToDouble.ToString("N")
- razonSocial = ObjClientes.DtResultados.FiltroPrimeroValor("NombreComercial")
- direccion = ObjClientes.DtResultados.FiltroPrimeroValor("Direccion")
- ciudad = ObjClientes.DtResultados.FiltroPrimeroValor("Ciudad")
- Telefono = ObjClientes.DtResultados.FiltroPrimeroValor("Telefono")
- End If
-
- Tags.Add(New TagsDocumentos("{Monto}", monto))
- Tags.Add(New TagsDocumentos("{Fecha}", fechaConFormato))
- Tags.Add(New TagsDocumentos("{FechaConFormato}", fechaConFormato))
- Tags.Add(New TagsDocumentos("{CantidadLetra}", monto.ToDouble.Texto2Letras(1)))
- Tags.Add(New TagsDocumentos("{RazonSocial}", razonSocial))
- Tags.Add(New TagsDocumentos("{Direccion}", direccion))
- Tags.Add(New TagsDocumentos("{Ciudad}", ciudad))
- Tags.Add(New TagsDocumentos("{Telefono}", Telefono))
- Tags.Add(New TagsDocumentos("{RazonSocialAval}", TxtAval.Text))
- Tags.Add(New TagsDocumentos("{DireccionAval}", TxtDireccionAval.Text))
- Tags.Add(New TagsDocumentos("{CiudadAval}", UsuarioActual.Empresa.Ciudad))
- Tags.Add(New TagsDocumentos("{TelefonoAval}", UsuarioActual.Empresa.Telefono))
-
- If Not ObjClientes.AddClientePagare(CveCliente, UsuarioActual.CveEmpresa, TxtAval.Text, TxtDireccionAval.Text) Then
- Alert("no se pudo registrar el pagare")
- Exit Sub
- End If
-
- 'objGemBoxDocument.AgregarImagen(RutaLogo, 61.0, 53.0)
- RegistraScript("$('#ModalDivPagare').modal('hide')")
- Alert("Pagaré registrado con exito")
-
- objGemBoxDocument.SustituirTags(Tags)
- objGemBoxDocument.GuardarStream()
- Dim memoryStream As New System.IO.MemoryStream(objGemBoxDocument.GetBytesDocumento())
- objGemBoxDocument.Dispose()
- ObjClientes.Dispose()
- Response.Clear()
- Response.ContentType = "application/text"
- Response.AddHeader("content-disposition", "attachment;filename=pagare.docx")
- Response.Buffer = True
- memoryStream.WriteTo(Response.OutputStream)
- Response.End()
-
+ Protected Sub ImprimirPagare(sender As Object, e As EventArgs) Handles BtnAgregarPagare.Click
+ Dim memoryStreamDoc As New System.IO.MemoryStream
+ Dim objGemBoxDocument As New clsGemBoxDocument(linkDescargaPagare)
+ Dim Tags As New List(Of TagsDocumentos)
+ Dim ObjClientes As New ClsClientes
+
+ Dim monto As String = ""
+ Dim razonSocial As String = ""
+ Dim direccion As String = ""
+ Dim ciudad As String = ""
+ Dim Telefono As String = ""
+ Dim mesArray = New String() {"Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"}
+ Dim hoy As DateTime = DateTime.Now
+ Dim fechaConFormato As String = String.Format("{0} de {1} del {2}", hoy.Day, mesArray(hoy.Month), hoy.Year)
+
+ If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
+ monto = ObjClientes.DtResultados.FiltroPrimeroValor("LimiteCredito").ToDouble.ToString("N")
+ razonSocial = ObjClientes.DtResultados.FiltroPrimeroValor("NombreComercial")
+ direccion = ObjClientes.DtResultados.FiltroPrimeroValor("Direccion")
+ ciudad = ObjClientes.DtResultados.FiltroPrimeroValor("Ciudad")
+ Telefono = ObjClientes.DtResultados.FiltroPrimeroValor("Telefono")
+ End If
+
+ Tags.Add(New TagsDocumentos("{Monto}", monto))
+ Tags.Add(New TagsDocumentos("{Fecha}", fechaConFormato))
+ Tags.Add(New TagsDocumentos("{FechaConFormato}", fechaConFormato))
+ Tags.Add(New TagsDocumentos("{CantidadLetra}", monto.ToDouble.Texto2Letras(1)))
+ Tags.Add(New TagsDocumentos("{RazonSocial}", razonSocial))
+ Tags.Add(New TagsDocumentos("{Direccion}", direccion))
+ Tags.Add(New TagsDocumentos("{Ciudad}", ciudad))
+ Tags.Add(New TagsDocumentos("{Telefono}", Telefono))
+ Tags.Add(New TagsDocumentos("{RazonSocialAval}", TxtAval.Text))
+ Tags.Add(New TagsDocumentos("{DireccionAval}", TxtDireccionAval.Text))
+ Tags.Add(New TagsDocumentos("{CiudadAval}", UsuarioActual.Empresa.Ciudad))
+ Tags.Add(New TagsDocumentos("{TelefonoAval}", UsuarioActual.Empresa.Telefono))
+
+ If Not ObjClientes.AddClientePagare(CveCliente, UsuarioActual.CveEmpresa, TxtAval.Text, TxtDireccionAval.Text) Then
+ Alert("no se pudo registrar el pagare")
+ Exit Sub
+ End If
+
+ 'objGemBoxDocument.AgregarImagen(RutaLogo, 61.0, 53.0)
+ RegistraScript("$('#ModalDivPagare').modal('hide')")
+ Alert("Pagaré registrado con exito")
+
+ objGemBoxDocument.SustituirTags(Tags)
+ objGemBoxDocument.GuardarStream()
+ Dim memoryStream As New System.IO.MemoryStream(objGemBoxDocument.GetBytesDocumento())
+ objGemBoxDocument.Dispose()
+ ObjClientes.Dispose()
+ Response.Clear()
+ Response.ContentType = "application/text"
+ Response.AddHeader("content-disposition", "attachment;filename=pagare.docx")
+ Response.Buffer = True
+ memoryStream.WriteTo(Response.OutputStream)
+ Response.End()
+
End Sub
Protected Sub GvDocumentosFirma_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentosCliente.RowDataBound
@@ -7438,12 +7471,12 @@ Partial Class Clientes
RegistraScript("Download('" & baseUrl & "')")
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "D O C U M E N T O S V E N T A S"
-
+
Private Sub CargaDocumentosVenta(tCveCliente As Integer)
Dim objInv As New ClsEdocumentacion
@@ -7614,11 +7647,11 @@ Partial Class Clientes
objRH.Dispose()
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "PERSONA FISICA"
Protected Sub LnkPersonaFisica_Click(sender As Object, e As EventArgs)
RegistraScript("$('#DivModalPersonaFisica').modal();")
@@ -7643,9 +7676,9 @@ Partial Class Clientes
ObjCliente.Dispose()
UpDatos.Update()
- End Sub
+ End Sub
#End Region
-
+
#Region "USUARIOS PLATAFORMA CLIENTE - 6 "
Protected Sub CargaUsuariosPortalCliente()
Dim objUsuario As ClsSisUsuarios = New ClsSisUsuarios
@@ -7654,19 +7687,19 @@ Partial Class Clientes
GvUsuarios.DataBind()
End If
objUsuario.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region " DEVOLVER DINERO ANT/NC "
Private Sub InicializaDevolverDinero()
If UsuarioActual.TienePermisoProceso(247) Then
GVAnticipos.Columns(6).Visible = True
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "MODAL GRAFICA/PEDIDOS"
-
+
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
If CargaDatatables() Then
RegistraScript("$('#DivModalGrafica').modal('show')")
@@ -7999,13 +8032,13 @@ Partial Class Clientes
RegistraScript($"CargaGraficaCompratamientoSaldoMensual({Dt5.ToJson},{Dt6.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "55")
UPModalProd.Update()
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "TAB - COMPORTAMIENTO DE VENTAS"
-
+
Private Sub CargaGrupo()
DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3"))
DdlGrupo.Items.Insert(1, New ListItem("Clasificacion", "4"))
@@ -8185,12 +8218,12 @@ Partial Class Clientes
ObjVentas.Dispose()
GvComportamientoVenta.DataBind()
UpDatosComportamientoVenta.Update()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "DISPOSITIVOS"
-
+
Protected Sub LnkMoverDispositivo_Click(sender As Object, e As EventArgs)
Dim CveDispositivo As Integer = HdnCveDispositivoMover.Value.ToEntero()
Dim CveCliente As Integer = DdlClienteDispositivo.SelectedValue.ToEntero()
@@ -8228,10 +8261,10 @@ Partial Class Clientes
CargaEventoBitacora()
NombreDispositivo = ""
RegistraScript("$('#DivMoverDispositivo').modal('hide');")
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "CRM"
Protected Sub CargaDatosCRM()
Dim ObjCRM = New ClsCRM()
@@ -8331,9 +8364,9 @@ Partial Class Clientes
Alert("Se Unificó correctamente al Cliente con la Empresa CRM.")
End If
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "PORCENTAJE PRECIO DE MARCAS"
Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas"))
@@ -8537,9 +8570,9 @@ Partial Class Clientes
ObjPS.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "PORCENTAJE PRECIO DE PRODUCTOS"
Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
@@ -8775,12 +8808,12 @@ Partial Class Clientes
Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs)
DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
- End Sub
+ End Sub
#End Region
-
+
#Region " A C U M U L A D O R E S"
-
-
+
+
Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs)
'CveVentaNota = 0
@@ -8935,7 +8968,7 @@ Partial Class Clientes
e.Row.FCCheckBox("ChkCargo").Visible = False
Else
e.Row.FCCheckBox("ChkCargo").Checked = False
- e.Row.FCCheckBox("ChkCargo").Visible = False 'True
+ e.Row.FCCheckBox("ChkCargo").Visible = False 'True
End If
If FacturadoBonificacion Then
@@ -9279,9 +9312,9 @@ Partial Class Clientes
' Serie = SerieNotaAcumulador
'End If
- If ObjFactura IsNot Nothing Then
- ObjFactura.Dispose()
- ObjFactura = Nothing
+ If ObjFactura IsNot Nothing Then
+ ObjFactura.Dispose()
+ ObjFactura = Nothing
End If
ObjFactura = New Modelos.Factura(UsuarioActual)
@@ -9451,593 +9484,596 @@ Partial Class Clientes
'PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
- ObjFactura.FemsaFactura = FM
-
- ' ObjFactura.Timbre = PreParaTimbre(ObjFactura)
-
- End Sub
-
- 'Private Sub PrepararTimbrado(ByRef FM As Modelos.FemsaFactura, ByRef TmpDT7Eleven As DataTable, ByRef TmpDTComplementosTimbrado As DataTable)
- ' FM.AplicaFEMSA = ChkAplicaFEMSA.Checked
- ' FM.FEMSA_NumSociedad = ""
- ' FM.FEMSA_NumProveedor = ""
- ' FM.FEMSA_Mail = ""
- ' FM.FEMSA_Version = "".ToEntero
- ' FM.FEMSA_NumPedido = "".ToEntero
- ' FM.FEMSA_NumEntrada = ""
- ' FM.FEMSA_NumRemision = ""
- ' FM.FEMSA_NumSocio = ""
- ' FM.FEMSA_CentroCosto = ""
- ' FM.FEMSA_IPeriodoLiquidacion = ""
- ' FM.FEMSA_FPeriodoLiquidacion = ""
- ' FM.FEMSA_CodRetencion1 = ""
- ' FM.FEMSA_CodRetencion2 = ""
-
- ' TmpDT7Eleven.Columns.Add("sevenElevenNumProveedor")
- ' TmpDT7Eleven.Columns.Add("sevenElevenFolio")
- ' TmpDT7Eleven.Columns.Add("sevenElevenTienda")
- ' TmpDT7Eleven.Columns.Add("sevenElevenFecha")
-
- ' Dim Row As DataRow = TmpDT7Eleven.NewRow
- ' Row("sevenElevenNumProveedor") = ""
- ' Row("sevenElevenFolio") = ""
- ' Row("sevenElevenTienda") = ""
- ' Row("sevenElevenFecha") = ""
-
- ' TmpDT7Eleven.Rows.Add(Row)
-
- ' TmpDTComplementosTimbrado.Columns.Add("CveComplemento")
- ' TmpDTComplementosTimbrado.Columns.Add("IdContabilidad")
- ' TmpDTComplementosTimbrado.Columns.Add("TipoProceso")
- ' TmpDTComplementosTimbrado.Columns.Add("TipoAmbito")
- ' TmpDTComplementosTimbrado.Columns.Add("Entidad")
-
- ' Dim Row2 As DataRow = TmpDTComplementosTimbrado.NewRow
- ' Row2("CveComplemento") = -1
- ' Row2("IdContabilidad") = -1
- ' Row2("TipoProceso") = -1
- ' Row2("TipoAmbito") = -1
- ' Row2("Entidad") = -1
-
- ' TmpDTComplementosTimbrado.Rows.Add(Row2)
- 'End Sub
-
- 'Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
- ' Dim Timbre As New CFDITimbre
- ' Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
- ' Timbre.Comprobante.Folio = Obj.Folio.ToString
- ' Timbre.Comprobante.Serie = Obj.Serie
- ' Timbre.Comprobante.Fecha = Obj.FechaCP
- ' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
- ' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
- ' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
- ' Timbre.Comprobante.Subtotal = Obj.SubTotal
- ' Timbre.Comprobante.Descuentos = Obj.Descuento
- ' Timbre.Comprobante.Moneda = Obj.MonedaSAT
- ' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
- ' Timbre.Comprobante.Total = Obj.Total
-
- ' Try
- ' Obj.SetSubProyecto(Me)
- ' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
- ' Catch ex As Exception
-
- ' End Try
-
- ' Timbre.Comprobante.Confirmacion = ""
-
- ' Timbre.Receptor.RFC = Obj.Cliente.RFC
- ' Timbre.Receptor.Nombre = Obj.Cliente.Nombre
- ' Timbre.Receptor.ResidenciaFiscal = ""
- ' Timbre.Receptor.NumeroRegistroTributario = ""
- ' Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
-
-
- ' If Obj.CveTipoRelacion > 0 Then
- ' Select Case Obj.CveTipoRelacion
- ' Case 1
- ' Timbre.CFDIRelacionados.TipoRelacion = "01"
- ' Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso"
- ' Case 2
- ' Timbre.CFDIRelacionados.TipoRelacion = "02"
- ' Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados"
- ' Case 3
- ' Timbre.CFDIRelacionados.TipoRelacion = "03"
- ' Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso"
- ' Case 4
- ' Timbre.CFDIRelacionados.TipoRelacion = "04"
- ' Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso"
- ' Case 7
- ' Timbre.CFDIRelacionados.TipoRelacion = "07"
- ' Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo"
- ' Case 8
- ' Timbre.CFDIRelacionados.TipoRelacion = "08"
- ' Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades "
- ' Case 9
- ' Timbre.CFDIRelacionados.TipoRelacion = "09"
- ' Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos"
-
- ' End Select
- ' End If
-
- ' Dim totSubTotal As Decimal = Obj.SubTotal
- ' Dim totIVA As Decimal = Obj.IVA
- ' Dim totRetIVA As Decimal = Obj.RetIVA
- ' Dim totRetISR As Decimal = Obj.RetISR
- ' Dim TasaRetIVA As Decimal = 0
- ' Dim TasaRetISR As Decimal = 0
- ' Dim i As Integer = 1
-
- ' 'detalles
- ' Dim tPS As String = ""
-
- ' For Each drr As DataRow In Obj.DtDetalle.Rows
- ' If drr("PS").ToString.Length = 1 Then
- ' tPS = drr("Obs").ToString
- ' Else
- ' If drr("PS").ToString.Length = 0 Then
- ' tPS = ""
- ' Else
- ' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
- ' End If
- ' End If
- ' 'condicionante, especial
- ' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
-
- ' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
- ' .Descripcion = tPS,
- ' .ValorUnitario = drr("PU").ToString.ToDecimal,
- ' .Importe = drr("TotalImporte").ToString.ToDecimal,
- ' .Descuento = drr("Descuento").ToString.ToDecimal,
- ' .Unidad = drr("UM").ToString,
- ' .ClaveUnidad = drr("SATClaveUM").ToString,
- ' .ClaveProdServ = drr("SATClaveProdServ").ToString,
- ' .Noidentificacion = drr("Noidentificacion").ToString,
- ' .CuentaPredial = drr("CuentaPredial").ToString}
- ' 'verifica suma subtotales
- ' If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales
- ' concepto.Importe = totSubTotal
- ' End If
- ' totSubTotal = totSubTotal - concepto.Importe
-
- ' 'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
- ' ' If drr("ImporteIVA").ToString.ToDouble > 0 Then
-
- ' 'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos
- ' If Timbre.Comprobante.Total > 0 Then
- ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
- ' End If
-
- ' If drr("ImporteIEPS").ToString.ToDouble > 0 Then
- ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal})
- ' End If
-
- ' If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones
- ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal})
- ' End If
-
- ' If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR
- ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal})
- ' End If
-
- ' Timbre.Conceptos.Add(concepto)
- ' i += 1
- ' Next
-
- ' Return Timbre
- 'End Function
-
- 'Private Function GenerarNotaCredito(CvePS As Integer, Tipo As Integer, CveUnidadMedida As Integer, Importe As Decimal, Iva As Decimal, Descripcion As String, CveClasificacion As Integer) As Boolean
-
- ' Dim Respuesta As Boolean = False
-
- ' Dim ObjVentas As New ClsVentas
- ' Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
- ' Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
-
- ' Dim ErrorVentas As Boolean = False
- ' Dim SubTotal As Decimal = Importe
- ' Dim Total As Decimal = Importe + Iva
-
- ' Dim RetIVA As Decimal = 0
- ' Dim RetISR As Decimal = 0
- ' Dim TipoCambio As Decimal = 0
- ' Dim FechaVencimiento As Date = Now
- ' Dim fecha As Date = Now
-
- ' Dim Folio As Integer = 0
- ' Dim Serie As String = ""
-
- ' If FolioNotaCredito() Then
- ' Folio = FolioNotaAcumulador
- ' Serie = SerieNotaAcumulador
- ' End If
-
- ' Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero
-
- ' Dim CveVenta As Integer
-
- ' If Folio > 0 Then
-
- ' Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas($"Clientes/{Descripcion}", 1, Total, Total, 1, fecha, "Nota de crédito por Cargo", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
-
- ' If ObjVentas.AddVenta("Egs", Folio, CveCliente.ToEntero, -1, SubTotal, 0, 0, Iva, RetIVA, RetISR, Total, 1, TipoCambio,
- ' 0, 0, 0, FechaVencimiento, fecha, "", "", fecha, -1, "", "", "", 0, 0, 0, "-1".ToDate, "-1".ToDate, "-1".ToDate, -1, -1, 0, CvePrePoliza,
- ' UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Serie:=Serie, CveSubProyecto:=CveSubProyecto, CveSubProyectoEjecucion:=CveSubProyecto) Then
-
- ' CveVenta = ObjVentas.CveVenta
-
- ' If CveVenta > 0 Then
- ' If ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, 0.16, SubTotal * 0.16, Descripcion, 0, 0, -1, 0) Then
-
- ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, SubTotal, Folio.ToString, 150, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=CveSubProyecto) Then
- ' ErrorVentas = True
- ' End If
- ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Folio.ToString, 12, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total) Then
- ' ErrorVentas = True
- ' End If
- ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Iva, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Iva) Then
- ' ErrorVentas = True
- ' End If
-
- ' If Not ErrorVentas Then
- ' For Each GvRow As GridViewRow In GvAcum.Rows
- ' Dim CveMovto As Integer = GvRow.DataKey("CveMovto").ToEntero
-
- ' If (Tipo = 1 And GvRow.FCCheckBox("ChkCargo").Checked) Or (Tipo = 2 And GvRow.FCCheckBox("ChkBonificacion").Checked) Then
-
- ' If ObjAcum.DistribuidorActualizarFacturados(CveMovto, UsuarioActual.CveEmpresa, Tipo, CveVenta) Then
- ' Respuesta = True
- ' ErrorVentas = False
- ' CveVentaNota = CveVenta
- ' Else
- ' Respuesta = False
- ' ErrorVentas = True
- ' CveVentaNota = 0
- ' Exit For
- ' End If
-
- ' End If
- ' Next
- ' End If
-
-
- ' If Not ErrorVentas Then
- ' Alert($"Nota de crédito generada correctamente {Serie}-{Folio}")
- ' End If
-
-
- ' Else
- ' ErrorVentas = True
- ' End If
- ' Else
- ' ErrorVentas = True
- ' End If
-
- ' Else
- ' ErrorVentas = True
- ' End If
- ' Else
- ' Alert("No se pudo obtener el Folio.", TipoMensaje.MsgError)
- ' End If
-
-
-
- ' If ErrorVentas Then
- ' ObjVentas.RollBack()
- ' Else
-
- ' ObjVentas.Commit()
- ' CargaUsados()
-
- ' 'Dim DtDetallesVenta As New DataTable
-
- ' 'If ObjVentas.GetVentaDetalle(CveVenta) Then
-
- ' ' DtDetallesVenta = ObjVentas.DtResultados
- ' ' 'CreaObjetosVenta(CveVenta, Serie, Folio, SubTotal, Iva, DtDetallesVenta)
-
- ' ' ObjFactura.Timbre = PreParaTimbre(ObjFactura, ObjFactura.CveSubProyecto)
-
- ' ' Dim ObjTimbrado As New Timbrado
- ' ' Dim SeTimbro As Boolean = False
-
- ' ' SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura)
-
- ' ' If SeTimbro Then
- ' ' Alert("Se timbro correctamente")
- ' ' Else
- ' ' Alert("No se pudo timbrar, intente mas tarde.", TipoMensaje.MsgError)
- ' ' End If
-
- ' 'Else
- ' ' Alert("No se pudo timbrar, no se pudieron obtener los detalles de la venta.", TipoMensaje.MsgError)
- ' 'End If
-
- ' End If
-
-
-
- ' ObjVentas.Dispose()
- ' Return Respuesta
-
- 'End Function
- 'Private Function generaNC(CveVenta As Integer, ByRef ObjVentas As ClsVentas, ByVal factura As Modelos.Factura) As List(Of Object)
-
- ' Dim Obj As New List(Of Object)
- ' Dim CveVentaNueva As Integer = ObjVentas.CveVenta
- ' Dim BanderaGeneraNC As Boolean = False
- ' If UsuarioActual.CveEmpresa.Contiene(1, 119) Then BanderaGeneraNC = True
-
- ' If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
- ' If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
- ' Dim drv As DataRow = ObjVentas.DtResultados.Rows(0)
- ' Dim TmpDTconceptos As DataTable = Nothing
-
- ' ''CargaCliente
-
- ' Dim CveCliente As Integer = drv("CveCliente").ToString.ToEntero
- ' If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not CveCliente.Contiene(10450, 10460, 10458) Then
- ' Return Nothing
- ' ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 AndAlso Not CveCliente.Contiene(27448) Then
- ' Return Nothing
- ' End If
- ' factura.TipoDocto = drv("TipoDocto").ToString
- ' factura.Serie = drv("Serie").ToString
- ' factura.FechaEjecucion = drv("FechaEjecucion").ToString.ToDateTime
- ' factura.Fecha = drv("Fecha").ToString.ToDateTime
- ' factura.CveSubProyectoEjecucion = drv("CveSubProyectoEjecucion").ToString.ToEntero
- ' factura.CveSubProyectoCobranza = drv("CveSubProyectoCobranza").ToString.ToEntero
- ' factura.CveClienteSucursal = drv("CveClienteSucursal").ToString.ToEntero
- ' factura.CveSubProyecto = drv("CveSubProyecto").ToString.ToEntero
-
-
- ' ''CargaDetalle
- ' If ObjVentas.GetVentaDetalle(CveVenta) Then
- ' TmpDTconceptos = ObjVentas.DtResultados
- ' TmpDTconceptos.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
- ' GvPS.DataSource = TmpDTconceptos
- ' GvPS.DataBind()
- ' End If
-
- ' '' Carga Totales
- ' factura.SubTotal = drv("SubTotal").ToString.ToDecimal
- ' factura.Descuento = drv("Descuento").ToString.ToDecimal
- ' factura.Amortizacion = drv("Amortizacion").ToString.ToDecimal
- ' factura.IVA = drv("IVA").ToString.ToDecimal
- ' factura.RetIVA = drv("RetIVA").ToString.ToDecimal
- ' factura.RetISR = drv("RetISR").ToString.ToDecimal
- ' factura.Total = drv("Total").ToString.ToDecimal
- ' factura.MotivoDescuento = drv("MotivoDescuento").ToString
- ' factura.Observaciones = drv("Observaciones").ToString
- ' factura.CveMoneda = drv("CveMoneda").ToString.ToEntero
- ' factura.TipoCambio = drv("TipoCambio").ToString.ToDecimal
- ' factura.CveVendedor = drv("CveVendedor").ToString.ToEntero
- ' factura.RefDocto = drv("Ref").ToString
-
- ' If factura.CveCliente > 0 Then
- ' If Not IsNothing(TmpDTconceptos) AndAlso TmpDTconceptos.Rows.Count > 0 Then
-
- ' If Not drv("Total").ToString.ToDecimal = factura.Total Then
- ' Return Nothing
- ' End If
-
-
-
- ' End If
- ' End If
- ' End If
- ' End If
-
- ' If Obj.Count > 0 Then
- ' Return Obj
- ' Else
- ' Return Nothing
- ' End If
-
- 'End Function
-
- 'Private Function PreParaTimbre(Obj As Modelos.Factura, CveSubProyecto As Integer) As CFDITimbre
-
- ' Dim Timbre As New CFDITimbre
- ' Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
- ' Timbre.Comprobante.Folio = Obj.Folio.ToString
- ' Timbre.Comprobante.Serie = Obj.Serie
- ' Timbre.Comprobante.Fecha = Obj.Fecha
- ' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
- ' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
- ' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
- ' Timbre.Comprobante.Subtotal = Obj.SubTotal
-
- ' Timbre.Comprobante.Descuentos = Obj.Descuento
- ' Timbre.Comprobante.Moneda = Obj.MonedaSAT
- ' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
- ' Timbre.Comprobante.Total = Obj.Total
-
- ' Try
- ' Obj.SetSubProyecto(Me)
- ' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
- ' Catch ex As Exception
-
- ' End Try
-
- ' Timbre.Comprobante.Confirmacion = ""
-
- ' Timbre.Receptor.RFC = TxtRFC.Text
- ' Timbre.Receptor.Nombre = TxtNombre.Text
- ' Timbre.Receptor.ResidenciaFiscal = ""
- ' Timbre.Receptor.NumeroRegistroTributario = ""
- ' Timbre.Receptor.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}")
-
- ' Dim totSubTotal As Decimal = Obj.SubTotal
- ' Dim totIVA As Decimal = Obj.IVA
- ' Dim totRetIVA As Decimal = Obj.RetIVA
- ' Dim totRetISR As Decimal = Obj.RetISR
- ' Dim TasaRetIVA As Decimal = 0
- ' Dim TasaRetISR As Decimal = 0
- ' Dim i As Integer = 1
-
- ' ''detalles
- ' Dim tPS As String = ""
-
- ' For Each drr As DataRow In Obj.DtDetalle.Rows
- ' If drr("PS").ToString.Length = 1 Then
- ' tPS = drr("Obs").ToString
- ' Else
- ' If drr("PS").ToString.Length = 0 Then
- ' tPS = ""
- ' Else
- ' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
- ' End If
- ' End If
- ' '' condicionante, especial
- ' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
-
- ' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
- ' .Descripcion = tPS,
- ' .ValorUnitario = drr("PU").ToString.ToDecimal,
- ' .Importe = drr("TotalImporte").ToString.ToDecimal,
- ' .Descuento = drr("Descuento").ToString.ToDecimal,
- ' .Unidad = drr("UM").ToString,
- ' .ClaveUnidad = drr("SATClaveUM").ToString,
- ' .ClaveProdServ = drr("SATClaveProdServ").ToString,
- ' .Noidentificacion = drr("Noidentificacion").ToString,
- ' .CuentaPredial = drr("CuentaPredial").ToString}
- ' '' verifica suma subtotales
- ' If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales
- ' concepto.Importe = totSubTotal
- ' End If
- ' totSubTotal = totSubTotal - concepto.Importe
-
- ' ''siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
- ' If drr("ImporteIVA").ToString.ToDouble > 0 Then
- ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
- ' End If
-
- ' If drr("ImporteIEPS").ToString.ToDouble > 0 Then
- ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal})
- ' End If
-
- ' If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones
- ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal})
- ' End If
-
- ' If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR
- ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal})
- ' End If
-
- ' Timbre.Conceptos.Add(concepto)
- ' i += 1
- ' Next
-
- ' Dim AplicaComercioExteriorSubProyecto As Boolean = If(GlobalDTSubProyectos(-1, Obj.CveSubProyecto)(0)("AplicaComercioExterior").ToString = "True", True, False)
- ' Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = AplicaComercioExteriorSubProyecto
-
- ' If Obj.Cliente.AplicaComercioExterior And AplicaComercioExteriorSubProyecto Then
-
- ' Timbre.Receptor.ResidenciaFiscal = Obj.Cliente.ClaveSATPais
- ' Timbre.Receptor.NumeroRegistroTributario = Obj.Cliente.NumRegIdTrib
-
- ' End If
-
- ' Return Timbre
- 'End Function
-
+ ObjFactura.FemsaFactura = FM
+
+ ' ObjFactura.Timbre = PreParaTimbre(ObjFactura)
+
+ End Sub
+
+ 'Private Sub PrepararTimbrado(ByRef FM As Modelos.FemsaFactura, ByRef TmpDT7Eleven As DataTable, ByRef TmpDTComplementosTimbrado As DataTable)
+ ' FM.AplicaFEMSA = ChkAplicaFEMSA.Checked
+ ' FM.FEMSA_NumSociedad = ""
+ ' FM.FEMSA_NumProveedor = ""
+ ' FM.FEMSA_Mail = ""
+ ' FM.FEMSA_Version = "".ToEntero
+ ' FM.FEMSA_NumPedido = "".ToEntero
+ ' FM.FEMSA_NumEntrada = ""
+ ' FM.FEMSA_NumRemision = ""
+ ' FM.FEMSA_NumSocio = ""
+ ' FM.FEMSA_CentroCosto = ""
+ ' FM.FEMSA_IPeriodoLiquidacion = ""
+ ' FM.FEMSA_FPeriodoLiquidacion = ""
+ ' FM.FEMSA_CodRetencion1 = ""
+ ' FM.FEMSA_CodRetencion2 = ""
+
+ ' TmpDT7Eleven.Columns.Add("sevenElevenNumProveedor")
+ ' TmpDT7Eleven.Columns.Add("sevenElevenFolio")
+ ' TmpDT7Eleven.Columns.Add("sevenElevenTienda")
+ ' TmpDT7Eleven.Columns.Add("sevenElevenFecha")
+
+ ' Dim Row As DataRow = TmpDT7Eleven.NewRow
+ ' Row("sevenElevenNumProveedor") = ""
+ ' Row("sevenElevenFolio") = ""
+ ' Row("sevenElevenTienda") = ""
+ ' Row("sevenElevenFecha") = ""
+
+ ' TmpDT7Eleven.Rows.Add(Row)
+
+ ' TmpDTComplementosTimbrado.Columns.Add("CveComplemento")
+ ' TmpDTComplementosTimbrado.Columns.Add("IdContabilidad")
+ ' TmpDTComplementosTimbrado.Columns.Add("TipoProceso")
+ ' TmpDTComplementosTimbrado.Columns.Add("TipoAmbito")
+ ' TmpDTComplementosTimbrado.Columns.Add("Entidad")
+
+ ' Dim Row2 As DataRow = TmpDTComplementosTimbrado.NewRow
+ ' Row2("CveComplemento") = -1
+ ' Row2("IdContabilidad") = -1
+ ' Row2("TipoProceso") = -1
+ ' Row2("TipoAmbito") = -1
+ ' Row2("Entidad") = -1
+
+ ' TmpDTComplementosTimbrado.Rows.Add(Row2)
+ 'End Sub
+
+ 'Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
+ ' Dim Timbre As New CFDITimbre
+ ' Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
+ ' Timbre.Comprobante.Folio = Obj.Folio.ToString
+ ' Timbre.Comprobante.Serie = Obj.Serie
+ ' Timbre.Comprobante.Fecha = Obj.FechaCP
+ ' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
+ ' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
+ ' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
+ ' Timbre.Comprobante.Subtotal = Obj.SubTotal
+ ' Timbre.Comprobante.Descuentos = Obj.Descuento
+ ' Timbre.Comprobante.Moneda = Obj.MonedaSAT
+ ' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
+ ' Timbre.Comprobante.Total = Obj.Total
+
+ ' Try
+ ' Obj.SetSubProyecto(Me)
+ ' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
+ ' Catch ex As Exception
+
+ ' End Try
+
+ ' Timbre.Comprobante.Confirmacion = ""
+
+ ' Timbre.Receptor.RFC = Obj.Cliente.RFC
+ ' Timbre.Receptor.Nombre = Obj.Cliente.Nombre
+ ' Timbre.Receptor.ResidenciaFiscal = ""
+ ' Timbre.Receptor.NumeroRegistroTributario = ""
+ ' Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
+
+
+ ' If Obj.CveTipoRelacion > 0 Then
+ ' Select Case Obj.CveTipoRelacion
+ ' Case 1
+ ' Timbre.CFDIRelacionados.TipoRelacion = "01"
+ ' Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso"
+ ' Case 2
+ ' Timbre.CFDIRelacionados.TipoRelacion = "02"
+ ' Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados"
+ ' Case 3
+ ' Timbre.CFDIRelacionados.TipoRelacion = "03"
+ ' Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso"
+ ' Case 4
+ ' Timbre.CFDIRelacionados.TipoRelacion = "04"
+ ' Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso"
+ ' Case 7
+ ' Timbre.CFDIRelacionados.TipoRelacion = "07"
+ ' Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo"
+ ' Case 8
+ ' Timbre.CFDIRelacionados.TipoRelacion = "08"
+ ' Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades "
+ ' Case 9
+ ' Timbre.CFDIRelacionados.TipoRelacion = "09"
+ ' Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos"
+
+ ' End Select
+ ' End If
+
+ ' Dim totSubTotal As Decimal = Obj.SubTotal
+ ' Dim totIVA As Decimal = Obj.IVA
+ ' Dim totRetIVA As Decimal = Obj.RetIVA
+ ' Dim totRetISR As Decimal = Obj.RetISR
+ ' Dim TasaRetIVA As Decimal = 0
+ ' Dim TasaRetISR As Decimal = 0
+ ' Dim i As Integer = 1
+
+ ' 'detalles
+ ' Dim tPS As String = ""
+
+ ' For Each drr As DataRow In Obj.DtDetalle.Rows
+ ' If drr("PS").ToString.Length = 1 Then
+ ' tPS = drr("Obs").ToString
+ ' Else
+ ' If drr("PS").ToString.Length = 0 Then
+ ' tPS = ""
+ ' Else
+ ' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
+ ' End If
+ ' End If
+ ' 'condicionante, especial
+ ' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
+
+ ' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
+ ' .Descripcion = tPS,
+ ' .ValorUnitario = drr("PU").ToString.ToDecimal,
+ ' .Importe = drr("TotalImporte").ToString.ToDecimal,
+ ' .Descuento = drr("Descuento").ToString.ToDecimal,
+ ' .Unidad = drr("UM").ToString,
+ ' .ClaveUnidad = drr("SATClaveUM").ToString,
+ ' .ClaveProdServ = drr("SATClaveProdServ").ToString,
+ ' .Noidentificacion = drr("Noidentificacion").ToString,
+ ' .CuentaPredial = drr("CuentaPredial").ToString}
+ ' 'verifica suma subtotales
+ ' If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales
+ ' concepto.Importe = totSubTotal
+ ' End If
+ ' totSubTotal = totSubTotal - concepto.Importe
+
+ ' 'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
+ ' ' If drr("ImporteIVA").ToString.ToDouble > 0 Then
+
+ ' 'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos
+ ' If Timbre.Comprobante.Total > 0 Then
+ ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
+ ' End If
+
+ ' If drr("ImporteIEPS").ToString.ToDouble > 0 Then
+ ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal})
+ ' End If
+
+ ' If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones
+ ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal})
+ ' End If
+
+ ' If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR
+ ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal})
+ ' End If
+
+ ' Timbre.Conceptos.Add(concepto)
+ ' i += 1
+ ' Next
+
+ ' Return Timbre
+ 'End Function
+
+ 'Private Function GenerarNotaCredito(CvePS As Integer, Tipo As Integer, CveUnidadMedida As Integer, Importe As Decimal, Iva As Decimal, Descripcion As String, CveClasificacion As Integer) As Boolean
+
+ ' Dim Respuesta As Boolean = False
+
+ ' Dim ObjVentas As New ClsVentas
+ ' Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
+ ' Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
+
+ ' Dim ErrorVentas As Boolean = False
+ ' Dim SubTotal As Decimal = Importe
+ ' Dim Total As Decimal = Importe + Iva
+
+ ' Dim RetIVA As Decimal = 0
+ ' Dim RetISR As Decimal = 0
+ ' Dim TipoCambio As Decimal = 0
+ ' Dim FechaVencimiento As Date = Now
+ ' Dim fecha As Date = Now
+
+ ' Dim Folio As Integer = 0
+ ' Dim Serie As String = ""
+
+ ' If FolioNotaCredito() Then
+ ' Folio = FolioNotaAcumulador
+ ' Serie = SerieNotaAcumulador
+ ' End If
+
+ ' Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero
+
+ ' Dim CveVenta As Integer
+
+ ' If Folio > 0 Then
+
+ ' Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas($"Clientes/{Descripcion}", 1, Total, Total, 1, fecha, "Nota de crédito por Cargo", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+
+ ' If ObjVentas.AddVenta("Egs", Folio, CveCliente.ToEntero, -1, SubTotal, 0, 0, Iva, RetIVA, RetISR, Total, 1, TipoCambio,
+ ' 0, 0, 0, FechaVencimiento, fecha, "", "", fecha, -1, "", "", "", 0, 0, 0, "-1".ToDate, "-1".ToDate, "-1".ToDate, -1, -1, 0, CvePrePoliza,
+ ' UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Serie:=Serie, CveSubProyecto:=CveSubProyecto, CveSubProyectoEjecucion:=CveSubProyecto) Then
+
+ ' CveVenta = ObjVentas.CveVenta
+
+ ' If CveVenta > 0 Then
+ ' If ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, 0.16, SubTotal * 0.16, Descripcion, 0, 0, -1, 0) Then
+
+ ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, SubTotal, Folio.ToString, 150, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=CveSubProyecto) Then
+ ' ErrorVentas = True
+ ' End If
+ ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Folio.ToString, 12, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total) Then
+ ' ErrorVentas = True
+ ' End If
+ ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Iva, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Iva) Then
+ ' ErrorVentas = True
+ ' End If
+
+ ' If Not ErrorVentas Then
+ ' For Each GvRow As GridViewRow In GvAcum.Rows
+ ' Dim CveMovto As Integer = GvRow.DataKey("CveMovto").ToEntero
+
+ ' If (Tipo = 1 And GvRow.FCCheckBox("ChkCargo").Checked) Or (Tipo = 2 And GvRow.FCCheckBox("ChkBonificacion").Checked) Then
+
+ ' If ObjAcum.DistribuidorActualizarFacturados(CveMovto, UsuarioActual.CveEmpresa, Tipo, CveVenta) Then
+ ' Respuesta = True
+ ' ErrorVentas = False
+ ' CveVentaNota = CveVenta
+ ' Else
+ ' Respuesta = False
+ ' ErrorVentas = True
+ ' CveVentaNota = 0
+ ' Exit For
+ ' End If
+
+ ' End If
+ ' Next
+ ' End If
+
+
+ ' If Not ErrorVentas Then
+ ' Alert($"Nota de crédito generada correctamente {Serie}-{Folio}")
+ ' End If
+
+
+ ' Else
+ ' ErrorVentas = True
+ ' End If
+ ' Else
+ ' ErrorVentas = True
+ ' End If
+
+ ' Else
+ ' ErrorVentas = True
+ ' End If
+ ' Else
+ ' Alert("No se pudo obtener el Folio.", TipoMensaje.MsgError)
+ ' End If
+
+
+
+ ' If ErrorVentas Then
+ ' ObjVentas.RollBack()
+ ' Else
+
+ ' ObjVentas.Commit()
+ ' CargaUsados()
+
+ ' 'Dim DtDetallesVenta As New DataTable
+
+ ' 'If ObjVentas.GetVentaDetalle(CveVenta) Then
+
+ ' ' DtDetallesVenta = ObjVentas.DtResultados
+ ' ' 'CreaObjetosVenta(CveVenta, Serie, Folio, SubTotal, Iva, DtDetallesVenta)
+
+ ' ' ObjFactura.Timbre = PreParaTimbre(ObjFactura, ObjFactura.CveSubProyecto)
+
+ ' ' Dim ObjTimbrado As New Timbrado
+ ' ' Dim SeTimbro As Boolean = False
+
+ ' ' SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura)
+
+ ' ' If SeTimbro Then
+ ' ' Alert("Se timbro correctamente")
+ ' ' Else
+ ' ' Alert("No se pudo timbrar, intente mas tarde.", TipoMensaje.MsgError)
+ ' ' End If
+
+ ' 'Else
+ ' ' Alert("No se pudo timbrar, no se pudieron obtener los detalles de la venta.", TipoMensaje.MsgError)
+ ' 'End If
+
+ ' End If
+
+
+
+ ' ObjVentas.Dispose()
+ ' Return Respuesta
+
+ 'End Function
+ 'Private Function generaNC(CveVenta As Integer, ByRef ObjVentas As ClsVentas, ByVal factura As Modelos.Factura) As List(Of Object)
+
+ ' Dim Obj As New List(Of Object)
+ ' Dim CveVentaNueva As Integer = ObjVentas.CveVenta
+ ' Dim BanderaGeneraNC As Boolean = False
+ ' If UsuarioActual.CveEmpresa.Contiene(1, 119) Then BanderaGeneraNC = True
+
+ ' If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
+ ' If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
+ ' Dim drv As DataRow = ObjVentas.DtResultados.Rows(0)
+ ' Dim TmpDTconceptos As DataTable = Nothing
+
+ ' ''CargaCliente
+
+ ' Dim CveCliente As Integer = drv("CveCliente").ToString.ToEntero
+ ' If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not CveCliente.Contiene(10450, 10460, 10458) Then
+ ' Return Nothing
+ ' ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 AndAlso Not CveCliente.Contiene(27448) Then
+ ' Return Nothing
+ ' End If
+ ' factura.TipoDocto = drv("TipoDocto").ToString
+ ' factura.Serie = drv("Serie").ToString
+ ' factura.FechaEjecucion = drv("FechaEjecucion").ToString.ToDateTime
+ ' factura.Fecha = drv("Fecha").ToString.ToDateTime
+ ' factura.CveSubProyectoEjecucion = drv("CveSubProyectoEjecucion").ToString.ToEntero
+ ' factura.CveSubProyectoCobranza = drv("CveSubProyectoCobranza").ToString.ToEntero
+ ' factura.CveClienteSucursal = drv("CveClienteSucursal").ToString.ToEntero
+ ' factura.CveSubProyecto = drv("CveSubProyecto").ToString.ToEntero
+
+
+ ' ''CargaDetalle
+ ' If ObjVentas.GetVentaDetalle(CveVenta) Then
+ ' TmpDTconceptos = ObjVentas.DtResultados
+ ' TmpDTconceptos.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
+ ' GvPS.DataSource = TmpDTconceptos
+ ' GvPS.DataBind()
+ ' End If
+
+ ' '' Carga Totales
+ ' factura.SubTotal = drv("SubTotal").ToString.ToDecimal
+ ' factura.Descuento = drv("Descuento").ToString.ToDecimal
+ ' factura.Amortizacion = drv("Amortizacion").ToString.ToDecimal
+ ' factura.IVA = drv("IVA").ToString.ToDecimal
+ ' factura.RetIVA = drv("RetIVA").ToString.ToDecimal
+ ' factura.RetISR = drv("RetISR").ToString.ToDecimal
+ ' factura.Total = drv("Total").ToString.ToDecimal
+ ' factura.MotivoDescuento = drv("MotivoDescuento").ToString
+ ' factura.Observaciones = drv("Observaciones").ToString
+ ' factura.CveMoneda = drv("CveMoneda").ToString.ToEntero
+ ' factura.TipoCambio = drv("TipoCambio").ToString.ToDecimal
+ ' factura.CveVendedor = drv("CveVendedor").ToString.ToEntero
+ ' factura.RefDocto = drv("Ref").ToString
+
+ ' If factura.CveCliente > 0 Then
+ ' If Not IsNothing(TmpDTconceptos) AndAlso TmpDTconceptos.Rows.Count > 0 Then
+
+ ' If Not drv("Total").ToString.ToDecimal = factura.Total Then
+ ' Return Nothing
+ ' End If
+
+
+
+ ' End If
+ ' End If
+ ' End If
+ ' End If
+
+ ' If Obj.Count > 0 Then
+ ' Return Obj
+ ' Else
+ ' Return Nothing
+ ' End If
+
+ 'End Function
+
+ 'Private Function PreParaTimbre(Obj As Modelos.Factura, CveSubProyecto As Integer) As CFDITimbre
+
+ ' Dim Timbre As New CFDITimbre
+ ' Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
+ ' Timbre.Comprobante.Folio = Obj.Folio.ToString
+ ' Timbre.Comprobante.Serie = Obj.Serie
+ ' Timbre.Comprobante.Fecha = Obj.Fecha
+ ' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
+ ' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
+ ' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
+ ' Timbre.Comprobante.Subtotal = Obj.SubTotal
+
+ ' Timbre.Comprobante.Descuentos = Obj.Descuento
+ ' Timbre.Comprobante.Moneda = Obj.MonedaSAT
+ ' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
+ ' Timbre.Comprobante.Total = Obj.Total
+
+ ' Try
+ ' Obj.SetSubProyecto(Me)
+ ' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
+ ' Catch ex As Exception
+
+ ' End Try
+
+ ' Timbre.Comprobante.Confirmacion = ""
+
+ ' Timbre.Receptor.RFC = TxtRFC.Text
+ ' Timbre.Receptor.Nombre = TxtNombre.Text
+ ' Timbre.Receptor.ResidenciaFiscal = ""
+ ' Timbre.Receptor.NumeroRegistroTributario = ""
+ ' Timbre.Receptor.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}")
+
+ ' Dim totSubTotal As Decimal = Obj.SubTotal
+ ' Dim totIVA As Decimal = Obj.IVA
+ ' Dim totRetIVA As Decimal = Obj.RetIVA
+ ' Dim totRetISR As Decimal = Obj.RetISR
+ ' Dim TasaRetIVA As Decimal = 0
+ ' Dim TasaRetISR As Decimal = 0
+ ' Dim i As Integer = 1
+
+ ' ''detalles
+ ' Dim tPS As String = ""
+
+ ' For Each drr As DataRow In Obj.DtDetalle.Rows
+ ' If drr("PS").ToString.Length = 1 Then
+ ' tPS = drr("Obs").ToString
+ ' Else
+ ' If drr("PS").ToString.Length = 0 Then
+ ' tPS = ""
+ ' Else
+ ' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
+ ' End If
+ ' End If
+ ' '' condicionante, especial
+ ' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
+
+ ' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
+ ' .Descripcion = tPS,
+ ' .ValorUnitario = drr("PU").ToString.ToDecimal,
+ ' .Importe = drr("TotalImporte").ToString.ToDecimal,
+ ' .Descuento = drr("Descuento").ToString.ToDecimal,
+ ' .Unidad = drr("UM").ToString,
+ ' .ClaveUnidad = drr("SATClaveUM").ToString,
+ ' .ClaveProdServ = drr("SATClaveProdServ").ToString,
+ ' .Noidentificacion = drr("Noidentificacion").ToString,
+ ' .CuentaPredial = drr("CuentaPredial").ToString}
+ ' '' verifica suma subtotales
+ ' If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'proceso de ajusta de decimales
+ ' concepto.Importe = totSubTotal
+ ' End If
+ ' totSubTotal = totSubTotal - concepto.Importe
+
+ ' ''siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
+ ' If drr("ImporteIVA").ToString.ToDouble > 0 Then
+ ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
+ ' End If
+
+ ' If drr("ImporteIEPS").ToString.ToDouble > 0 Then
+ ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal})
+ ' End If
+
+ ' If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones
+ ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal})
+ ' End If
+
+ ' If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR
+ ' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal})
+ ' End If
+
+ ' Timbre.Conceptos.Add(concepto)
+ ' i += 1
+ ' Next
+
+ ' Dim AplicaComercioExteriorSubProyecto As Boolean = If(GlobalDTSubProyectos(-1, Obj.CveSubProyecto)(0)("AplicaComercioExterior").ToString = "True", True, False)
+ ' Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = AplicaComercioExteriorSubProyecto
+
+ ' If Obj.Cliente.AplicaComercioExterior And AplicaComercioExteriorSubProyecto Then
+
+ ' Timbre.Receptor.ResidenciaFiscal = Obj.Cliente.ClaveSATPais
+ ' Timbre.Receptor.NumeroRegistroTributario = Obj.Cliente.NumRegIdTrib
+
+ ' End If
+
+ ' Return Timbre
+ 'End Function
+
#End Region
-
+
#Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel"
Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click
ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones")
- End Sub
+ End Sub
Private Sub LnkCotizacionesExcel_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesExcel.Click
ImprimeGridsProveedores("Excel", DtCotizaciones, "RepClientesCotizaciones")
- End Sub
-
+ End Sub
+
Private Sub LnkCxCActivasPDF_Click(sender As Object, e As EventArgs) Handles LnkCxCActivasPDF.Click
ImprimeGridsProveedores("PDF", DtCxCActivas, "RepClientesCxCActivas")
- End Sub
+ End Sub
Private Sub LnkCxCActivasExcel_Click(sender As Object, e As EventArgs) Handles LnkCxCActivasExcel.Click
ImprimeGridsProveedores("Excel", DtCxCActivas, "RepClientesCxCActivas")
- End Sub
-
+ End Sub
+
Private Sub LnkHistorialCxCPDF_Click(sender As Object, e As EventArgs) Handles LnkHistorialCxCPDF.Click
ImprimeGridsProveedores("PDF", DtHistorialCxC, "RepClientesHistorialCxC")
- End Sub
+ End Sub
Private Sub LnkHistorialCxCExcel_Click(sender As Object, e As EventArgs) Handles LnkHistorialCxCExcel.Click
ImprimeGridsProveedores("Excel", DtHistorialCxC, "RepClientesHistorialCxC")
- End Sub
-
+ End Sub
+
Private Sub LnkAnticipoClientePDF_Click(sender As Object, e As EventArgs) Handles LnkAnticipoClientePDF.Click
ImprimeGridsProveedores("PDF", DtClientesAnticipo, "RepClientesAnticipos")
- End Sub
+ End Sub
Private Sub LnkAnticipoClienteExcel_Click(sender As Object, e As EventArgs) Handles LnkAnticipoClienteExcel.Click
ImprimeGridsProveedores("Excel", DtClientesAnticipo, "RepClientesAnticipos")
- End Sub
-
+ End Sub
+
Private Sub LnkAnticipoHistorialPDF_Click(sender As Object, e As EventArgs) Handles LnkAnticipoHistorialPDF.Click
ImprimeGridsProveedores("PDF", DtAnticipoHistorial, "RepClientesAnticipoHistorial")
- End Sub
+ End Sub
Private Sub LnkAnticipoHistorialExcel_Click(sender As Object, e As EventArgs) Handles LnkAnticipoHistorialExcel.Click
ImprimeGridsProveedores("Excel", DtAnticipoHistorial, "RepClientesAnticipoHistorial")
- End Sub
-
+ End Sub
+
Private Sub LnkCuentasBancariasPDF_Click(sender As Object, e As EventArgs) Handles LnkCuentasBancariasPDF.Click
ImprimeGridsProveedores("PDF", DTCuentasBancos, "RepClientesCuentasBancarias")
- End Sub
+ End Sub
Private Sub LnkCuentasBancariasExcel_Click(sender As Object, e As EventArgs) Handles LnkCuentasBancariasExcel.Click
ImprimeGridsProveedores("Excel", DTCuentasBancos, "RepClientesCuentasBancarias")
- End Sub
-
+ 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)
-
- Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
- Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
-
- params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
- params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
- params.Add(New ReportParameter("AgrupadoPor", "Cliente: " & LtlCliente.Text))
-
- If Imagen.Exists Then
- params.Add(New ReportParameter("LogoPath", logouri))
- Else
- params.Add(New ReportParameter("LogoPath", ""))
- End If
- ImprimirPDF("Empresas\Grales\Formatos\" & NombreFormato & ".rdlc", DtTemp, params, NombreFormato & "_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato)
- Else
- Alert("No se encontró información.", TipoMensaje.MsgAdvertencia)
+ If DtTemp IsNot Nothing And DtTemp.Rows.Count > 0 Then
+ Dim params As New List(Of ReportParameter)
+
+ Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+
+ params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
+ params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
+ params.Add(New ReportParameter("AgrupadoPor", "Cliente: " & LtlCliente.Text))
+
+ If Imagen.Exists Then
+ params.Add(New ReportParameter("LogoPath", logouri))
+ Else
+ params.Add(New ReportParameter("LogoPath", ""))
+ End If
+ 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 Sub
-
- Private Sub LnkUsadosReset_Click(sender As Object, e As EventArgs) Handles LnkUsadosReset.Click
-
- Dim Acum As New ClsAcumuladores
- Dim Puntos As Decimal = -LblUsadosPuntos.Text.ToDecimal
- If Acum.DistribuidorMovtosAdd(CveCliente, 1, 1, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Puntos, "Saldo Inicializado") Then
- Alert("Puntuación Inicializada")
- End If
- Acum.Dispose()
-
- End Sub
-#End Region
- Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
- If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
- TxtRetIVA.Text = "0"
- DivRetIVA.Visible = False
-
- If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
- TxtRetIVA.Text = "10"
- DivRetIVA.Visible = True
- ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
- TxtRetIVA.Text = "4"
- DivRetIVA.Visible = True
- ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") Then
- TxtRetIVA.Text = "6"
- DivRetIVA.Visible = True
- End If
-
- End If
- End Sub
+ End Sub
+
+ Private Sub LnkUsadosReset_Click(sender As Object, e As EventArgs) Handles LnkUsadosReset.Click
+
+ Dim Acum As New ClsAcumuladores
+ Dim Puntos As Decimal = -LblUsadosPuntos.Text.ToDecimal
+ If Acum.DistribuidorMovtosAdd(CveCliente, 1, 1, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Puntos, "Saldo Inicializado") Then
+ Alert("Puntuación Inicializada")
+ End If
+ Acum.Dispose()
+
+ End Sub
+#End Region
+ Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
+ If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
+ TxtRetIVA.Text = "0"
+ DivRetIVA.Visible = False
+
+ If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
+ TxtRetIVA.Text = "10"
+ DivRetIVA.Visible = True
+ ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
+ TxtRetIVA.Text = "4"
+ DivRetIVA.Visible = True
+ ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") Then
+ TxtRetIVA.Text = "6"
+ DivRetIVA.Visible = True
+ End If
+
+ End If
+ End Sub
+ Protected Sub btnupEventoBitacora_Click(sender As Object, e As EventArgs)
+ CargaEventoBitacora()
+ End Sub
End Class
diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb
index 3355cd25b..dee07e6c9 100644
--- a/Ventas/PV.aspx.vb
+++ b/Ventas/PV.aspx.vb
@@ -226,13 +226,13 @@ Partial Class PV
Private ReadOnly Property Ruta As String
Get
- Return AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
+ Return ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\"
End Get
End Property
Private ReadOnly Property RutaPruebas As String
Get
- Return AppDomain.CurrentDomain.BaseDirectory & "Empresas\1\"
+ Return ModExtensiones.DirectorioBaseEmpresas & "Empresas\1\"
End Get
End Property
@@ -1927,7 +1927,7 @@ Partial Class PV
Else
ObjVentas.Commit()
If ObjAC IsNot Nothing Then ObjAC.Commit()
- Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:="BtnRefrescarPagina();")
+ Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:="document.location.href=""/Ventas/PV.aspx"";")
End If
ObjVentas.Dispose()
diff --git a/Ventas/PopUpBuscarFolio.aspx.vb b/Ventas/PopUpBuscarFolio.aspx.vb
index dc21afb62..f5dc1d44e 100644
--- a/Ventas/PopUpBuscarFolio.aspx.vb
+++ b/Ventas/PopUpBuscarFolio.aspx.vb
@@ -7,7 +7,7 @@ Partial Class PopUpBuscarFolio
Private ReadOnly Property Ruta As String
Get
- Return AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
+ Return ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\"
End Get
End Property
@@ -159,8 +159,8 @@ Partial Class PopUpBuscarFolio
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
Dim Liga As String = String.Format("", e.Row.DBCampo("CveVenta"))
- If UsuarioActual.CveEmpresa = 140 AndAlso e.Row.DBCampo("TipoDocto").Contiene("Rem") Then
- Liga = String.Format("", e.Row.DBCampo("CveVenta"))
+ If UsuarioActual.CveEmpresa = 140 AndAlso e.Row.DBCampo("TipoDocto").Contiene("Rem") Then
+ Liga = String.Format("", e.Row.DBCampo("CveVenta"))
End If
e.Row.FCLiteral("LtlTipo").Text = String.Format("
", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("Folio"))
Else
e.Row.FCLiteral("LtlXML").Text = ""
End If
+
If IO.File.Exists($"{Ruta}PDF\{e.Row.DBCampo("TipoDocto")}\{e.Row.DBCampo("Folio")}.pdf") Then
- e.Row.FCLiteral("LtlPDF").Text = String.Format("
", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("Folio"))
Else
e.Row.FCLiteral("LtlPDF").Text = ""
End If
diff --git a/Ventas/PopUpImprimir.aspx.vb b/Ventas/PopUpImprimir.aspx.vb
index 90720a9ae..bf9706395 100644
--- a/Ventas/PopUpImprimir.aspx.vb
+++ b/Ventas/PopUpImprimir.aspx.vb
@@ -64,7 +64,7 @@ Partial Class PopUpImprimir
RegistraScript("$get('tdContenido').style.height='520px'")
Else
- Dim Path As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\" & Ext & "\" & CveVenta & "." & Ext
+ Dim Path As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\" & Ext & "\" & CveVenta & "." & Ext
Dim Archivo As New System.IO.FileInfo(Path)
If Archivo.Exists Then
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb
index 27d292fea..5bcf203e4 100644
--- a/Ventas/ProductosServicios.aspx.vb
+++ b/Ventas/ProductosServicios.aspx.vb
@@ -2281,7 +2281,7 @@ Partial Class ProductosyServicios
Dim Archivo = ""
Dim DirectorioTemporal = ""
- Dim DirectorioDestino = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas\{UsuarioActual.CveEmpresa}\Ecommerce\Productos\Imagenes\"
+ Dim DirectorioDestino = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\Ecommerce\Productos\Imagenes\"
If Not Directory.Exists(DirectorioDestino) Then
Directory.CreateDirectory(DirectorioDestino)
End If
@@ -2316,7 +2316,7 @@ Partial Class ProductosyServicios
If (CveImagenActivoFijo > 0) Then
Dim ObjEcommerce As New ClsECommerce
If ObjEcommerce.ProductosImagenesRemove(CveImagenActivoFijo, UsuarioActual.CveEmpresa) Then
- File.Delete(String.Format("{0}Empresas\{1}\{2}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, ObjEcommerce.DtResultados.Rows(0)("URL")))
+ File.Delete(String.Format("{0}Empresas\{1}\{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, ObjEcommerce.DtResultados.Rows(0)("URL")))
CargarGaleriaImagenesEcommerce()
RegistraScript("initcarusel();")
End If
diff --git a/Ventas/RepPS.aspx.vb b/Ventas/RepPS.aspx.vb
index 95092920d..fcef61fbb 100644
--- a/Ventas/RepPS.aspx.vb
+++ b/Ventas/RepPS.aspx.vb
@@ -2,13 +2,13 @@
Option Strict On
Imports Extensiones
-Imports System.Data
-Imports Microsoft.Reporting.WebForms
-
-Partial Class Ventas_RepPS
- Inherits ClsPaginas
-
-#Region "P R O P I E D A D E S"
+Imports System.Data
+Imports Microsoft.Reporting.WebForms
+
+Partial Class Ventas_RepPS
+ Inherits ClsPaginas
+
+#Region "P R O P I E D A D E S"
Private Property DtReporte As DataTable
Get
Return DirectCast(ViewState("DtReporte"), DataTable)
@@ -16,25 +16,25 @@ Partial Class Ventas_RepPS
Set(value As DataTable)
ViewState("DtReporte") = value
End Set
- End Property
-#End Region
-
+ End Property
+#End Region
+
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
- If Not IsPostBack Then
- CargaDatosIniciales()
- CargaCombos()
+ If Not IsPostBack Then
+ CargaDatosIniciales()
+ CargaCombos()
CargaDatos()
End If
- End Sub
- Private Sub CargaDatosIniciales()
- txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
- txtFechaF.Text = Now.ToString("dd/MM/yyyy")
- End Sub
-
- Private Sub CargaCombos()
- CargaTipoCentroCosto()
- End Sub
-
+ End Sub
+ Private Sub CargaDatosIniciales()
+ txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
+ txtFechaF.Text = Now.ToString("dd/MM/yyyy")
+ End Sub
+
+ Private Sub CargaCombos()
+ CargaTipoCentroCosto()
+ End Sub
+
Private Sub CargaTipoCentroCosto()
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
@@ -66,23 +66,23 @@ Partial Class Ventas_RepPS
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
LblSubProyecto.InnerText = "Sucursal:"
End If
- End Sub
-
- Private Sub CargaDatos()
-
- Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
- Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
- Dim CvePS As Integer = -1
- Dim CveMoneda As Integer = -1
- Dim TC As Integer = 1
+ End Sub
+
+ Private Sub CargaDatos()
+
+ Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
+ Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
+ Dim CvePS As Integer = -1
+ Dim CveMoneda As Integer = -1
+ Dim TC As Integer = 1
Dim TCEspecifico As Decimal = -1
Dim FechaI, FechaF As DateTime
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
- FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
-
+ FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
+
Dim ObjVentas As New ClsVentas()
- If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico) Then
- DtReporte = ObjVentas.DtResultados.Copy()
+ If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico) Then
+ DtReporte = ObjVentas.DtResultados.Copy()
GvDatos.DataSource = DtReporte
Else
GvDatos.DataSource = Nothing
@@ -92,28 +92,28 @@ Partial Class Ventas_RepPS
GvDatos.DataBind()
UPDatos.Update()
- End Sub
+ End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
- If e.Row.RowType = DataControlRowType.DataRow Then
- Select Case e.Row.DBCampo("Orden").ToString.ToEntero()
- Case 4
- e.Row.CssClass = "Totales"
- Case 3
- e.Row.CssClass = "SubTotales2"
- Case 2
- e.Row.CssClass = "SubTotales"
- Case 1
- e.Row.CssClass = "SubTotalesB"
- Case 0
- e.Row.CssClass = "Texto"
+ If e.Row.RowType = DataControlRowType.DataRow Then
+ Select Case e.Row.DBCampo("Orden").ToString.ToEntero()
+ Case 4
+ e.Row.CssClass = "Totales"
+ Case 3
+ e.Row.CssClass = "SubTotales2"
+ Case 2
+ e.Row.CssClass = "SubTotales"
+ Case 1
+ e.Row.CssClass = "SubTotalesB"
+ Case 0
+ e.Row.CssClass = "Texto"
End Select
End If
- End Sub
- Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
- CargaDatos()
- End Sub
-
-
+ End Sub
+ Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
+ CargaDatos()
+ End Sub
+
+
#Region " IMPRIMIR "
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
If GvDatos.Rows.Count > 0 Then
@@ -128,10 +128,10 @@ Partial Class Ventas_RepPS
Private Sub GenerarPDF()
Dim FechaI, FechaF As Date
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
- FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
+ FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
If DtReporte IsNot Nothing AndAlso DtReporte.Rows.Count > 0 Then
Dim SbParametros As New StringBuilder
- SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyecto.SelectedItem.Text)
+ SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyecto.SelectedItem.Text)
SbParametros.AppendFormat(", Orden:{0}", DdlGrupo.SelectedItem.Text)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -147,20 +147,20 @@ Partial Class Ventas_RepPS
params.Add(New ReportParameter("LogoPath", logouri))
Else
params.Add(New ReportParameter("LogoPath", ""))
- End If
- params.Add(New ReportParameter("Parametros", SbParametros.ToString()))
-
- If System.IO.File.Exists($"{Server.MapPath("/")}/Empresas/{UsuarioActual.CveEmpresa}/Formatos/RepPS.rdlc") Then
- ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/RepPS.rdlc", DtReporte, params, "ReportePS")
- Else
- ImprimirPDF($"Empresas/Grales/Formatos/RepPS.rdlc", DtReporte, params, "ReportePS")
+ End If
+ params.Add(New ReportParameter("Parametros", SbParametros.ToString()))
+
+ If System.IO.File.Exists($"{ModExtensiones.DirectorioBaseEmpresas}/Empresas/{UsuarioActual.CveEmpresa}/Formatos/RepPS.rdlc") Then
+ ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/RepPS.rdlc", DtReporte, params, "ReportePS")
+ Else
+ ImprimirPDF($"Empresas/Grales/Formatos/RepPS.rdlc", DtReporte, params, "ReportePS")
End If
Else
Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia)
End If
- End Sub
-
+ End Sub
+
#End Region
-
-End Class
+
+End Class
diff --git a/Ventas/RepRecuperacion.aspx.vb b/Ventas/RepRecuperacion.aspx.vb
index ab5d4b57b..5ca328ee7 100644
--- a/Ventas/RepRecuperacion.aspx.vb
+++ b/Ventas/RepRecuperacion.aspx.vb
@@ -92,8 +92,8 @@ Partial Class Ventas_RepRecuperacion
'Carga Bancos'
DdlBanco.DataSource = GlobalDTBancos().FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
- DdlBanco.DataBind()
- DdlBanco.Items.Insert(0, New ListItem("Todos", "-1"))
+ DdlBanco.DataBind()
+ DdlBanco.Items.Insert(0, New ListItem("Todos", "-1"))
DdlBanco.Items.Add(New ListItem("Empresa", "0"))
'Carga Clasificacion Cliente'
@@ -179,7 +179,7 @@ Partial Class Ventas_RepRecuperacion
#Region "SELECTED INDEX CHANGE"
Protected Sub DdlBanco_SelectedIndexChanged(sender As Object, e As EventArgs)
- DdlCuentaBancaria.Items.Clear()
+ DdlCuentaBancaria.Items.Clear()
DdlCuentaBancaria.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros($"CveBanco = {DdlBanco.SelectedValue.ToEntero}")
DdlCuentaBancaria.Items.Insert(0, New ListItem("Todos", "-1"))
DdlCuentaBancaria.DataBind()
@@ -214,7 +214,7 @@ Partial Class Ventas_RepRecuperacion
If DdlResponsable.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Responsable: {0}", DdlResponsable.SelectedItem.Text)
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\RepRecuperacion.rdlc"
If Not File.Exists(RutaPDF) Then
RutaPDF = "Empresas/Grales/Formatos/RepRecuperacion.rdlc"
diff --git a/Ventas/RepRecuperacionDetalle.aspx.vb b/Ventas/RepRecuperacionDetalle.aspx.vb
index 4f2027ccc..fd8ccd5a9 100644
--- a/Ventas/RepRecuperacionDetalle.aspx.vb
+++ b/Ventas/RepRecuperacionDetalle.aspx.vb
@@ -296,7 +296,7 @@ Partial Class Ventas_RepRecuperacionDetalle
If DdlClienteSucursal.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Cliente Sucursal: {0}", DdlClienteSucursal.SelectedItem.Text)
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\RepRecuperacionDetalle.rdlc"
If Not File.Exists(RutaPDF) Then
RutaPDF = "Empresas/Grales/Formatos/RepRecuperacionDetalle.rdlc"
diff --git a/Ventas/ReporteDetalle.aspx.cs b/Ventas/ReporteDetalle.aspx.cs
index 2b4086f33..7b17bb50c 100644
--- a/Ventas/ReporteDetalle.aspx.cs
+++ b/Ventas/ReporteDetalle.aspx.cs
@@ -122,11 +122,11 @@ public partial class Ventas_ReporteDetalle : ClsPaginas
Hashtable UrlParametros = Parametros(ModExtensiones.Decripta(Request["Op"].ToString()));
if (Request["Mod"] != null && Request["Mod"].ToString().Equals("Editar"))
{
- Directorio1 = AppDomain.CurrentDomain.BaseDirectory + string.Format(@"Empresas\{0}\Formatos\Factura.mrt", UrlParametros["CVEEMPRESA"].ToString());
+ Directorio1 = ModExtensiones.DirectorioBaseEmpresas + string.Format(@"Empresas\{0}\Formatos\Factura.mrt", UrlParametros["CVEEMPRESA"].ToString());
}
else
{
- Directorio1 = AppDomain.CurrentDomain.BaseDirectory + @"Empresas\Grales\Formatos\Factura.mrt";
+ Directorio1 = ModExtensiones.DirectorioBaseEmpresas + @"Empresas\Grales\Formatos\Factura.mrt";
}
CargaFactura(Directorio1, UrlParametros);
SmdDesigner.Report = Reporte;
@@ -300,7 +300,7 @@ public partial class Ventas_ReporteDetalle : ClsPaginas
{
Hashtable UrlParametros = Parametros(ModExtensiones.Decripta(Request["Op"].ToString()));
CveEmpresa = UrlParametros["CVEEMPRESA"].ToString().ToEntero();
- string DirBase = AppDomain.CurrentDomain.BaseDirectory + string.Format(@"Empresas\{0}\Formatos\", CveEmpresa);
+ string DirBase = ModExtensiones.DirectorioBaseEmpresas + string.Format(@"Empresas\{0}\Formatos\", CveEmpresa);
if (!System.IO.Directory.Exists(DirBase))
{
System.IO.Directory.CreateDirectory(DirBase);
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index 5c7644475..601d94852 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -4133,7 +4133,11 @@
Agendar
+
@@ -4142,6 +4146,7 @@
+
@@ -4165,7 +4170,7 @@
Descripción
-
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index d6ae66541..e828f93c6 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -597,12 +597,12 @@ Partial Class Ventas
End Property
Private ReadOnly Property Ruta As String
Get
- Return AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\"
+ Return UsuarioActual.Empresa.Ruta
End Get
End Property
Private ReadOnly Property RutaPruebas As String
Get
- Return AppDomain.CurrentDomain.BaseDirectory & "Empresas\1\"
+ Return String.Format("{0}Empresas/1/", ModExtensiones.DirectorioBaseEmpresas)
End Get
End Property
Private ReadOnly Property TipoCambio As Decimal
@@ -5625,7 +5625,7 @@ Partial Class Ventas
ObjClientes.Dispose()
Me.ObjFacturaNC = Nothing
- Me.ObjFacturaNC = New Modelos.Factura(UsuarioActual, pCveVenta, UsuarioActual.CveEmpresa, DirectorioServidor:=Server.MapPath("/"), EsCancelacion:=False)
+ Me.ObjFacturaNC = New Modelos.Factura(UsuarioActual, pCveVenta, UsuarioActual.CveEmpresa, DirectorioServidor:=ModExtensiones.DirectorioBaseEmpresas, EsCancelacion:=False)
DdlNCFactura.DataSource = DTFacNC
DdlNCFactura.DataBind()
@@ -7188,7 +7188,7 @@ Partial Class Ventas
Try
- Dim DirectoriArchivoXML As String = System.IO.Path.Combine(Server.MapPath("/"), "Empresas", UsuarioActual.CveEmpresa.ToString(), ObjFactura.TipoDocto)
+ Dim DirectoriArchivoXML As String = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas", UsuarioActual.CveEmpresa.ToString(), ObjFactura.TipoDocto)
If Not Directory.Exists(DirectoriArchivoXML) Then
Directory.CreateDirectory(DirectoriArchivoXML)
End If
@@ -16869,7 +16869,7 @@ Partial Class Ventas
Dim ObjEventoBitacora As New ClsOIEventos()
If ObjEventoBitacora.GetAgendaBitacora(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
- GvEB.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento = 6 OR CveTipoEvento = 2")
+ GvEB.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento IN(6,2,1)")
Else
GvEB.DataSource = Nothing
End If
@@ -18489,7 +18489,7 @@ Partial Class Ventas
Dim RFC As String = ""
Dim XMLDoc As New XmlDocument
- Dim Archivo As String = String.Format("{0}Empresas\{1}\Ventas\{2}\{3}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, Request("RFC"), $"{Request("CveFactura")}.xml")
+ Dim Archivo As String = String.Format("{0}Empresas\{1}\Ventas\{2}\{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Request("RFC"), $"{Request("CveFactura")}.xml")
If IO.File.Exists(Archivo) Then
Dim Validada As Boolean = True
@@ -19433,7 +19433,7 @@ Partial Class Ventas
#Region "DESCARGAR E IMPRIMIR LISTADO"
Public Sub DescargarFormato()
- Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\Formatos\FormatoVentas.xlsx"
+ Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoVentas.xlsx"
Dim Archivo As New IO.FileInfo(Directorio)
If Archivo.Exists Then
@@ -19672,7 +19672,7 @@ Partial Class Ventas
Private 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
@@ -21903,12 +21903,19 @@ Partial Class Ventas
End If
ObjCliente.Dispose()
- AplicarNC(DdlNCPS.SelectedValue.ToEntero(), EsNCAmortizacion:=ChkAplicaNCAnticipo.Checked, AplicaImpuestosLocales:=AplicaImpuestosLocales)
+ Dim AplicaNuevoDocumento As Boolean = False
+
+ 'SOLO APLICA SI NO HAY DOCUMENTOS QUE SELECCIONAR
+ If UsuarioActual.CveEmpresa = 140 AndAlso GvCxC.Rows.Count = 0 Then
+ AplicaNuevoDocumento = True
+ End If
+
+ AplicarNC(DdlNCPS.SelectedValue.ToEntero(), EsNCAmortizacion:=ChkAplicaNCAnticipo.Checked, AplicaImpuestosLocales:=AplicaImpuestosLocales, AplicaNuevoDocumento:=AplicaNuevoDocumento)
RegistraScript("$('#ModalAplicarNC').modal('hide');", "EscondeModalNC")
End Sub
- Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True)
+ Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False)
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If DrPS Is Nothing Then
Alert("Ocurrió un error al cargar la información del producto. Por favor comuniquese con asistencia SIG", TipoMensaje.MsgError)
@@ -21951,41 +21958,48 @@ Partial Class Ventas
DtImpuestos.AcceptChanges()
Dim AcumuladoNC As Decimal = 0
- If AplicaNCMasiva Then
- If NCDescuento Then
- For Each RNC In ListaNCDesc
- DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales), True, MissingSchemaAction.Ignore)
- Next
- Else
+ If Not AplicaNuevoDocumento Then
+ If AplicaNCMasiva Then
+ If NCDescuento Then
+ For Each RNC In ListaNCDesc
+ DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales), True, MissingSchemaAction.Ignore)
+ Next
+ Else
- For Each Gvr As GridViewRow In GvCxC.Rows
- If Gvr.FCCheckBox("ChkCxC").Checked Then
- DtImpuestos.Merge(CargaDtImpuestosNC(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales), True, MissingSchemaAction.Ignore)
- 'CARGA FACTURA A LA CUAL SE APLICA LA NC
- AcumuladoNC += Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal
- CargaNCDT(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal)
+ For Each Gvr As GridViewRow In GvCxC.Rows
+ If Gvr.FCCheckBox("ChkCxC").Checked Then
+ DtImpuestos.Merge(CargaDtImpuestosNC(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales), True, MissingSchemaAction.Ignore)
+ 'CARGA FACTURA A LA CUAL SE APLICA LA NC
+ AcumuladoNC += Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal
+ CargaNCDT(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal)
+ End If
+ Next
+ End If
+ Else
+ DtImpuestos = CargaDtImpuestosNC(CveVenta, TxtNCImporte.Text.Trim.ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales)
+
+ If EsNCAmortizacion Then
+ If DtAnticipoAmortizacion Is Nothing Then
+ InicializaDTAnticiposAmortizacion()
End If
- Next
+ Dim PorcentajeAplicado As Decimal = (TxtNCPorcentaje.Text.ToDecimal / 100D)
+
+ Dim RowAnticipo As DataRow = DtAnticipoAmortizacion.NewRow
+ RowAnticipo("CveVenta") = Me.CveVenta
+ RowAnticipo("Importe") = TxtNCImporte.Text.Trim.ToDecimal
+ RowAnticipo("SaldoAnticipo") = SaldoAnticipo * PorcentajeAplicado
+
+ DtAnticipoAmortizacion.Rows.Add(RowAnticipo)
+ End If
+
End If
Else
- DtImpuestos = CargaDtImpuestosNC(CveVenta, TxtNCImporte.Text.Trim.ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales)
-
- If EsNCAmortizacion Then
- If DtAnticipoAmortizacion Is Nothing Then
- InicializaDTAnticiposAmortizacion()
- End If
- Dim PorcentajeAplicado As Decimal = (TxtNCPorcentaje.Text.ToDecimal / 100D)
-
- Dim RowAnticipo As DataRow = DtAnticipoAmortizacion.NewRow
- RowAnticipo("CveVenta") = Me.CveVenta
- RowAnticipo("Importe") = TxtNCImporte.Text.Trim.ToDecimal
- RowAnticipo("SaldoAnticipo") = SaldoAnticipo * PorcentajeAplicado
-
- DtAnticipoAmortizacion.Rows.Add(RowAnticipo)
- End If
-
+ For Each RNC In ListaRemisionesNC
+ DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales), True, MissingSchemaAction.Ignore)
+ Next
End If
+
Dim query = From dr In DtImpuestos
Group By PorcentajeIVA = dr("PorcentajeIVA").ToString().ToDecimal,
PorcentajeRetIVA = dr("PorcentajeRetIVA").ToString().ToDecimal,
@@ -22004,7 +22018,10 @@ Partial Class Ventas
PorcentajeIEPS = PorcentajeIEPS
'(1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
- Dim DrSubProyecto = GlobalDTSubProyectos(-1, TmpDT.FiltroPrimeroValor("CveSubProyecto", "", "ImporteTotal DESC").ToEntero(), UsuarioActual.CveEmpresa, -1).FiltroPrimero("")
+ 'Dim DrSubProyecto = GlobalDTSubProyectos(-1, TmpDT.FiltroPrimeroValor("CveSubProyecto", "", "ImporteTotal DESC").ToEntero(), UsuarioActual.CveEmpresa, -1).FiltroPrimero("")
+
+ Dim DrSubProyecto = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, -1).FiltroPrimero("")
+
If DrSubProyecto Is Nothing Then
Alert("Ocurrió un error al cargar la información de centro de costos. Por favor comuniquese con asistencia SIG", TipoMensaje.MsgError)
Exit Sub
@@ -22100,8 +22117,8 @@ Partial Class Ventas
Dim TmpDT As DataTable = Nothing
Dim TmpDTImpuestos As DataTable = Nothing
- Dim ObjVentas As New ClsVentas
+ Dim ObjVentas As New ClsVentas
If ObjVentas.GetVentaImpuestosLocales(CveVentaNC) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
TmpDTImpuestos = ObjVentas.DtResultados.Copy()
@@ -22127,7 +22144,8 @@ Partial Class Ventas
End If
ObjVentas.Dispose()
- Dim DtImpuestosLocal = TmpDT.FiltraParametros("", "", {"PorcentajeIVA", "PorcentajeRetIVA", "PorcentajeRetISR", "PorcentajeIEPS", "CveSubProyecto"}).Copy
+
+ Dim DtImpuestosLocal = TmpDT.FiltraParametros("", "", {"PorcentajeIVA", "PorcentajeRetIVA", "PorcentajeRetISR", "PorcentajeIEPS", "CveSubProyecto"}).Copy()
DtImpuestosLocal.Columns.Add("ImportePU", GetType(Decimal))
DtImpuestosLocal.Columns.Add("ImporteTotal", GetType(Decimal))
DtImpuestosLocal.Columns.Add("ImporteIVA", GetType(Decimal))
@@ -25423,4 +25441,7 @@ Partial Class Ventas
Public EsPUModificado As Boolean = False
End Class
+ Protected Sub btnupEventoBitacora_Click(sender As Object, e As EventArgs)
+ CargaEventoBitacora()
+ End Sub
End Class
\ No newline at end of file
diff --git a/Ventas/eFacturas.aspx.vb b/Ventas/eFacturas.aspx.vb
index 93eaabdda..2fe02e10e 100644
--- a/Ventas/eFacturas.aspx.vb
+++ b/Ventas/eFacturas.aspx.vb
@@ -48,7 +48,7 @@ Partial Class Ventas_eFacturas
txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString
- Destino = String.Format("{0}Ventas\", UsuarioActual.Empresa.Ruta) 'string.format("{0}Empresas\{1}\Compras\", AppDomain.CurrentDomain.BaseDirectory ,UsuarioActual.CveEmpresa & "\Compras\"
+ Destino = String.Format("{0}Ventas\", UsuarioActual.Empresa.Ruta) 'string.format("{0}Empresas\{1}\Compras\", ModExtensiones.DirectorioBaseEmpresas ,UsuarioActual.CveEmpresa & "\Compras\"
Ejecutable = String.Format("{0}\Utilerias\eeeFacturas.exe", AppDomain.CurrentDomain.BaseDirectory)
Form.DefaultButton = BtnConsultar.UniqueID
@@ -354,7 +354,7 @@ Partial Class Ventas_eFacturas
Protected Sub LnkNoRecibidas_Click(sender As Object, e As EventArgs) Handles LnkNoRecibias.Click
Dim dt 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
dt.ReadXml(Ruta)
@@ -440,8 +440,8 @@ Partial Class Ventas_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)
@@ -464,7 +464,7 @@ Partial Class Ventas_eFacturas
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 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)
diff --git a/WEB.rar b/WEB.rar
new file mode 100644
index 000000000..f1421731b
Binary files /dev/null and b/WEB.rar differ
diff --git a/asmx/WSApp.asmx b/asmx/WSApp.asmx
index 92d0c128c..461d63f35 100644
--- a/asmx/WSApp.asmx
+++ b/asmx/WSApp.asmx
@@ -1,5 +1,5 @@
-<%@ WebService Language="VB" Class="WSApp" %>
-
+<%@ WebService Language="VB" Class="WSApp" %>
+
Option Explicit On
Imports System.Data
@@ -22,9 +22,9 @@ Imports Newtonsoft.Json.Linq
Public Class WSApp
- Inherits System.Web.Services.WebService
+ Inherits System.Web.Services.WebService
#Region "G L O B A L - D T"
-
+
Public ReadOnly Property UrlSitio As String
Get
Return ConfigurationManager.AppSettings("UrlSitio").ToString
@@ -73,10 +73,10 @@ Public Class WSApp
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then
Dim P As New ClsSubProyectos
- If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados
+ If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados
P.Dispose()
- Dim msg As String = "aqui no se carga subproyectos"
+ Dim msg As String = "aqui no se carga subproyectos"
msg.GuardaLog()
End If
@@ -97,8 +97,8 @@ Public Class WSApp
End If
End Get
- Set(ByVal value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
+ Set(ByVal value As DataTable)
+ Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
Application(AppNombre) = value
End Set
End Property
@@ -425,9 +425,9 @@ Public Class WSApp
Set(value As DataTable)
Application("GlobalDTMotivosHorasExtras") = value
End Set
- End Property
+ End Property
#End Region
-
+
Public Property CveEmpresa As Integer = 143
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
@@ -448,7 +448,7 @@ Public Class WSApp
Else
End If
ObjEmpresa.Dispose()
- End Sub
+ End Sub
#Region "M E T O D O S - S E R V I C I O"
Public Function ValidaUsuario(CveUsuario As Integer) As Usuario
Dim UsuarioActual As Usuario = Nothing
@@ -728,12 +728,12 @@ Public Class WSApp
If UsuarioActual IsNot Nothing Then
'If UsuarioActual.TienePermisoProceso(159) Then
- ' Dim Factura As New Modelos.Factura(UsuarioActual, CveVenta, CveEmpresa, Server.MapPath("/"))
+ ' Dim Factura As New Modelos.Factura(UsuarioActual, CveVenta, CveEmpresa, ModExtensiones.DirectorioBaseEmpresas)
' Retorno = Factura.CancelarDocumento()
'Else
' Retorno.Mensajes.Add("Este usuario no tiene permiso para cancelar documento")
'End If
- Dim Factura As New Modelos.Factura(UsuarioActual, CveVenta, CveEmpresa, Server.MapPath("/"))
+ Dim Factura As New Modelos.Factura(UsuarioActual, CveVenta, CveEmpresa, ModExtensiones.DirectorioBaseEmpresas)
If String.IsNullOrEmpty(Factura.FolioFiscal) Then
Factura.FolioFiscal = ""
End If
@@ -783,9 +783,9 @@ Public Class WSApp
Retorno.Mensajes.Add("Ocurrió un error al eliminar el movimiento. Por favor vuelva a intetar.")
End If
ObjInv.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "P E D I D O S"
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
Dim Timbre As New CFDITimbre
@@ -899,9 +899,9 @@ Public Class WSApp
i += 1
Next
Return Timbre
- End Function
+ End Function
#End Region
-
+
#Region "R E M I S I O N E S"
Private Function CreaFactura(ByRef Retorno As Modelos.Factura.MMensajeFactura, CveCliente As Integer, CveAlmacen As Integer, CveSubProyecto As Integer, CveMoneda As Integer, UsuarioActual As Usuario, Observaciones As String, ListaPS As List(Of MVentaProductos)) As Modelos.Factura
If CveSubProyecto <= 0 Then
@@ -923,7 +923,7 @@ Public Class WSApp
End If
End If
Dim ObjFactura = New Modelos.Factura(UsuarioActual)
- ObjFactura.DirectorioServidor = Server.MapPath("/")
+ ObjFactura.DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
Dim ObjFolios As New ClsGralFolios()
If ObjFolios.GetFolios("Rem", UsuarioActual.CveEmpresa) Then
@@ -1062,12 +1062,12 @@ Public Class WSApp
ObjFactura.Total = Total
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
- ObjFactura.CveContratoSecciones = ""
-
- 'BORRAR
- ObjFactura.DtRecepcionUsados = New DataTable
- ObjFactura.DtRecepcionUsados.Columns.Add("CvePS", GetType(Integer))
-
+ ObjFactura.CveContratoSecciones = ""
+
+ 'BORRAR
+ ObjFactura.DtRecepcionUsados = New DataTable
+ ObjFactura.DtRecepcionUsados.Columns.Add("CvePS", GetType(Integer))
+
Catch ex As Exception
Retorno.Mensajes.Add(ex.ToString())
Return Nothing
@@ -1159,8 +1159,8 @@ Public Class WSApp
TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String))
TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String))
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
- TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
-
+ TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
+
TmpDT.Columns.Add("CveTamaño", GetType(Double))
Try
@@ -1430,9 +1430,9 @@ Public Class WSApp
End Try
ObjVentas.Dispose()
Return strBody.ToString
- End Function
+ End Function
#End Region
-
+
End Class
Namespace WebServiceAppModels2
diff --git a/asmx/WSGPSApp.asmx b/asmx/WSGPSApp.asmx
index c834e2cd5..fe22ec1bd 100644
--- a/asmx/WSGPSApp.asmx
+++ b/asmx/WSGPSApp.asmx
@@ -1,4 +1,4 @@
-<%@ WebService Language="VB" Class="WSGPSApp" %>
+<%@ WebService Language="VB" Class="WSGPSApp" %>
Option Strict On
Imports System.Web
@@ -31,8 +31,8 @@ Public Class WSGPSApp
Inherits System.Web.Services.WebService
Private Const LongValue As Long = &H100000000
- Public Property Credentials As AuthHeader
-
+ Public Property Credentials As AuthHeader
+
#Region "G L O B A L S"
Property GlobalDTDispositivos(CveCliente As Integer) As DataTable
Get
@@ -90,7 +90,7 @@ Public Class WSGPSApp
Set(value As DataTable)
Application("GlobalDTDispositivosUsuarios") = value
End Set
- End Property
+ End Property
#End Region
@@ -528,7 +528,7 @@ Public Class WSGPSApp
End If
If CveEmpresa > 0 Then
Dim Archivo As String = String.Format("{0}{1}", CveImagenDispositivo, FileExtension)
- Dim Directorio As String = String.Format("{0}\Empresas\{1}\Dispositivos\{2}\Imagenes\", AppDomain.CurrentDomain.BaseDirectory, CveEmpresa, item.CveDispositivo)
+ Dim Directorio As String = String.Format("{0}\Empresas\{1}\Dispositivos\{2}\Imagenes\", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa, item.CveDispositivo)
If Not Directory.Exists(Directorio) Then
Directory.CreateDirectory(Directorio)
End If
@@ -936,28 +936,28 @@ Public Class WSGPSApp
Return Retorno
- End Function
-
+ End Function
+
Public Function GetArrastre(CveDispositivo As Integer) As String
- Dim Retorno As String = "[]"
- Using ObjGPS As New ClsGPS
- If ObjGPS.GPS_ArrastreGET(CveDispositivo) Then
- Retorno = ObjGPS.DtResultados.DataTableToJSONIPP()
- End If
+ Dim Retorno As String = "[]"
+ Using ObjGPS As New ClsGPS
+ If ObjGPS.GPS_ArrastreGET(CveDispositivo) Then
+ Retorno = ObjGPS.DtResultados.DataTableToJSONIPP()
+ End If
End Using
Return Retorno
- End Function
+ End Function
Public Function ActivarDesactivarArrastre(CveDispositivo As Integer, Activo As Boolean) As Boolean
- Dim Retorno As Boolean = False
- Using ObjGPS As New ClsGPS
- Retorno = ObjGPS.GPS_ArrastreActivarDesactivar(CveDispositivo, Activo)
+ Dim Retorno As Boolean = False
+ Using ObjGPS As New ClsGPS
+ Retorno = ObjGPS.GPS_ArrastreActivarDesactivar(CveDispositivo, Activo)
End Using
Return Retorno
- End Function
-
+ End Function
+
Public Function GetTrayectos(CveCliente As Integer) As String
Dim Retorno As String = "[]"
@@ -965,8 +965,8 @@ Public Class WSGPSApp
Return Retorno
- End Function
-
+ End Function
+
Public Function GetEstatusTrayectos(CveCliente As Integer) As String
Dim Retorno As String = "[]"
@@ -974,7 +974,7 @@ Public Class WSGPSApp
Return Retorno
- End Function
+ End Function
Public Function GetEstatusTrayectosHistorial(CveCliente As Integer) As String
Dim Retorno As String = "[]"
@@ -982,7 +982,7 @@ Public Class WSGPSApp
Return Retorno
- End Function
+ End Function
Public Function GetTrayectosEstatusHistorial(CveTrayecto As Integer) As String
Dim Retorno As String = "[]"
@@ -990,8 +990,8 @@ Public Class WSGPSApp
Return Retorno
- End Function
-
+ End Function
+
#Region "F U N C I O N E S"
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
Dim ObjEmpresa As New ClsSisEmpresas()
@@ -1107,7 +1107,7 @@ Public Class WSGPSApp
OnError("Acceso no autorizado", New SoapException("Unauthorized", SoapException.ClientFaultCode))
Return False
End If
- End Function
+ End Function
#End Region
End Class
Namespace ADGPSModels
diff --git a/asmx/WSSIGApp.asmx b/asmx/WSSIGApp.asmx
index b675f7c84..71c1f2945 100644
--- a/asmx/WSSIGApp.asmx
+++ b/asmx/WSSIGApp.asmx
@@ -1366,7 +1366,7 @@ Public Class WSSIGApp
If ObjEventoBitacora.AddEventoBitacora(Ent.Descripcion, FileExtension, Ent.CveUsuario, Ent.CveEmpresa, CveOC:=Ent.CveOC, Prioridad:=Ent.Prioridad.ToEntero()) Then
If Ent.Imagen1 <> "" Then
Try
- Dim FileURL As String = String.Format("{0}Empresas\{1}\OI\", AppDomain.CurrentDomain.BaseDirectory, Ent.CveEmpresa)
+ Dim FileURL As String = String.Format("{0}Empresas\{1}\OI\", ModExtensiones.DirectorioBaseEmpresas, Ent.CveEmpresa)
If Not IO.Directory.Exists(FileURL) Then
IO.Directory.CreateDirectory(FileURL)
End If
@@ -1824,7 +1824,7 @@ Public Class WSSIGApp
End If
End If
Dim ObjFactura = New Modelos.Factura(UsuarioActual)
- ObjFactura.DirectorioServidor = Server.MapPath("/")
+ ObjFactura.DirectorioServidor = ModExtensiones.DirectorioBaseEmpresas
Dim ObjFolios As New ClsGralFolios()
If ObjFolios.GetFolios(TipoDocto, UsuarioActual.CveEmpresa) Then
@@ -2600,7 +2600,7 @@ Public Class WSSIGApp
If ObjOI.AddEventoBitacora(Bit.Descripcion, FileExtension, Ent.CveUsuario, Ent.CveEmpresa, CveOC:=ObjOC.CveOrdenCompra, Prioridad:=Bit.CvePrioridad) Then
If Bit.Imagen1 <> "" Then
Try
- Dim FileURL As String = String.Format("{0}Empresas\{1}\OI\", AppDomain.CurrentDomain.BaseDirectory, Ent.CveEmpresa)
+ Dim FileURL As String = String.Format("{0}Empresas\{1}\OI\", ModExtensiones.DirectorioBaseEmpresas, Ent.CveEmpresa)
If Not IO.Directory.Exists(FileURL) Then
IO.Directory.CreateDirectory(FileURL)
End If
@@ -3707,7 +3707,7 @@ Public Class WSSIGApp
Exit For
Else
If Not String.IsNullOrEmpty(FileExtension) Then
- Dim Directorio As String = String.Format("{0}\Empresas\{1}\OI\OI{2}{3}", AppDomain.CurrentDomain.BaseDirectory, item.CveEmpresa, ObjBitacora.CveEvento.ToString(), FileExtension)
+ Dim Directorio As String = String.Format("{0}\Empresas\{1}\OI\OI{2}{3}", ModExtensiones.DirectorioBaseEmpresas, item.CveEmpresa, ObjBitacora.CveEvento.ToString(), FileExtension)
File.WriteAllBytes(Directorio, Convert.FromBase64String(item.Base64Archivo))
End If
End If
@@ -3738,7 +3738,7 @@ Public Class WSSIGApp
If Not TieneError Then
If Not String.IsNullOrEmpty(FileExtension) Then
- Dim Directorio As String = String.Format("{0}\Empresas\{1}\OI\OI{2}{3}", AppDomain.CurrentDomain.BaseDirectory, item.CveEmpresa, ObjBitacora.CveEvento.ToString(), FileExtension)
+ Dim Directorio As String = String.Format("{0}\Empresas\{1}\OI\OI{2}{3}", ModExtensiones.DirectorioBaseEmpresas, item.CveEmpresa, ObjBitacora.CveEvento.ToString(), FileExtension)
File.WriteAllBytes(Directorio, Convert.FromBase64String(item.Base64Archivo))
End If
End If
@@ -3768,7 +3768,7 @@ Public Class WSSIGApp
If CveArchivo > 0 Then
If Not String.IsNullOrEmpty(FileExtension) Then
Dim Archivo As String = String.Format("{0}{1}", CveArchivo, FileExtension)
- Dim Directorio As String = String.Format("{0}\Empresas\{1}\Acercamientos\{2}\Imagenes\", AppDomain.CurrentDomain.BaseDirectory, item.CveEmpresa, item.CveAcercamiento)
+ Dim Directorio As String = String.Format("{0}\Empresas\{1}\Acercamientos\{2}\Imagenes\", ModExtensiones.DirectorioBaseEmpresas, item.CveEmpresa, item.CveAcercamiento)
If Not Directory.Exists(Directorio) Then
Directory.CreateDirectory(Directorio)
End If
@@ -4177,8 +4177,8 @@ Public Class WSSIGApp
'
'
'
- Dim idgrupo2 = -1
- Dim FechaI = FechaInicio.ToString("yyyy/MM/dd")
+ Dim idgrupo2 = -1
+ Dim FechaI = FechaInicio.ToString("yyyy/MM/dd")
Dim FechaF = FechaFin.ToString("yyyy/MM/dd")
Select Case AgrupadoPor
@@ -4224,12 +4224,12 @@ Public Class WSSIGApp
Public Function GetRepAcercamientosRechazos(CveEmpresa As Integer, CveVendedor As Integer, FechaInicio As DateTime, FechaFin As DateTime) As String
Dim Retorno = "[]"
- Dim cveTipoProceso = -1
- Dim idgrupo1 = 1
- Dim idgrupo2 = -1
- Dim FechaI = FechaInicio.ToString("yyyy/MM/dd")
- Dim FechaF = FechaFin.ToString("yyyy/MM/dd")
- Dim cveMedioCaptacion = -1
+ Dim cveTipoProceso = -1
+ Dim idgrupo1 = 1
+ Dim idgrupo2 = -1
+ Dim FechaI = FechaInicio.ToString("yyyy/MM/dd")
+ Dim FechaF = FechaFin.ToString("yyyy/MM/dd")
+ Dim cveMedioCaptacion = -1
Dim cveProbabilidadAcercamiento = -1
Using ObjCRM As New ClsCRM
If ObjCRM.RepAcercamientosEtapas(CveEmpresa, cveTipoProceso, idgrupo1, idgrupo2, FechaI, FechaF, CveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento) Then
diff --git a/asmx/WsTSoft.asmx b/asmx/WsTSoft.asmx
index 626fdbb83..5c10a6d20 100644
--- a/asmx/WsTSoft.asmx
+++ b/asmx/WsTSoft.asmx
@@ -71,10 +71,12 @@ Public Class WsTSoft
ObjGPS.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString()
Next
End If
+ If ObjGPS.DtResultados IsNot Nothing AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then
+ ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString
+ ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
+ ObjPos.Direccion = ObjGPS.DtResultados.Rows("0")("Direccion").ToString
+ End If
- ObjPos.Lat = ObjGPS.DtResultados.Rows("0")("Lat").ToString
- ObjPos.Lng = ObjGPS.DtResultados.Rows("0")("Lng").ToString
- ObjPos.Direccion = ObjGPS.DtResultados.Rows("0")("Direccion").ToString
Catch ex As Exception
ObjPos.CurrentError = "No se pudo obtener la posición."
OnError("Ocurrió un error al asignar las direcciones", ex)
diff --git a/vwd.webinfo b/vwd.webinfo
index 6b76e11e1..71c73829a 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -48,6 +48,12 @@
+
+
+
+
+
+