faltaba un metodo en clsInventarios y en clientes se agrego un modal para el pagaré
This commit is contained in:
@@ -478,9 +478,19 @@ 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)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("linkDescargaPagare") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Documentacion"
|
||||
Private Property DTDocumentacion As DataTable
|
||||
Get
|
||||
@@ -6887,11 +6897,16 @@ Partial Class Clientes
|
||||
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"
|
||||
linkDescargaPagare = AppDomain.CurrentDomain.BaseDirectory & 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(linkDescarga)
|
||||
Dim objGemBoxDocument As New clsGemBoxDocument(linkDescargaPagare)
|
||||
Dim Tags As New List(Of TagsDocumentos)
|
||||
Dim ObjClientes As New ClsClientes
|
||||
|
||||
@@ -6920,22 +6935,32 @@ Partial Class Clientes
|
||||
Tags.Add(New TagsDocumentos("{Direccion}", direccion))
|
||||
Tags.Add(New TagsDocumentos("{Ciudad}", ciudad))
|
||||
Tags.Add(New TagsDocumentos("{Telefono}", Telefono))
|
||||
Tags.Add(New TagsDocumentos("{RazonSocialAval}", UsuarioActual.Empresa.NombreCorto))
|
||||
Tags.Add(New TagsDocumentos("{DireccionAval}", UsuarioActual.Empresa.Direccion))
|
||||
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)
|
||||
memoryStream.WriteTo(Response.OutputStream)
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDocumentosFirma_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentosCliente.RowDataBound
|
||||
|
||||
Reference in New Issue
Block a user