terminando circulares detalle
This commit is contained in:
@@ -1546,7 +1546,11 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>FACTURA</Value>
|
||||
<Value>=Switch(
|
||||
Parameters!TipoDocumento.Value = "Ing","FACTURA",
|
||||
Parameters!TipoDocumento.Value = "Egs","NOTA DE CREDITO",
|
||||
Parameters!TipoDocumento.Value = "Ant","ANTICIPO"
|
||||
)</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>White</Color>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkMandarCorreo" runat="server" Text="<i class='fa fa-plus'></i> Agregar Documento"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkMandarCorreo" runat="server" Text="<i class='fa fa-envelope'></i> mandar correo"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -223,10 +223,16 @@ Partial Class OI_CircularDetalle
|
||||
Protected Sub LnkMandarCorreo_Click() Handles LnkMandarCorreo.Click
|
||||
Dim correos() As String
|
||||
correos = TxtCorreo.Value.Split(Environment.NewLine)
|
||||
'MandaCorreo()
|
||||
Dim ArchivoBytes As Byte() = ArchivoBytesArrya(HkArchivo.Text)
|
||||
|
||||
Dim Contador As Integer = 0
|
||||
For Each Correo As String In correos
|
||||
MandaCorreo(TxtAsunto.Text, Correo, If(Contador > 0, "", TxtCorreoAdicional.Value), TxtCircular.Value, ArchivoBytes, HkArchivo.Text)
|
||||
Contador += 1
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub MandaCorreo(Asunto As String, Para As String, ArrayCC As String, body As String, ArchivoBinario As Byte())
|
||||
Private Sub MandaCorreo(Asunto As String, Para As String, ArrayCC As String, body As String, ArchivoBinario As Byte(), NombreArchivo As String)
|
||||
|
||||
Dim a As String = String.Format("{0} -- {1} --- {2}", Asunto, Para, ArrayCC)
|
||||
a.GuardaLog()
|
||||
@@ -237,7 +243,7 @@ Partial Class OI_CircularDetalle
|
||||
|
||||
With itemMail
|
||||
itemMail.ArchivoBinario = ArchivoBinario
|
||||
itemMail.NombreArchivo = "Invitación.pdf"
|
||||
itemMail.NombreArchivo = NombreArchivo
|
||||
|
||||
End With
|
||||
|
||||
@@ -247,4 +253,19 @@ Partial Class OI_CircularDetalle
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, body, ArrayCC, LSRutasMail)
|
||||
Mail = Nothing
|
||||
End Sub
|
||||
|
||||
Private Function ArchivoBytesArrya(ArchivoNombre As String) As Byte()
|
||||
Dim ArchivoEnviar As String = String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, ArchivoNombre)
|
||||
If File.Exists(ArchivoEnviar) Then
|
||||
Dim fs As System.IO.FileStream = System.IO.File.Open(ArchivoEnviar, IO.FileMode.Open, IO.FileAccess.Read)
|
||||
Dim buff(fs.Length) As Byte
|
||||
If fs.Length > 0 Then
|
||||
fs.Read(buff, 0, fs.Length - 1)
|
||||
fs.Close()
|
||||
End If
|
||||
Return buff
|
||||
End If
|
||||
|
||||
Return New Byte() {}
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user