Tareas varias
This commit is contained in:
@@ -380,7 +380,6 @@
|
||||
<asp:Literal ID="LtlDescrip" runat="server" Text='<%# Eval("Descripcion", "<div>{0}</div>")%>'></asp:Literal>
|
||||
<span style='display: none'><%# Eval("RazonSocial")%></span>
|
||||
</ItemTemplate>
|
||||
|
||||
<HeaderTemplate>
|
||||
<div>
|
||||
<asp:LinkButton ID="LbMoneda_RazonSocial" runat="server" CausesValidation="false" Text="Proveedor" OnClick="LbOrden_Click" CommandArgument="Moneda,RazonSocial"></asp:LinkButton> <asp:ImageButton ID="ImgMoneda_RazonSocial" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,RazonSocial" />/<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_SerieFolio" runat="server" CausesValidation="false" Text="Factura" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,SerieFolio"></asp:LinkButton> <asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_SerieFolio" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,SerieFolio" />
|
||||
|
||||
@@ -3,10 +3,10 @@ Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Bancos_RepProgramarRecursos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "P R O P I E D A D E S"
|
||||
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatos"), DataTable)
|
||||
@@ -80,9 +80,9 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
Set(value As String)
|
||||
ViewState("UsuarioProgramo") = value
|
||||
End Set
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
DdlUsuarioProgramo.Visible = False
|
||||
@@ -501,7 +501,6 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
Protected Sub BtnProgramar_Click(sender As Object, e As EventArgs) Handles BtnProgramar.Click
|
||||
Dim CveUsuario As Integer = UsuarioActual.CveUsuario
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(138) = "1" Then
|
||||
'Validación del SAT - DF 21/01/17
|
||||
Dim Validada As Boolean = False
|
||||
@@ -596,18 +595,18 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
MsgError &= "No se pudo programar la factura </br>"
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
TxtCodigoP.Text = ""
|
||||
Next
|
||||
Comp.Dispose()
|
||||
|
||||
TxtCodigoP.Text = ""
|
||||
|
||||
If MsgError <> "" Then
|
||||
Alert(MsgError, TipoMensaje.MsgError)
|
||||
Else
|
||||
Alert("La programación se guardó correctamente", TipoMensaje.MsgInformacion)
|
||||
Alert("La programación se guardó correctamente", TipoMensaje.MsgInformacion)
|
||||
EnviaCorreoNotificacion()
|
||||
End If
|
||||
|
||||
|
||||
Comp.Dispose()
|
||||
CargaDatos()
|
||||
|
||||
'Recarga DdlUsuarioProgramo
|
||||
@@ -623,6 +622,105 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
End If
|
||||
ObjUsuarios.Dispose()
|
||||
End Sub
|
||||
Private Sub EnviaCorreoNotificacion()
|
||||
If UsuarioActual.CveEmpresa = 13 Then
|
||||
|
||||
Dim strBody As New StringBuilder
|
||||
Try
|
||||
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||
strBody.Append("<head> ")
|
||||
strBody.Append(" <style type=""text/css""> ")
|
||||
strBody.Append(" body ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" margin:0px; ")
|
||||
strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||
strBody.Append(" font-size: 10px; ")
|
||||
strBody.Append(" background-color:#F0F0F0; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" a.Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" font-size:11px; ")
|
||||
strBody.Append(" background-color:#F7F6F3; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .TextoAlterno ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .BarraIdentidad ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" color:#FFFFFF; ")
|
||||
strBody.Append(" background:#F0F0F0; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" font-size:19px; ")
|
||||
strBody.Append(" font-style:oblique; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Titulos ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color: Gray;")
|
||||
strBody.Append(" color:White; ")
|
||||
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Verde {color: #00CC00;} ")
|
||||
strBody.Append(" .Negro {color: #000000;} ")
|
||||
strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||
strBody.Append(" </style> ")
|
||||
strBody.Append("</head> ")
|
||||
strBody.Append("<body> ")
|
||||
'Cargo el detalle
|
||||
strBody.Append(" <div style='width: 550px'> ")
|
||||
strBody.Append(" <fieldset> ")
|
||||
strBody.Append(" <legend>Compras Programadas</legend> ")
|
||||
strBody.Append(" <table width=""550px""><tr style='background-color:gray;color:White;font-family:Verdana;font-size:10px;text-align:center;vertical-align:middle;font-weight:bold;height:20px;text-decoration:none;'>")
|
||||
strBody.Append(" <th scope='col' style='width: 100px'>Serie-Folio</th> <th scope='col' style='width: 100px'>Fecha</th><th scope='col' style='width: 120px'>Importe</th><th scope='col' style='width: 100px'>Importe Programado</th></tr>")
|
||||
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
Dim SerieFolio = gvr.DataKey("SerieFolio")
|
||||
Dim Importe = gvr.DataKey("Original").ToDouble.FormatoNumero()
|
||||
Dim ImporteProgramo = gvr.FCTextBox("TxtS").Text.ToDouble.FormatoNumero()
|
||||
|
||||
strBody.Append($"<tr class='Texto'><td>{SerieFolio}</td><td>{DateTime.Now}</td><td style='text-align: right;'><span >{Importe}</span></td><td style='text-align: right;'>{ImporteProgramo}</td></tr>")
|
||||
End If
|
||||
Next
|
||||
|
||||
strBody.Append(" </table> ")
|
||||
strBody.Append(" </fieldset> ")
|
||||
strBody.Append(" </div> ")
|
||||
strBody.Append("</body></html>")
|
||||
|
||||
Try
|
||||
|
||||
Dim Correo As String = "" '"rpenunuriv@hotmail.com"
|
||||
'Rafael Peñuñuri
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetUsuarios(293) Then
|
||||
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
||||
Correo = ObjUsuarios.DtResultados.Rows(0)("Correo").ToString()
|
||||
End If
|
||||
End If
|
||||
ObjUsuarios.Dispose()
|
||||
|
||||
Dim Asunto As String = "SIG - Se programaron las siguientes facturas"
|
||||
Dim Mail As New ClsSisMail()
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Correo, Asunto, strBody.ToString())
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar MAIL por cambio de Estatus", ex)
|
||||
End Try
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrio un error al general el correo.", ex)
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
@@ -795,8 +893,8 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
End If
|
||||
ObjMovimientos.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "C R E D I T O S - V E N C I M I E N T O"
|
||||
Private Sub CargaCreditosVencimiento()
|
||||
Dim ObjCreditos As New ClsBancos
|
||||
@@ -826,9 +924,9 @@ Partial Class Bancos_RepProgramarRecursos
|
||||
End If
|
||||
GvV.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user