176 lines
7.5 KiB
C#
176 lines
7.5 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: AyABL.TRA.ObservacionesActividadesBL
|
|
// 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 ObservacionesActividadesBL : AyABL
|
|
{
|
|
private static NameValueCollection appSettings = ConfigurationManager.AppSettings;
|
|
|
|
public ObservacionesActividadesBL()
|
|
{
|
|
this.objobservacionesEL = new ObservacionesActividadesEL();
|
|
this.NombreTabla = Modulos.t_sgm_.ToString() + Tablas.observacionactividad.ToString();
|
|
this.NombreConeccionBD = BASESDEDATOS.SIGDD.ToString();
|
|
}
|
|
|
|
public ObservacionesActividadesEL objobservacionesEL { get; set; }
|
|
|
|
public int insertarObservacionActividad()
|
|
{
|
|
try
|
|
{
|
|
this.CamposTabla = t_dis_observacionactividad.DESCRIPCION.ToString() + Tablas.observacionactividad.ToString() + "," + t_dis_observacionactividad.TIPO.ToString() + Tablas.observacionactividad.ToString() + "," + Constraints.FK.ToString() + Tablas.usuarioxdependencia.ToString() + "," + Constraints.FK.ToString() + Tablas.responsableactividad.ToString() + "," + Concepto.FECHA.ToString() + Tablas.observacionactividad.ToString() + "," + Auditoria.ASTATE.ToString() + Tablas.observacionactividad.ToString();
|
|
this.ValoresCampos = new object[6]
|
|
{
|
|
(object) this.objobservacionesEL.DESCRIPCION,
|
|
(object) this.objobservacionesEL.TIPO,
|
|
(object) this.objobservacionesEL.FKUSUARIOXDEPENDENCIA,
|
|
(object) this.objobservacionesEL.PKRESPONSABLEACTIVIDAD,
|
|
(object) this.objobservacionesEL.Fecha,
|
|
(object) true
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarObservacionActividad()
|
|
{
|
|
try
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(this.objobservacionesEL.PK, Tablas.observacionactividad, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_observacionactividad.DESCRIPCION.ToString() + Tablas.observacionactividad.ToString() + "," + Constraints.FK.ToString() + Tablas.usuarioxdependencia.ToString() + "," + Constraints.FK.ToString() + Tablas.responsableactividad.ToString() + "," + Concepto.FECHA.ToString() + Tablas.observacionactividad.ToString() + "," + Auditoria.ASTATE.ToString() + Tablas.observacionactividad.ToString();
|
|
this.ValoresCampos = new object[5]
|
|
{
|
|
(object) this.objobservacionesEL.DESCRIPCION,
|
|
(object) this.objobservacionesEL.FKUSUARIOXDEPENDENCIA,
|
|
(object) this.objobservacionesEL.PKRESPONSABLEACTIVIDAD,
|
|
(object) this.objobservacionesEL.Fecha,
|
|
(object) true
|
|
};
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public DataSet dsListarObservacionesActividades(ArrayList arlCondicionesFiltroBusqueda)
|
|
{
|
|
try
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
if (this.objobservacionesEL.PKSOLICITUD != 0)
|
|
{
|
|
int pksolicitud = this.objobservacionesEL.PKSOLICITUD;
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objobservacionesEL.PKSOLICITUD), Tablas.solicitud, operadorLogico.AND));
|
|
}
|
|
if (this.objobservacionesEL.PKPROGRAMACIONSOLICITUD != 0)
|
|
{
|
|
int pkprogramacionsolicitud = this.objobservacionesEL.PKPROGRAMACIONSOLICITUD;
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objobservacionesEL.PKPROGRAMACIONSOLICITUD), Tablas.programacionsolicitud, operadorLogico.AND));
|
|
}
|
|
if (this.objobservacionesEL.PKRESPONSABLEACTIVIDAD != 0)
|
|
{
|
|
int pkresponsableactividad = this.objobservacionesEL.PKRESPONSABLEACTIVIDAD;
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objobservacionesEL.PKRESPONSABLEACTIVIDAD), Tablas.responsableactividad, operadorLogico.AND));
|
|
}
|
|
if (this.objobservacionesEL.PKACTIVIDAD != 0)
|
|
{
|
|
int pkactividad = this.objobservacionesEL.PKACTIVIDAD;
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objobservacionesEL.PKACTIVIDAD), Tablas.actividad, operadorLogico.AND));
|
|
}
|
|
if (this.objobservacionesEL.ORDEN != 0)
|
|
{
|
|
int orden = this.objobservacionesEL.ORDEN;
|
|
p_arlCondiciones.Add((object) this.buscarPorOrdenActividad(this.objobservacionesEL.ORDEN, operadorLogico.AND));
|
|
}
|
|
if (this.objobservacionesEL.TIPO != 0)
|
|
{
|
|
int tipo = this.objobservacionesEL.TIPO;
|
|
p_arlCondiciones.Add((object) this.buscarPorTipoObservacionActividad(this.objobservacionesEL.TIPO, operadorLogico.NONE));
|
|
}
|
|
this.NombreTabla = Vistas.v_obtenerobservacionactividad.ToString();
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, p_arlCondiciones, (string) null, "ORDER BY FECHAOBSERVACIONACTIVIDAD DESC");
|
|
}
|
|
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.observacionactividad, 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
|
|
};
|
|
}
|
|
|
|
private CondicionDAL buscarPorOrdenActividad(int p_nOrden, operadorLogico operador)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = t_adm_actividad.ORDEN.ToString() + Tablas.actividad.ToString(),
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
operadorLogico = operador,
|
|
valorDerecho = (object) p_nOrden
|
|
};
|
|
}
|
|
|
|
private CondicionDAL buscarPorTipoObservacionActividad(
|
|
int p_nTipo,
|
|
operadorLogico operador)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = t_dis_observacionactividad.TIPO.ToString() + Tablas.observacionactividad.ToString(),
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
operadorLogico = operador,
|
|
valorDerecho = (object) p_nTipo
|
|
};
|
|
}
|
|
}
|
|
}
|