Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -61,6 +61,8 @@
|
|||||||
<td>CLABE:</td>
|
<td>CLABE:</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtCLABE" runat="server" MaxLength="18" Width="200px"></asp:TextBox></td>
|
<asp:TextBox ID="TxtCLABE" runat="server" MaxLength="18" Width="200px"></asp:TextBox></td>
|
||||||
|
<asp:RegularExpressionValidator runat="server" id="REVTxtCLABE" controltovalidate="TxtCLABE" validationexpression="^\s*(?:[0-9]{18})\s*$" errormessage="La CLABE debe de tener una longitud de 18 caracteres" ValidationGroup="GrpGuardar" />
|
||||||
|
<ajax:ValidatorCalloutExtender ID="CVETxtCLABE" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtCLABE" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -384,30 +384,34 @@ Partial Class Vta_CatDocumentosClientes
|
|||||||
If ActualizarDocumentacion Then
|
If ActualizarDocumentacion Then
|
||||||
|
|
||||||
_formato = GuardarArchivo(CveDocumentacion)
|
_formato = GuardarArchivo(CveDocumentacion)
|
||||||
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, UsuarioActual.Empresa.CveEmpresa, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0)) Then
|
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
|
||||||
Alert("Documento Actualizado correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Documento Actualizado correctamente.", TipoMensaje.MsgInformacion)
|
||||||
CargaDocumentacion()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.Empresa.CveEmpresa) Then
|
If objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
CveDocumentacion = objRH.DtResultados(0)(0).ToString.ToEntero
|
CveDocumentacion = objRH.DtResultados(0)(0).ToString.ToEntero
|
||||||
_formato = GuardarArchivo(CveDocumentacion)
|
_formato = GuardarArchivo(CveDocumentacion)
|
||||||
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.Empresa.CveEmpresa) Then
|
If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion"))
|
||||||
Alert("Documento agregado correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Documento agregado correctamente.", TipoMensaje.MsgInformacion)
|
||||||
CargaDocumentacion()
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
objRH.Dispose()
|
||||||
|
|
||||||
ActualizarDocumentacion = False
|
ActualizarDocumentacion = False
|
||||||
|
|
||||||
|
CargaDocumentacion()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -171,6 +171,13 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 250px;
|
height: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.orange{
|
||||||
|
color:orange;
|
||||||
|
background-color:orange;
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||||
@@ -3940,7 +3947,7 @@
|
|||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="50px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="ImgDownLoadFormato" CssClass="btn btn-circle btn-sm orange" OnClick="DownLoadFormato_ClickDocumentacion" runat="server"
|
<asp:LinkButton ID="ImgDownLoadFormato" CssClass="btn btn-circle btn-sm orange" OnClick="DownLoadFormato_ClickDocumentacion" runat="server"
|
||||||
Text="<i class='fa fa-download' style='color:white' title='Descargar formato'></i>" CausesValidation="False" />
|
Text="<i class='fa fa-download' style='color:white' title='Descargar formato'></i>" CausesValidation="False" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -3954,9 +3961,8 @@
|
|||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<%--<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>--%>
|
|
||||||
<asp:LinkButton ID="LnkDownLoadDoc" CssClass="btn btn-circle btn-sm blue" OnClick="DownLoad_ClickDocumentacion" runat="server"
|
<asp:LinkButton ID="LnkDownLoadDoc" CssClass="btn btn-circle btn-sm blue" OnClick="DownLoad_ClickDocumentacion" runat="server"
|
||||||
Text="<i class='fa fa-download' style='color:white' title='Descargar formato'></i>" CausesValidation="False" />
|
Text="<i class='fa fa-download' style='color:white' title='Descargar Documento'></i>" CausesValidation="False" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|||||||
@@ -6827,9 +6827,11 @@ Partial Class Clientes
|
|||||||
'UpGvDocumentosFirma2.Update()
|
'UpGvDocumentosFirma2.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub UploadModal_ClickDocumentacionFirmaContrato(sender As Object, e As EventArgs)
|
Public Sub UploadModal_ClickDocumentacionFirmaContrato(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
Dim chkEstatus As CheckBox
|
Dim chkEstatus As CheckBox
|
||||||
|
|
||||||
CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero()
|
CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero()
|
||||||
CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
|
CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
|
||||||
Documentacion = GvRow.DataKey("Documentacion")
|
Documentacion = GvRow.DataKey("Documentacion")
|
||||||
@@ -6849,7 +6851,29 @@ Partial Class Clientes
|
|||||||
UpTituloFirma.Update()
|
UpTituloFirma.Update()
|
||||||
|
|
||||||
RegistraScript("$('#ModalUploadFirmaContratoDocumento').modal({ backdrop: 'static', keyboard: false});")
|
RegistraScript("$('#ModalUploadFirmaContratoDocumento').modal({ backdrop: 'static', keyboard: false});")
|
||||||
|
|
||||||
|
GvdocumentosEventosDescarga()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub GvdocumentosEventosDescarga()
|
||||||
|
|
||||||
|
For Each GvRow As GridViewRow In GvDocumentosCliente.Rows
|
||||||
|
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
Dim LnkDownLoadDoc As LinkButton = GvRow.FCLinkButton("LnkDownLoadDoc")
|
||||||
|
Dim ImgDownLoadFormato As LinkButton = GvRow.FCLinkButton("ImgDownLoadFormato")
|
||||||
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato)
|
||||||
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDownLoadDoc)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub GuardarDocumentosClientes(Optional _CveDocumentacionExcluir As Integer = -1)
|
Private Sub GuardarDocumentosClientes(Optional _CveDocumentacionExcluir As Integer = -1)
|
||||||
|
|
||||||
Dim hasError As Boolean = True
|
Dim hasError As Boolean = True
|
||||||
@@ -7073,16 +7097,36 @@ Partial Class Clientes
|
|||||||
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
||||||
|
|
||||||
Dim stringDescargaDocumento As String = ""
|
Dim stringDescargaDocumento As String = ""
|
||||||
|
|
||||||
If GvRow.DataKey("Documentacion") = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140 Then
|
If GvRow.DataKey("Documentacion") = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||||
|
|
||||||
stringDescargaDocumento = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\Formatos\Pagaré.docx", UsuarioActual.CveEmpresa)
|
stringDescargaDocumento = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\Formatos\Pagaré.docx", UsuarioActual.CveEmpresa)
|
||||||
|
TxtDireccionAval.Text = ""
|
||||||
|
TxtAval.Text = ""
|
||||||
|
RegistraScript("$('#ModalDivPagare').modal('show')")
|
||||||
|
|
||||||
Else
|
Else
|
||||||
stringDescargaDocumento = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\DocElectronica\Clientes\{1}\{2}", UsuarioActual.CveEmpresa, CveCliente, Adjunto)
|
stringDescargaDocumento = ModExtensiones.DirectorioBaseEmpresas & String.Format("Empresas\{0}\DocElectronica\Clientes\{1}\{2}", UsuarioActual.CveEmpresa, CveCliente, Adjunto)
|
||||||
End If
|
|
||||||
linkDescargaPagare = stringDescargaDocumento
|
|
||||||
|
|
||||||
TxtDireccionAval.Text = ""
|
linkDescargaPagare = stringDescargaDocumento
|
||||||
TxtAval.Text = ""
|
|
||||||
RegistraScript("$('#ModalDivPagare').modal('show')")
|
Dim File = New FileInfo(linkDescargaPagare)
|
||||||
|
|
||||||
|
If File.Exists Then
|
||||||
|
|
||||||
|
Response.Clear()
|
||||||
|
Response.AddHeader("Content-Disposition", "attachment; filename=" + File.Name)
|
||||||
|
Response.AddHeader("Content-Length", File.Length.ToString())
|
||||||
|
Response.ContentType = "text/octet-stream"
|
||||||
|
Response.Flush()
|
||||||
|
Response.TransmitFile(File.FullName)
|
||||||
|
Response.End()
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -7153,7 +7197,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString()
|
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString()
|
||||||
Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
|
Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
|
||||||
'Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
|
||||||
Dim LnkDownLoadDoc As LinkButton = e.Row.FCLinkButton("LnkDownLoadDoc")
|
Dim LnkDownLoadDoc As LinkButton = e.Row.FCLinkButton("LnkDownLoadDoc")
|
||||||
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
|
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
|
||||||
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
|
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
|
||||||
@@ -7204,11 +7248,13 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If documentacionFormato = "" Then
|
If documentacionFormato = "" Then
|
||||||
'ImgDownLoadFormato.Visible = False
|
ImgDownLoadFormato.Visible = False
|
||||||
LnkDownLoadDoc.Visible = False
|
LnkDownLoadDoc.Visible = False
|
||||||
Else
|
Else
|
||||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & CveDocumentacion & "" & documentacionFormato
|
|
||||||
LnkDownLoadDoc.Visible = True
|
LnkDownLoadDoc.Visible = True
|
||||||
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato)
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString().ToDate().ToString("dd/MM/yyyy")
|
txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString().ToDate().ToString("dd/MM/yyyy")
|
||||||
@@ -7221,6 +7267,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
LnkDownLoadDoc.Visible = True
|
LnkDownLoadDoc.Visible = True
|
||||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDownLoadDoc)
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDownLoadDoc)
|
||||||
|
|
||||||
'If extencion.Length > 0 Then
|
'If extencion.Length > 0 Then
|
||||||
' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveCliente & Documentacion & "." & extencion)
|
' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveCliente & Documentacion & "." & extencion)
|
||||||
'Else
|
'Else
|
||||||
@@ -7261,6 +7308,7 @@ Partial Class Clientes
|
|||||||
Dim PathRoot As String = Server.MapPath("/")
|
Dim PathRoot As String = Server.MapPath("/")
|
||||||
Dim PathSource As String
|
Dim PathSource As String
|
||||||
Dim pathDesti As String
|
Dim pathDesti As String
|
||||||
|
Dim fname As String = ""
|
||||||
|
|
||||||
PathSource = UsuarioActual.Empresa.Ruta & "Formatos\" & documento
|
PathSource = UsuarioActual.Empresa.Ruta & "Formatos\" & documento
|
||||||
pathDesti = PathRoot & "Temp\" & CveCliente & documento
|
pathDesti = PathRoot & "Temp\" & CveCliente & documento
|
||||||
@@ -7271,24 +7319,44 @@ Partial Class Clientes
|
|||||||
|
|
||||||
File.Copy(PathSource, pathDesti)
|
File.Copy(PathSource, pathDesti)
|
||||||
|
|
||||||
Dim objDoc As New clsGemBoxDocument(pathDesti)
|
|
||||||
Dim objRH As New ClsRH
|
|
||||||
Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString()
|
|
||||||
|
|
||||||
|
|
||||||
objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(-1, UsuarioActual.CveEmpresa)) ' Pendiente
|
|
||||||
objRH.Dispose()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
objDoc.Guardar(pathDesti)
|
|
||||||
|
|
||||||
Dim fileinfo As New FileInfo(pathDesti)
|
Dim fileinfo As New FileInfo(pathDesti)
|
||||||
|
fname = fileinfo.Name
|
||||||
|
|
||||||
Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority)
|
If fileinfo.Extension.ToUpper = ".XLS" Or fileinfo.Extension.ToUpper = ".XLSX" Then
|
||||||
baseUrl = baseUrl & "/temp/" & fileinfo.Name
|
|
||||||
|
|
||||||
RegistraDescargaJavaScript(baseUrl)
|
|
||||||
|
Try
|
||||||
|
Dim objDoc As New clsGemBoxDocument(pathDesti)
|
||||||
|
Dim objRH As New ClsRH
|
||||||
|
Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString()
|
||||||
|
|
||||||
|
|
||||||
|
objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(-1, UsuarioActual.CveEmpresa)) ' Pendiente
|
||||||
|
objRH.Dispose()
|
||||||
|
|
||||||
|
objDoc.Guardar(pathDesti)
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim FileD = New FileInfo(pathDesti)
|
||||||
|
|
||||||
|
If FileD.Exists Then
|
||||||
|
|
||||||
|
Response.Clear()
|
||||||
|
Response.AddHeader("Content-Disposition", "attachment; filename=" + FileD.Name)
|
||||||
|
Response.AddHeader("Content-Length", FileD.Length.ToString())
|
||||||
|
Response.ContentType = "text/octet-stream"
|
||||||
|
Response.Flush()
|
||||||
|
Response.TransmitFile(FileD.FullName)
|
||||||
|
Response.End()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user