Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -3807,7 +3807,9 @@
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>
|
||||
<%--<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal>--%>
|
||||
<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" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
@@ -6884,6 +6884,42 @@ 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")
|
||||
'Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto
|
||||
Dim linkDescarga As String = "C:\inetpub\wwwSIGGIT\Empresas\140\DocElectronica\Clientes\271110\Pagaré.docx"
|
||||
|
||||
Dim memoryStreamDoc As New System.IO.MemoryStream
|
||||
Dim objGemBoxDocument As New clsGemBoxDocument(linkDescarga)
|
||||
Dim Tags As New List(Of TagsDocumentos)
|
||||
|
||||
Tags.Add(New TagsDocumentos("{Monto}", "xyz"))
|
||||
Tags.Add(New TagsDocumentos("{Fecha}", Date.Today.ToString))
|
||||
Tags.Add(New TagsDocumentos("{FechaConFormato}", "23 de marzo del 2020"))
|
||||
Tags.Add(New TagsDocumentos("{CantidadLetra}", "69420"))
|
||||
Tags.Add(New TagsDocumentos("{RazonSocial}", "mengano y perengano"))
|
||||
Tags.Add(New TagsDocumentos("{Direccion}", "merida 1270"))
|
||||
Tags.Add(New TagsDocumentos("{Ciudad}", "Hermosillo"))
|
||||
Tags.Add(New TagsDocumentos("{Telefono}", "2209839"))
|
||||
Tags.Add(New TagsDocumentos("{RazonSocialAval}", "blablabla"))
|
||||
Tags.Add(New TagsDocumentos("{DireccionAval}", "asdfqwer"))
|
||||
Tags.Add(New TagsDocumentos("{CiudadAval}", "Hermosillo"))
|
||||
Tags.Add(New TagsDocumentos("{TelefonoAval}", "6621432648"))
|
||||
|
||||
'objGemBoxDocument.AgregarImagen(RutaLogo, 61.0, 53.0)
|
||||
objGemBoxDocument.SustituirTags(Tags)
|
||||
objGemBoxDocument.GuardarStream()
|
||||
Dim memoryStream As New System.IO.MemoryStream(objGemBoxDocument.GetBytesDocumento())
|
||||
objGemBoxDocument.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
|
||||
|
||||
|
||||
@@ -6891,7 +6927,8 @@ Partial Class Clientes
|
||||
|
||||
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString
|
||||
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 ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
|
||||
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
|
||||
Dim requerido As Boolean = If(e.Row.DBCampo("Requerido").ToUpper = "TRUE", True, False)
|
||||
@@ -6941,10 +6978,11 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
If documentacionFormato = "" Then
|
||||
ImgDownLoadFormato.Visible = False
|
||||
'ImgDownLoadFormato.Visible = False
|
||||
LnkDownLoadDoc.Visible = False
|
||||
Else
|
||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & CveDocumentacion & "" & documentacionFormato
|
||||
ImgDownLoadFormato.Visible = True
|
||||
LnkDownLoadDoc.Visible = True
|
||||
End If
|
||||
|
||||
txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
@@ -6956,17 +6994,18 @@ Partial Class Clientes
|
||||
|
||||
If File.Exists(linkDescargaArchivo) Then
|
||||
|
||||
ImgDownLoad.Visible = True
|
||||
If extencion.Length > 0 Then
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveCliente & Documentacion & "." & extencion)
|
||||
Else
|
||||
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveCliente & Documentacion)
|
||||
End If
|
||||
LnkDownLoadDoc.Visible = True
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDownLoadDoc)
|
||||
'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)
|
||||
'Else
|
||||
' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CveCliente & Documentacion)
|
||||
'End If
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
LnkDownLoadDoc.Visible = False
|
||||
End If
|
||||
Else
|
||||
ImgDownLoad.Visible = False
|
||||
LnkDownLoadDoc.Visible = False
|
||||
End If
|
||||
|
||||
If requerido Then
|
||||
@@ -6975,7 +7014,7 @@ Partial Class Clientes
|
||||
' ImgRequired.Text = " <a class='btn btn-circle btn-sm grey-salt' href='#' data-toggle='tooltip' title='No obligatorio' ><i class='fa fa-asterisk '></i></a>"
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(248) And e.Row.DBCampo("Estatus").ToString.ToEntero = 1 And ImgDownLoad.Visible Then
|
||||
If UsuarioActual.TienePermisoProceso(248) And e.Row.DBCampo("Estatus").ToString.ToEntero = 1 And LnkDownLoadDoc.Visible Then
|
||||
e.Row.FCLinkButton("LnkGvDocumentosEliminar").Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -22728,6 +22728,11 @@ Partial Class Ventas
|
||||
Dim EnvioCiudad As String = ""
|
||||
Dim EnvioTel As String = ""
|
||||
Dim Guia As String = ""
|
||||
Dim EnvioNoExt As String = ""
|
||||
Dim EnvioNoInt As String = ""
|
||||
Dim EnvioEstado As String = ""
|
||||
Dim Pais As String = ""
|
||||
Dim CP As String = ""
|
||||
If ObjInventario.GetPaqueteriaGuia(-1, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
|
||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
Guia = ObjInventario.DtResultados.Rows(0)("Guia").ToString
|
||||
@@ -22737,13 +22742,55 @@ Partial Class Ventas
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
SerieFolio = ObjVentas.DtResultados.Rows(0)("SerieFolio").ToString
|
||||
PedidoContrato = ObjVentas.DtResultados.Rows(0)("PedidoContrato").ToString
|
||||
EnvioContacto = ObjVentas.DtResultados.Rows(0)("EnvioContacto").ToString
|
||||
EnvioDireccion = $"{ObjVentas.DtResultados.Rows(0)("EnvioDireccion").ToString}, NO. EXT: {ObjVentas.DtResultados.Rows(0)("EnvioNoExt").ToString}, COLONIA: {ObjVentas.DtResultados.Rows(0)("EnvioColonia").ToString}, CP: {ObjVentas.DtResultados.Rows(0)("EnvioCP").ToString}"
|
||||
EnviarOficina = ObjVentas.DtResultados.Rows(0)("EnvioDepartamento").ToString
|
||||
EnviarCalle = ObjVentas.DtResultados.Rows(0)("EnvioDireccion").ToString
|
||||
EnviarColonia = ObjVentas.DtResultados.Rows(0)("EnvioColonia").ToString
|
||||
EnvioCiudad = ObjVentas.DtResultados.Rows(0)("EnvioCiudad").ToString
|
||||
EnvioTel = ObjVentas.DtResultados.Rows(0)("EnvioTel").ToString
|
||||
|
||||
If ObjVentas.DtResultados.Rows(0)("CveDireccionEnvio").ToString.ToEntero > 0 Then
|
||||
EnvioContacto = ObjVentas.DtResultados.Rows(0)("EnvioContacto").ToString
|
||||
EnvioDireccion = $"{ObjVentas.DtResultados.Rows(0)("EnvioDireccion").ToString}, COLONIA: {ObjVentas.DtResultados.Rows(0)("EnvioColonia").ToString}, CP: {ObjVentas.DtResultados.Rows(0)("EnvioCP").ToString}"
|
||||
EnviarOficina = ObjVentas.DtResultados.Rows(0)("EnvioDepartamento").ToString
|
||||
EnviarCalle = ObjVentas.DtResultados.Rows(0)("EnvioDireccion").ToString
|
||||
EnviarColonia = ObjVentas.DtResultados.Rows(0)("EnvioColonia").ToString
|
||||
EnvioCiudad = ObjVentas.DtResultados.Rows(0)("EnvioCiudad").ToString
|
||||
EnvioTel = ObjVentas.DtResultados.Rows(0)("EnvioTel").ToString
|
||||
EnvioNoExt = ObjVentas.DtResultados.Rows(0)("EnvioNoExt").ToString
|
||||
EnvioNoInt = ObjVentas.DtResultados.Rows(0)("EnvioNoInt").ToString
|
||||
EnvioEstado = ObjVentas.DtResultados.Rows(0)("EnvioEstado").ToString
|
||||
Pais = ObjVentas.DtResultados.Rows(0)("SucClientePais").ToString
|
||||
CP = ObjVentas.DtResultados.Rows(0)("EnvioCP").ToString
|
||||
'CP = "Envio"
|
||||
Else
|
||||
If ObjVentas.DtResultados.Rows(0)("CveClienteSucursal").ToString.ToEntero > 0 Then
|
||||
'EnvioContacto = ObjVentas.DtResultados.Rows(0)("EnvioContacto").ToString
|
||||
EnvioDireccion = $"{ObjVentas.DtResultados.Rows(0)("SucClienteDireccion").ToString}, COLONIA: {ObjVentas.DtResultados.Rows(0)("SucClienteColonia").ToString}, CP: {ObjVentas.DtResultados.Rows(0)("SucClienteCP").ToString}"
|
||||
'EnviarOficina = ObjVentas.DtResultados.Rows(0)("EnvioDepartamento").ToString
|
||||
EnviarCalle = ObjVentas.DtResultados.Rows(0)("SucClienteDireccion").ToString
|
||||
EnviarColonia = ObjVentas.DtResultados.Rows(0)("SucClienteColonia").ToString
|
||||
EnvioCiudad = ObjVentas.DtResultados.Rows(0)("SucClienteCiudad").ToString
|
||||
EnvioTel = ObjVentas.DtResultados.Rows(0)("EnvioTel").ToString
|
||||
EnvioNoExt = ObjVentas.DtResultados.Rows(0)("SucClienteNoExt").ToString
|
||||
EnvioNoInt = ObjVentas.DtResultados.Rows(0)("SucClienteNoInt").ToString
|
||||
EnvioEstado = ObjVentas.DtResultados.Rows(0)("SucClienteEstado").ToString
|
||||
Pais = ObjVentas.DtResultados.Rows(0)("SucClientePais").ToString
|
||||
'CP = ObjVentas.DtResultados.Rows(0)("SucClienteCP").ToString
|
||||
CP = "Sucursal"
|
||||
Else
|
||||
'EnvioContacto = ObjVentas.DtResultados.Rows(0)("EnvioContacto").ToString
|
||||
EnvioDireccion = $"{ObjVentas.DtResultados.Rows(0)("ClienteDireccion").ToString}, COLONIA: {ObjVentas.DtResultados.Rows(0)("ColoniaCliente").ToString}, CP: {ObjVentas.DtResultados.Rows(0)("CPCliente").ToString}"
|
||||
'EnviarOficina = ObjVentas.DtResultados.Rows(0)("EnvioDepartamento").ToString
|
||||
EnviarCalle = ObjVentas.DtResultados.Rows(0)("ClienteDireccion").ToString
|
||||
EnviarColonia = ObjVentas.DtResultados.Rows(0)("ColoniaCliente").ToString
|
||||
EnvioCiudad = ObjVentas.DtResultados.Rows(0)("ClienteCiudad").ToString
|
||||
EnvioTel = ObjVentas.DtResultados.Rows(0)("EnvioTel").ToString
|
||||
EnvioNoExt = ObjVentas.DtResultados.Rows(0)("ClienteNoExt").ToString
|
||||
EnvioNoInt = ObjVentas.DtResultados.Rows(0)("ClienteNoInt").ToString
|
||||
EnvioEstado = ObjVentas.DtResultados.Rows(0)("ClienteEstado").ToString
|
||||
Pais = ObjVentas.DtResultados.Rows(0)("ClientePais").ToString
|
||||
'CP = ObjVentas.DtResultados.Rows(0)("CPCliente").ToString
|
||||
CP = "Cliente"
|
||||
End If
|
||||
EnvioContacto = ""
|
||||
EnviarOficina = ""
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Dim Dt As DataTable = Nothing
|
||||
@@ -22767,7 +22814,12 @@ Partial Class Ventas
|
||||
params.Add(New ReportParameter("EnviarColonia", EnviarColonia))
|
||||
params.Add(New ReportParameter("EnvioCiudad", EnvioCiudad))
|
||||
params.Add(New ReportParameter("EnvioTel", EnvioTel))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Telcel.rdlc", Dt, params, String.Format("Formato RADIO MOVIL DIPSA S.A DE C.V. -{0}", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("NoExt", EnvioNoExt))
|
||||
params.Add(New ReportParameter("NoInt", EnvioNoInt))
|
||||
params.Add(New ReportParameter("EnvioEstado", EnvioEstado))
|
||||
params.Add(New ReportParameter("Pais", Pais))
|
||||
params.Add(New ReportParameter("CP", CP))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Telcel.rdlc", Dt, params, String.Format("Formato RADIO MOVIL DIPSA S.A DE C.V. -{0}", Now.ToDateTime.ToShortDateString), "PDF")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Reference in New Issue
Block a user