Documetos parametros, Alamacenes, RepEstado resultados(General)
This commit is contained in:
@@ -611,12 +611,29 @@ Partial Class RH_Personal
|
||||
Set(value As Boolean)
|
||||
ViewState("ValMadre") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DocumentoParametros As String
|
||||
Get
|
||||
If ViewState("DocumentoParametros") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return ViewState("DocumentoParametros").ToString
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("DocumentoParametros") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Private Shared Function sendURL(ByVal URL As String, Optional Methodo As String = "POST", Optional Cookie As String = "", Optional maxTimeMilliseconds As Integer = 120000) As String
|
||||
Dim resultado As String = ""
|
||||
|
||||
@@ -3782,10 +3799,36 @@ Partial Class RH_Personal
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero
|
||||
Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato")
|
||||
|
||||
DescarFormato(DocumentacionFormato)
|
||||
|
||||
Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato")
|
||||
|
||||
|
||||
Dim ObjEdoc As New ClsEdocumentacion
|
||||
|
||||
If ObjEdoc.GetDocumentacionParametros(-1, CveDocumentacion, UsuarioActual.CveEmpresa) Then
|
||||
If ObjEdoc.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
GvParametros.DataSource = ObjEdoc.DtResultados
|
||||
ObjEdoc.Dispose()
|
||||
|
||||
GvParametros.DataBind()
|
||||
UpGvParametros.Update()
|
||||
|
||||
DocumentoParametros = DocumentacionFormato
|
||||
RegistraScript("$('#DVDescargaDocumentoParametrosModal').modal('show')")
|
||||
|
||||
Else
|
||||
ObjEdoc.Dispose()
|
||||
DescarFormato(DocumentacionFormato)
|
||||
End If
|
||||
Else
|
||||
ObjEdoc.Dispose()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Public Sub DescarFormato(documento As String)
|
||||
|
||||
@@ -6216,5 +6259,48 @@ Partial Class RH_Personal
|
||||
TxtSalarioDiarioIntegrado.Text = TxtSDI.Text
|
||||
RegistraScript("$('#Dmodamodificarsalario').modal()")
|
||||
UpModSalario.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
Protected Sub LnkDescargaFormatoParametros_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ListaTagsDocumentost = New List(Of TagsDocumentos)
|
||||
|
||||
For Each GvRow As GridViewRow In GvParametros.Rows
|
||||
|
||||
If GvRow.FCTextBox("TxtParametro").Text.Trim.Length > 0 Then
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos(GvRow.DataKey("Parametro"), GvRow.FCTextBox("TxtParametro").Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
|
||||
Dim PathSource As String
|
||||
Dim pathDesti As String
|
||||
|
||||
PathSource = UsuarioActual.Empresa.Ruta & "Formatos\" & DocumentoParametros
|
||||
pathDesti = PathRoot & "Temp\" & CvePersonal & DocumentoParametros
|
||||
|
||||
If File.Exists(pathDesti) Then
|
||||
File.Delete(pathDesti)
|
||||
End If
|
||||
|
||||
File.Copy(PathSource, pathDesti)
|
||||
|
||||
Dim objDoc As New clsGemBoxDocument(pathDesti)
|
||||
objDoc.SustituirTags(ListaTagsDocumentost)
|
||||
objDoc.Guardar(pathDesti)
|
||||
|
||||
Dim fileinfo As New FileInfo(pathDesti)
|
||||
|
||||
Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority)
|
||||
baseUrl = baseUrl & "/temp/" & fileinfo.Name
|
||||
|
||||
RegistraScript("$('#DVDescargaDocumentoParametrosModal').modal('hide')", "500")
|
||||
RegistraDescargaJavaScript(baseUrl)
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user