126 lines
5 KiB
C#
126 lines
5 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: AyABL.TRA.ObservacionesBL
|
|
// 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 AyADAL;
|
|
using AyAEL.TRA;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Specialized;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
|
|
namespace AyABL.TRA
|
|
{
|
|
public class ObservacionesBL : AyABL
|
|
{
|
|
private static NameValueCollection appSettings = ConfigurationManager.AppSettings;
|
|
|
|
public ObservacionesBL()
|
|
{
|
|
this.objobservacionesEL = new ObservacionesEL();
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.agenda.ToString();
|
|
this.NombreConeccionBD = BASESDEDATOS.SIGDD.ToString();
|
|
}
|
|
|
|
public ObservacionesEL objobservacionesEL { get; set; }
|
|
|
|
public int insertarObservaciones()
|
|
{
|
|
try
|
|
{
|
|
this.CamposTabla = t_dis_agenda.OBSERVACIONES.ToString() + Tablas.agenda.ToString() + "," + t_dis_agenda.FECHACREA.ToString() + Tablas.agenda.ToString() + "," + t_dis_agenda.USUARIOCREA.ToString() + Tablas.agenda.ToString() + "," + Constraints.FK.ToString() + Tablas.solicitud.ToString() + "," + t_dis_agenda.ASTATE.ToString() + Tablas.agenda.ToString();
|
|
this.ValoresCampos = new object[5]
|
|
{
|
|
(object) this.objobservacionesEL.OBSERVACIONES,
|
|
(object) this.objobservacionesEL.Fecha,
|
|
(object) this.objobservacionesEL.USUARIO,
|
|
(object) this.objobservacionesEL.FKSOLICITUD,
|
|
(object) this.objobservacionesEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarObservacion()
|
|
{
|
|
try
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(this.objobservacionesEL.PK, Tablas.agenda, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_agenda.OBSERVACIONES.ToString() + Tablas.agenda.ToString() + "," + t_dis_agenda.FECHACREA.ToString() + Tablas.agenda.ToString() + "," + t_dis_agenda.USUARIOCREA.ToString() + Tablas.agenda.ToString() + "," + Constraints.FK.ToString() + Tablas.solicitud.ToString() + "," + t_dis_agenda.ASTATE.ToString() + Tablas.agenda.ToString();
|
|
this.ValoresCampos = new object[5]
|
|
{
|
|
(object) this.objobservacionesEL.OBSERVACIONES,
|
|
(object) this.objobservacionesEL.Fecha,
|
|
(object) this.objobservacionesEL.USUARIO,
|
|
(object) this.objobservacionesEL.FKSOLICITUD,
|
|
(object) this.objobservacionesEL.ASTATE
|
|
};
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public DataSet dsListarObservaciones(ArrayList arlCondicionesFiltroBusqueda)
|
|
{
|
|
try
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
int? pk = this.objobservacionesEL.PK;
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objobservacionesEL.PK.HasValue)
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(this.objobservacionesEL.PK, Tablas.agenda, operadorLogico.AND));
|
|
if (this.objobservacionesEL.FKSOLICITUD != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorNUMSOLICITUD(this.objobservacionesEL.FKSOLICITUD, operadorLogico.AND));
|
|
this.NombreTabla = Vistas.v_agenda.ToString();
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, p_arlCondiciones, (string) null, (string) null);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public DataSet listarobservaciones(
|
|
ArrayList arlCondicionesFiltroBusqueda,
|
|
bool buscarPorASTATE,
|
|
string p_strPrefijoDependencia)
|
|
{
|
|
try
|
|
{
|
|
ArrayList arrayList = new ArrayList();
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
int? pk = this.objobservacionesEL.PK;
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0)
|
|
arrayList.Add((object) this.buscarPorPK(this.objobservacionesEL.PK, Tablas.agenda, operadorLogico.AND));
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, "ORDER BY PKOBSERVACIONES DESC");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
private CondicionDAL buscarPorNUMSOLICITUD(
|
|
int p_nNUMSOLICITUD,
|
|
operadorLogico operador)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = t_dis_agenda.FKSOLICITUD.ToString(),
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
operadorLogico = operador,
|
|
valorDerecho = (object) p_nNUMSOLICITUD
|
|
};
|
|
}
|
|
}
|
|
}
|