Commit inicial Ventas Productivo
This commit is contained in:
98
Sistemas/NotificacionesEnLinea.aspx.cs
Normal file
98
Sistemas/NotificacionesEnLinea.aspx.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
|
||||
public partial class Sistemas_NotificacionesEnLinea : System.Web.UI.Page
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
private int CveEmpresa
|
||||
{
|
||||
get
|
||||
{
|
||||
return Convert.ToInt32(ViewState["CveEmpresa"].ToString());
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveEmpresa"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int CveTipoNotificacion
|
||||
{
|
||||
get
|
||||
{
|
||||
return Convert.ToInt32(ViewState["CveTipoNotificacion"].ToString());
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveTipoNotificacion"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private DataTable DTNotificaciones
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTNotificaciones"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DTNotificaciones"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
InicializaParametros();
|
||||
CargaDTNotificaciones();
|
||||
EnviaNotificaciones();
|
||||
}
|
||||
|
||||
#region "INICIALIZA PARAMETROS"
|
||||
protected void InicializaParametros()
|
||||
{
|
||||
CveTipoNotificacion = 1;
|
||||
CveEmpresa = 72;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region "ENVIA NOTIFICACIONES"
|
||||
protected void CargaDTNotificaciones()
|
||||
{
|
||||
ClsContratos ObjContrato = new ClsContratos();
|
||||
|
||||
if (ObjContrato.GetNotificacionesEnLinea(CveEmpresa, CveTipoNotificacion))
|
||||
{
|
||||
DTNotificaciones = ObjContrato.DtResultados;
|
||||
}
|
||||
ObjContrato.Dispose();
|
||||
}
|
||||
protected void EnviaNotificaciones()
|
||||
{
|
||||
ClsSisMail ObjMail = new ClsSisMail();
|
||||
|
||||
String Para = "";
|
||||
String Asunto = "";
|
||||
String Cuerpo = "";
|
||||
|
||||
foreach (DataRow notificacion in DTNotificaciones.Rows)
|
||||
{
|
||||
Para = notificacion["Correos"].ToString();
|
||||
Asunto = notificacion["Asunto"].ToString();
|
||||
Cuerpo = notificacion["Cuerpo"].ToString();
|
||||
|
||||
ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user