139 lines
6.4 KiB
C#
139 lines
6.4 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: AyABL.Tran.notificacionBL
|
|
// Assembly: AyABL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 0F2FF6EC-B53C-44DB-9E00-2F932BF80762
|
|
// Assembly location: C:\Users\EQUIPO\Downloads\Raiz\Raiz\bin\AyABL.dll
|
|
|
|
using AyAEL.Tran;
|
|
using System;
|
|
using System.Collections.Specialized;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using System.Data.Common;
|
|
|
|
namespace AyABL.Tran
|
|
{
|
|
public class notificacionBL : AyABL
|
|
{
|
|
private static NameValueCollection appSettings = ConfigurationManager.AppSettings;
|
|
|
|
public notificacionBL()
|
|
{
|
|
this.objnotificacionEL = new notificacionEL();
|
|
this.NombreConeccionBD = BASESDEDATOS.NOTIFICACIONES.ToString();
|
|
}
|
|
|
|
public notificacionEL objnotificacionEL { get; set; }
|
|
|
|
public int insertarNotificacion(notificacionEL p_objNotificacion)
|
|
{
|
|
try
|
|
{
|
|
int num = 0;
|
|
DbParameter[] p_dbpParametros = new DbParameter[17];
|
|
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.SqlClient");
|
|
for (int index = 0; index < p_dbpParametros.Length; ++index)
|
|
p_dbpParametros[index] = factory.CreateParameter();
|
|
p_dbpParametros[0].ParameterName = "@ID_DOCUMENTO";
|
|
p_dbpParametros[0].Value = (object) p_objNotificacion.ID_DOCUMENTO;
|
|
p_dbpParametros[0].Size = 100;
|
|
p_dbpParametros[0].DbType = DbType.String;
|
|
p_dbpParametros[1].ParameterName = "@FK_DEPARTAMENTO";
|
|
p_dbpParametros[1].Value = (object) p_objNotificacion.FK_DEPARTAMENTO;
|
|
p_dbpParametros[1].Size = 20;
|
|
p_dbpParametros[1].DbType = DbType.String;
|
|
p_dbpParametros[2].ParameterName = "@FK_TIPO_DOCUMENTO";
|
|
p_dbpParametros[2].Value = (object) p_objNotificacion.FK_TIPO_DOCUMENTO;
|
|
p_dbpParametros[2].Size = 10;
|
|
p_dbpParametros[2].DbType = DbType.String;
|
|
p_dbpParametros[3].ParameterName = "@HECHO_POR_USUARIO";
|
|
p_dbpParametros[3].Value = (object) p_objNotificacion.HECHO_POR_USUARIO;
|
|
p_dbpParametros[3].Size = 20;
|
|
p_dbpParametros[3].DbType = DbType.String;
|
|
p_dbpParametros[4].ParameterName = "@HECHO_POR_NOMBRE";
|
|
p_dbpParametros[4].Value = (object) p_objNotificacion.HECHO_POR_NOMBRE;
|
|
p_dbpParametros[4].Size = 100;
|
|
p_dbpParametros[4].DbType = DbType.String;
|
|
p_dbpParametros[5].ParameterName = "@HECHO_POR_CORREO";
|
|
p_dbpParametros[5].Value = (object) p_objNotificacion.HECHO_POR_CORREO;
|
|
p_dbpParametros[5].Size = 50;
|
|
p_dbpParametros[5].DbType = DbType.String;
|
|
p_dbpParametros[6].ParameterName = "@PARA_USUARIO";
|
|
p_dbpParametros[6].Value = (object) p_objNotificacion.PARA_USUARIO;
|
|
p_dbpParametros[6].Size = 20;
|
|
p_dbpParametros[6].DbType = DbType.String;
|
|
p_dbpParametros[7].ParameterName = "@PARA_NOMBRE";
|
|
p_dbpParametros[7].Value = (object) p_objNotificacion.PARA_NOMBRE;
|
|
p_dbpParametros[7].Size = 100;
|
|
p_dbpParametros[7].DbType = DbType.String;
|
|
p_dbpParametros[8].ParameterName = "@PARA_CORREO";
|
|
p_dbpParametros[8].Value = (object) p_objNotificacion.PARA_CORREO;
|
|
p_dbpParametros[8].Size = 50;
|
|
p_dbpParametros[8].DbType = DbType.String;
|
|
p_dbpParametros[9].ParameterName = "@ASUNTO";
|
|
p_dbpParametros[9].Value = (object) p_objNotificacion.ASUNTO;
|
|
p_dbpParametros[9].Size = 200;
|
|
p_dbpParametros[9].DbType = DbType.String;
|
|
p_dbpParametros[10].ParameterName = "@CUERPO";
|
|
p_dbpParametros[10].Value = (object) p_objNotificacion.CUERPO;
|
|
p_dbpParametros[10].DbType = DbType.String;
|
|
p_dbpParametros[11].ParameterName = "@ESTADO";
|
|
p_dbpParametros[11].Value = (object) p_objNotificacion.ESTADO;
|
|
p_dbpParametros[11].DbType = DbType.Int32;
|
|
p_dbpParametros[12].ParameterName = "@FECHA_VENCE";
|
|
p_dbpParametros[12].Value = (object) p_objNotificacion.FECHA_VENCE;
|
|
p_dbpParametros[12].DbType = DbType.DateTime;
|
|
p_dbpParametros[13].ParameterName = "@TIPO_PERIOCIDAD";
|
|
p_dbpParametros[13].Value = (object) p_objNotificacion.TIPO_PERIOCIDAD;
|
|
p_dbpParametros[13].Size = 2;
|
|
p_dbpParametros[13].DbType = DbType.String;
|
|
p_dbpParametros[14].ParameterName = "@VALOR_PERIOCIDAD";
|
|
p_dbpParametros[14].Value = (object) p_objNotificacion.VALOR_PERIOCIDAD;
|
|
p_dbpParametros[14].DbType = DbType.Int32;
|
|
p_dbpParametros[15].ParameterName = "@status";
|
|
p_dbpParametros[15].DbType = DbType.String;
|
|
p_dbpParametros[15].Size = 2;
|
|
p_dbpParametros[15].Direction = ParameterDirection.InputOutput;
|
|
p_dbpParametros[16].ParameterName = "@message";
|
|
p_dbpParametros[16].DbType = DbType.String;
|
|
p_dbpParametros[16].Size = 500;
|
|
p_dbpParametros[16].Direction = ParameterDirection.InputOutput;
|
|
//int.Parse(this.baseDAL.dsProcedimientoAlmacenado("PA_INSERTARNOTIFICACION_RESOLUCION", p_dbpParametros, this.NombreConeccionBD).Tables[0].Rows[0][0].ToString());
|
|
return num;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int cancelarNotificacion(notificacionEL p_objNotificacion)
|
|
{
|
|
try
|
|
{
|
|
DbParameter[] p_dbpParametros = new DbParameter[3];
|
|
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.SqlClient");
|
|
for (int index = 0; index < p_dbpParametros.Length; ++index)
|
|
p_dbpParametros[index] = factory.CreateParameter();
|
|
p_dbpParametros[0].ParameterName = "@ID_DOCUMENTO";
|
|
p_dbpParametros[0].Value = (object) p_objNotificacion.ID_DOCUMENTO;
|
|
p_dbpParametros[0].Size = 100;
|
|
p_dbpParametros[0].DbType = DbType.String;
|
|
p_dbpParametros[1].ParameterName = "@p_status";
|
|
p_dbpParametros[1].DbType = DbType.String;
|
|
p_dbpParametros[1].Size = 2;
|
|
p_dbpParametros[1].Direction = ParameterDirection.InputOutput;
|
|
p_dbpParametros[2].ParameterName = "@p_message";
|
|
p_dbpParametros[2].DbType = DbType.String;
|
|
p_dbpParametros[2].Size = 500;
|
|
p_dbpParametros[2].Direction = ParameterDirection.InputOutput;
|
|
this.baseDAL.dsProcedimientoAlmacenado("PA_CANCELANOTIFICACIONRESOLUCION", p_dbpParametros, this.NombreConeccionBD);
|
|
return 1;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
}
|
|
}
|