terminando circulares detalle
This commit is contained in:
@@ -1546,7 +1546,11 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<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>
|
<Style>
|
||||||
<FontWeight>Bold</FontWeight>
|
<FontWeight>Bold</FontWeight>
|
||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<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>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|||||||
@@ -223,10 +223,16 @@ Partial Class OI_CircularDetalle
|
|||||||
Protected Sub LnkMandarCorreo_Click() Handles LnkMandarCorreo.Click
|
Protected Sub LnkMandarCorreo_Click() Handles LnkMandarCorreo.Click
|
||||||
Dim correos() As String
|
Dim correos() As String
|
||||||
correos = TxtCorreo.Value.Split(Environment.NewLine)
|
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
|
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)
|
Dim a As String = String.Format("{0} -- {1} --- {2}", Asunto, Para, ArrayCC)
|
||||||
a.GuardaLog()
|
a.GuardaLog()
|
||||||
@@ -237,7 +243,7 @@ Partial Class OI_CircularDetalle
|
|||||||
|
|
||||||
With itemMail
|
With itemMail
|
||||||
itemMail.ArchivoBinario = ArchivoBinario
|
itemMail.ArchivoBinario = ArchivoBinario
|
||||||
itemMail.NombreArchivo = "Invitación.pdf"
|
itemMail.NombreArchivo = NombreArchivo
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -247,4 +253,19 @@ Partial Class OI_CircularDetalle
|
|||||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, body, ArrayCC, LSRutasMail)
|
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, body, ArrayCC, LSRutasMail)
|
||||||
Mail = Nothing
|
Mail = Nothing
|
||||||
End Sub
|
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
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user