2021-01-22 15:05:35 +00:00
|
|
|
|
// Decompiled with JetBrains decompiler
|
|
|
|
|
|
// Type: AyABL.Tran.solicitudBL
|
|
|
|
|
|
// 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 AyAEL.Tran;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using System.Collections.Specialized;
|
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
|
using System.Data;
|
|
|
|
|
|
using System.Data.Common;
|
|
|
|
|
|
|
|
|
|
|
|
namespace AyABL.Tran
|
|
|
|
|
|
{
|
|
|
|
|
|
public class solicitudBL : AyABL
|
|
|
|
|
|
{
|
|
|
|
|
|
private static NameValueCollection appSettings = ConfigurationManager.AppSettings;
|
|
|
|
|
|
|
|
|
|
|
|
public solicitudBL()
|
|
|
|
|
|
{
|
|
|
|
|
|
this.objSolicitudEL = new solicitudEL();
|
|
|
|
|
|
this.objresponsableActividadEL = new responsableActividadEL();
|
|
|
|
|
|
this.objprogramacionSolicitudEL = new programacionsolicitudEL();
|
|
|
|
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.solicitud.ToString();
|
|
|
|
|
|
this.NombreConeccionBD = BASESDEDATOS.SIGDD.ToString();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public solicitudEL objSolicitudEL { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public responsableActividadEL objresponsableActividadEL { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public programacionsolicitudEL objprogramacionSolicitudEL { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public int insertarSolicitud()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.solicitud.ToString();
|
|
|
|
|
|
this.CamposTabla = t_dis_solicitud.FKTIPOINSPECCION.ToString() + ", " + t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.NUMEROSOLICITUD.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.FKTIPODISPONIBILIDAD.ToString() + ", " + t_dis_solicitud.TIENESERVICIO.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.NUMERONIS.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.CANTIDADEDIFICACIONES.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.FKUSOEDIFICACION.ToString() + ", " + t_dis_solicitud.DESCRIPCIONUSOEDIFICACION.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.CEDULASOLICITANTE.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.NOMBRESOLICITANTE.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.APELLIDO1SOLICITANTE.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.APELLIDO2SOLICITANTE.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.FKTITULARINMUEBLE.ToString() + ", " + t_dis_solicitud.FKPROVINCIA.ToString() + ", " + t_dis_solicitud.FKCANTON.ToString() + ", " + t_dis_solicitud.FKDISTRITO.ToString() + " ," + t_dis_solicitud.DIRECCIONEXACTAPROPIEDAD.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.FKSOLICITUDOTROSPROYECTO.ToString() + " ," + t_dis_solicitud.NUMEROTELEFONO1.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.NUMEROTELEFONO2.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.FAX.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.CORREOELECTRONICO.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.CORREOELECTRONICO2.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.FKSOLICITUDOTROSENTE.ToString() + " ," + t_dis_solicitud.FKDEPENDENCIASIGDD.ToString() + " ," + t_dis_solicitud.SOLICITAMUNICIPALIDAD.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.SOLICITAMINISTERIOSALUD.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.SOLICITACFIA.ToString() + Tablas.solicitud.ToString() + " ," + Auditoria.ASTATE.ToString() + Tablas.solicitud.ToString() + " ";
|
|
|
|
|
|
this.ValoresCampos = new object[30]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) this.objSolicitudEL.FKTIPOINSPECCION,
|
|
|
|
|
|
(object) this.objSolicitudEL.FECHAINSERTA,
|
|
|
|
|
|
(object) this.objSolicitudEL.NUMEROSOLICITUD,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKTIPODISPONIBILIDAD,
|
|
|
|
|
|
(object) this.objSolicitudEL.TIENESERVICIOSOLICITUD,
|
|
|
|
|
|
(object) this.objSolicitudEL.NUMERONIS,
|
|
|
|
|
|
(object) this.objSolicitudEL.CANTIDADEDIFICACIONES,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKUSOEDIFICACION,
|
|
|
|
|
|
(object) this.objSolicitudEL.DESCRIPCIONUSOEDIFICACION,
|
|
|
|
|
|
(object) this.objSolicitudEL.CEDULASOLICITANTE,
|
|
|
|
|
|
(object) this.objSolicitudEL.NOMBRESOLICITANTE,
|
|
|
|
|
|
(object) this.objSolicitudEL.APELLIDO1SOLICITANTE,
|
|
|
|
|
|
(object) this.objSolicitudEL.APELLIDO2SOLICITANTE,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKTITULARINMUEBLE,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKPROVINCIA,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKCANTON,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKDISTRITO,
|
|
|
|
|
|
(object) this.objSolicitudEL.DIRECCIONEXACTAPROPIEDAD,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKSOLICITUDOTROSPROYECTO,
|
|
|
|
|
|
(object) this.objSolicitudEL.NUMEROTELEFONO1,
|
|
|
|
|
|
(object) this.objSolicitudEL.NUMEROTELEFONO2,
|
|
|
|
|
|
(object) this.objSolicitudEL.FAX,
|
|
|
|
|
|
(object) this.objSolicitudEL.CORREOELECTRONICO,
|
|
|
|
|
|
(object) this.objSolicitudEL.CORREOELECTRONICO2,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKSOLICITUDOTROSENTE,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKDEPENDENCIA,
|
|
|
|
|
|
(object) this.objSolicitudEL.SOLICITAMUNICIPALIDAD,
|
|
|
|
|
|
(object) this.objSolicitudEL.SOLICITAMINISTERIOSALUD,
|
|
|
|
|
|
(object) this.objSolicitudEL.SOLICITACFIA,
|
|
|
|
|
|
(object) this.objSolicitudEL.ASTATE
|
|
|
|
|
|
};
|
|
|
|
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int insertarHistorialXmlSolicitud(historialxmlEL objHistorialEL)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.historialxml.ToString();
|
|
|
|
|
|
this.CamposTabla = t_dis_historialxml.REGISTRO.ToString() + Tablas.historialxml.ToString() + ", " + t_dis_historialxml.FKSOLICITUD.ToString() + ", " + t_dis_historialxml.FECHAINSERTA.ToString() + Tablas.historialxml.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.historialxml.ToString() + " ";
|
|
|
|
|
|
this.ValoresCampos = new object[4]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) objHistorialEL.REGISTRO,
|
|
|
|
|
|
(object) objHistorialEL.FKSOLICITUD,
|
|
|
|
|
|
(object) objHistorialEL.FECHAINSERTA,
|
|
|
|
|
|
(object) true
|
|
|
|
|
|
};
|
|
|
|
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int insertarHistorialSolicitud(historialSolicitudEL objHistorialSolicitudEL)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.historialxml.ToString();
|
|
|
|
|
|
this.CamposTabla = t_dis_historialsolicitud.ACCION.ToString() + Tablas.historialsolicitud.ToString() + ", " + t_dis_historialsolicitud.FECHA.ToString() + Tablas.historialsolicitud.ToString() + ", " + t_dis_historialsolicitud.FKSOLICITUD.ToString() + ", " + t_dis_historialsolicitud.FKUSUARIOXDEPENDENCIA.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.historialxml.ToString() + " ";
|
|
|
|
|
|
this.ValoresCampos = new object[5]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) objHistorialSolicitudEL.ACCION,
|
|
|
|
|
|
(object) objHistorialSolicitudEL.Fecha,
|
|
|
|
|
|
(object) objHistorialSolicitudEL.FKSOLICITUD,
|
|
|
|
|
|
(object) objHistorialSolicitudEL.FKUSUARIOXDEPENDENCIA,
|
|
|
|
|
|
(object) true
|
|
|
|
|
|
};
|
|
|
|
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int modificarSolicitud()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.solicitud.ToString();
|
|
|
|
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.NUMEROSOLICITUD != "" && this.objSolicitudEL.NUMEROSOLICITUD != null)
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorNumSolicitud(this.objSolicitudEL.NUMEROSOLICITUD, operadorLogico.NONE));
|
|
|
|
|
|
this.CamposTabla = t_dis_solicitud.FKTIPOINSPECCION.ToString() + ", " + t_dis_solicitud.FECHAMODIFICA.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.FKTIPODISPONIBILIDAD.ToString() + ", " + t_dis_solicitud.TIENESERVICIO.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.NUMERONIS.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.CANTIDADEDIFICACIONES.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.FKUSOEDIFICACION.ToString() + ", " + t_dis_solicitud.DESCRIPCIONUSOEDIFICACION.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.CEDULASOLICITANTE.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.NOMBRESOLICITANTE.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.APELLIDO1SOLICITANTE.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.APELLIDO2SOLICITANTE.ToString() + Tablas.solicitud.ToString() + ", " + t_dis_solicitud.FKTITULARINMUEBLE.ToString() + ", " + t_dis_solicitud.FKPROVINCIA.ToString() + ", " + t_dis_solicitud.FKCANTON.ToString() + ", " + t_dis_solicitud.FKDISTRITO.ToString() + " ," + t_dis_solicitud.DIRECCIONEXACTAPROPIEDAD.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.FKSOLICITUDOTROSPROYECTO.ToString() + " ," + t_dis_solicitud.NUMEROTELEFONO1.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.NUMEROTELEFONO2.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.FAX.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.CORREOELECTRONICO.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.CORREOELECTRONICO2.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.FKSOLICITUDOTROSENTE.ToString() + " ," + t_dis_solicitud.FKDEPENDENCIASIGDD.ToString() + " ," + t_dis_solicitud.SOLICITAMUNICIPALIDAD.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.SOLICITAMINISTERIOSALUD.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.SOLICITACFIA.ToString() + Tablas.solicitud.ToString() + " ," + t_dis_solicitud.SOLICITAOTROENTE.ToString() + Tablas.solicitud.ToString() + " ," + Auditoria.ASTATE.ToString() + Tablas.solicitud.ToString() + " ";
|
|
|
|
|
|
this.ValoresCampos = new object[30]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) this.objSolicitudEL.FKTIPOINSPECCION,
|
|
|
|
|
|
(object) this.objSolicitudEL.FECHAMODIFICA,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKTIPODISPONIBILIDAD,
|
|
|
|
|
|
(object) this.objSolicitudEL.TIENESERVICIOSOLICITUD,
|
|
|
|
|
|
(object) this.objSolicitudEL.NUMERONIS,
|
|
|
|
|
|
(object) this.objSolicitudEL.CANTIDADEDIFICACIONES,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKUSOEDIFICACION,
|
|
|
|
|
|
(object) this.objSolicitudEL.DESCRIPCIONUSOEDIFICACION,
|
|
|
|
|
|
(object) this.objSolicitudEL.CEDULASOLICITANTE,
|
|
|
|
|
|
(object) this.objSolicitudEL.NOMBRESOLICITANTE,
|
|
|
|
|
|
(object) this.objSolicitudEL.APELLIDO1SOLICITANTE,
|
|
|
|
|
|
(object) this.objSolicitudEL.APELLIDO2SOLICITANTE,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKTITULARINMUEBLE,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKPROVINCIA,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKCANTON,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKDISTRITO,
|
|
|
|
|
|
(object) this.objSolicitudEL.DIRECCIONEXACTAPROPIEDAD,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKSOLICITUDOTROSPROYECTO,
|
|
|
|
|
|
(object) this.objSolicitudEL.NUMEROTELEFONO1,
|
|
|
|
|
|
(object) this.objSolicitudEL.NUMEROTELEFONO2,
|
|
|
|
|
|
(object) this.objSolicitudEL.FAX,
|
|
|
|
|
|
(object) this.objSolicitudEL.CORREOELECTRONICO,
|
|
|
|
|
|
(object) this.objSolicitudEL.CORREOELECTRONICO2,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKSOLICITUDOTROSENTE,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKDEPENDENCIA,
|
|
|
|
|
|
(object) this.objSolicitudEL.SOLICITAMUNICIPALIDAD,
|
|
|
|
|
|
(object) this.objSolicitudEL.SOLICITAMINISTERIOSALUD,
|
|
|
|
|
|
(object) this.objSolicitudEL.SOLICITACFIA,
|
|
|
|
|
|
(object) this.objSolicitudEL.SOLICITAOTROENTE,
|
|
|
|
|
|
(object) this.objSolicitudEL.ASTATE
|
|
|
|
|
|
};
|
|
|
|
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int modificarTipoDisponibilidad()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.solicitud.ToString();
|
|
|
|
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.NUMEROSOLICITUD != "" && this.objSolicitudEL.NUMEROSOLICITUD != null)
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorNumSolicitud(this.objSolicitudEL.NUMEROSOLICITUD, operadorLogico.NONE));
|
|
|
|
|
|
this.CamposTabla = t_dis_solicitud.FKTIPODISPONIBILIDAD.ToString() + ", " + t_dis_solicitud.FECHAMODIFICA.ToString() + Tablas.solicitud.ToString();
|
|
|
|
|
|
this.ValoresCampos = new object[2]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) this.objSolicitudEL.FKTIPODISPONIBILIDAD,
|
|
|
|
|
|
(object) DateTime.Now
|
|
|
|
|
|
};
|
|
|
|
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void eliminarSolicitudTemporal()
|
|
|
|
|
|
{
|
|
|
|
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.solicitud.ToString();
|
|
|
|
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.NUMEROSOLICITUD != "" && this.objSolicitudEL.NUMEROSOLICITUD != null)
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorNumSolicitud(this.objSolicitudEL.NUMEROSOLICITUD, operadorLogico.NONE));
|
|
|
|
|
|
this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, p_arlCondiciones);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int darDeAlBaja()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.NONE));
|
|
|
|
|
|
this.CamposTabla = Auditoria.ASTATE.ToString() + Tablas.solicitud.ToString();
|
|
|
|
|
|
this.ValoresCampos = new object[1]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) this.objSolicitudEL.ASTATE
|
|
|
|
|
|
};
|
|
|
|
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int trasladarExpediente()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.NONE));
|
|
|
|
|
|
this.CamposTabla = t_dis_solicitud.FKDEPENDENCIASIGDD.ToString() + " ," + t_dis_solicitud.FKPROVINCIA.ToString() + ", " + t_dis_solicitud.FKCANTON.ToString() + ", " + t_dis_solicitud.FKDISTRITO.ToString();
|
|
|
|
|
|
this.ValoresCampos = new object[4]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) this.objSolicitudEL.FKDEPENDENCIA,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKPROVINCIA,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKCANTON,
|
|
|
|
|
|
(object) this.objSolicitudEL.FKDISTRITO
|
|
|
|
|
|
};
|
|
|
|
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet listarSolicituds(
|
|
|
|
|
|
ArrayList arlCondicionesFiltroBusqueda,
|
|
|
|
|
|
bool buscarPorASTATE,
|
|
|
|
|
|
string p_strPrefijoDependencia)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPK(this.objSolicitudEL.PK, Tablas.solicitud, operadorLogico.AND));
|
|
|
|
|
|
if (buscarPorASTATE)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorEstado(this.objSolicitudEL.ASTATE, Tablas.solicitud, operadorLogico.NONE));
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, "ORDER BY PKSolicitud DESC");
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaSolicitud(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Vistas.v_obtenerSolicitud.ToString();
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objSolicitudEL.PK.HasValue)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKREGION != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKRegion(new int?(this.objSolicitudEL.FKREGION), operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKDependencia(new int?(this.objSolicitudEL.FKDEPENDENCIA), operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.NUMEROSOLICITUD != "" && this.objSolicitudEL.NUMEROSOLICITUD != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorNumSolicitud(this.objSolicitudEL.NUMEROSOLICITUD, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.NUMEROTERRENO != "" && this.objSolicitudEL.NUMEROTERRENO != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPlanoCatastro(this.objSolicitudEL.NUMEROTERRENO, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.NUMEROFOLIO != "" && this.objSolicitudEL.NUMEROFOLIO != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFolioReal(this.objSolicitudEL.NUMEROFOLIO, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.Nombre != "" && this.objSolicitudEL.Nombre != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorNombre(this.objSolicitudEL.Nombre, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorNombrePropietario(this.objSolicitudEL.Nombre, operadorLogico.NONE));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.NUMCEDULAPROP != "" && this.objSolicitudEL.NUMCEDULAPROP != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorCedulaProp(this.objSolicitudEL.NUMCEDULAPROP, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorCedulaSolic(this.objSolicitudEL.CEDULASOLICITANTE, operadorLogico.NONE));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.NUMERONIS != "" && this.objSolicitudEL.NUMERONIS != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorNis(this.objSolicitudEL.NUMERONIS, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.TELEFONO != "" && this.objSolicitudEL.TELEFONO != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorTelefono(this.objSolicitudEL.TELEFONO, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorTelefono2(this.objSolicitudEL.TELEFONO, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFax(this.objSolicitudEL.FAX, operadorLogico.NONE));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.PROVINCIA != "" && this.objSolicitudEL.PROVINCIA != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorProvincia(this.objSolicitudEL.PROVINCIA, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorCanton(this.objSolicitudEL.CANTON, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorDistrito(this.objSolicitudEL.DISTRITO, operadorLogico.NONE));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.AÑO != 0 && this.objSolicitudEL.MES == 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorAnno(this.objSolicitudEL.AÑO.ToString(), operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.AÑO != 0 && this.objSolicitudEL.MES != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorMes(this.objSolicitudEL.MES.ToString(), operadorLogico.AND));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorAnno(this.objSolicitudEL.AÑO.ToString(), operadorLogico.NONE));
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.ASTATE)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorEstado(this.objSolicitudEL.ASTATE, Tablas.solicitud, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.LISTADODEPENDENCIAS != string.Empty && this.objSolicitudEL.LISTADODEPENDENCIAS != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorListadoDependencia(this.objSolicitudEL.LISTADODEPENDENCIAS, operadorLogico.NONE));
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, FuncionesBLAggDAL.OrderByDESC(t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString()));
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaSolicitudGrid(
|
|
|
|
|
|
ArrayList arlCondicionesFiltroBusqueda,
|
|
|
|
|
|
string strTop)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Vistas.v_obtenerSolicitud_Grid.ToString();
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objSolicitudEL.PK.HasValue)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKREGION != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKRegion(new int?(this.objSolicitudEL.FKREGION), operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.ASTATE)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorEstado(this.objSolicitudEL.ASTATE, Tablas.solicitud, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.LISTADODEPENDENCIAS != string.Empty && this.objSolicitudEL.LISTADODEPENDENCIAS != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorListadoDependencia(this.objSolicitudEL.LISTADODEPENDENCIAS, operadorLogico.NONE));
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, funcionesTLAgg.TOP.ToString() + " " + strTop, FuncionesBLAggDAL.OrderByDESC(t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString()));
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaSolicitudRegistrada(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Vistas.v_obtenerSolicitud.ToString();
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objSolicitudEL.PK.HasValue)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKREGION != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKRegion(new int?(this.objSolicitudEL.FKREGION), operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKDependencia(new int?(this.objSolicitudEL.FKDEPENDENCIA), operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.NUMEROSOLICITUD != "" && this.objSolicitudEL.NUMEROSOLICITUD != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorNumSolicitud(this.objSolicitudEL.NUMEROSOLICITUD, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.NUMEROTERRENO != "" && this.objSolicitudEL.NUMEROTERRENO != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPlanoCatastro(this.objSolicitudEL.NUMEROTERRENO, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.NUMEROFOLIO != "" && this.objSolicitudEL.NUMEROFOLIO != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFolioReal(this.objSolicitudEL.NUMEROFOLIO, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.Nombre != "" && this.objSolicitudEL.Nombre != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorNombre(this.objSolicitudEL.Nombre, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorNombrePropietario(this.objSolicitudEL.Nombre, operadorLogico.NONE));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.NUMCEDULAPROP != "" && this.objSolicitudEL.NUMCEDULAPROP != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorCedulaProp(this.objSolicitudEL.NUMCEDULAPROP, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorCedulaSolic(this.objSolicitudEL.CEDULASOLICITANTE, operadorLogico.NONE));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.NUMERONIS != "" && this.objSolicitudEL.NUMERONIS != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorNis(this.objSolicitudEL.NUMERONIS, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.TELEFONO != "" && this.objSolicitudEL.TELEFONO != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorTelefono(this.objSolicitudEL.TELEFONO, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorTelefono2(this.objSolicitudEL.TELEFONO, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFax(this.objSolicitudEL.FAX, operadorLogico.NONE));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.PROVINCIA != "" && this.objSolicitudEL.PROVINCIA != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorProvincia(this.objSolicitudEL.PROVINCIA, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorCanton(this.objSolicitudEL.CANTON, operadorLogico.OR));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorDistrito(this.objSolicitudEL.DISTRITO, operadorLogico.NONE));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.AÑO != 0 && this.objSolicitudEL.MES == 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorAnno(this.objSolicitudEL.AÑO.ToString(), operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.AÑO != 0 && this.objSolicitudEL.MES != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorMes(this.objSolicitudEL.MES.ToString(), operadorLogico.AND));
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorAnno(this.objSolicitudEL.AÑO.ToString(), operadorLogico.NONE));
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.ASTATE)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorEstado(this.objSolicitudEL.ASTATE, Tablas.solicitud, operadorLogico.NONE));
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, FuncionesBLAggDAL.OrderByDESC(t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString()));
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaSolicitudProgramacion(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Vistas.v_obtenerSolicitudProgramacion.ToString();
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objSolicitudEL.PK.HasValue)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKREGION != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKRegion(new int?(this.objSolicitudEL.FKREGION), operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKDependencia(new int?(this.objSolicitudEL.FKDEPENDENCIA), operadorLogico.AND));
|
|
|
|
|
|
int fkusuarioxdependencia = this.objSolicitudEL.FKUSUARIOXDEPENDENCIA;
|
|
|
|
|
|
if (this.objSolicitudEL.FKUSUARIOXDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKUsuarioActividad(this.objSolicitudEL.FKUSUARIOXDEPENDENCIA.ToString(), operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.LISTADODEPENDENCIAS != string.Empty && this.objSolicitudEL.LISTADODEPENDENCIAS != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorListadoDependencia(this.objSolicitudEL.LISTADODEPENDENCIAS, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.ASTATE)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorEstado(this.objSolicitudEL.ASTATE, Tablas.solicitud, operadorLogico.NONE));
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, FuncionesBLAggDAL.OrderByDESC(t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString()));
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaSolicitudProgramacionGrid(
|
|
|
|
|
|
ArrayList arlCondicionesFiltroBusqueda,
|
|
|
|
|
|
string strTop)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Vistas.v_obtenerSolicitudProgramacion_Grid.ToString();
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objSolicitudEL.PK.HasValue)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKREGION != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKRegion(new int?(this.objSolicitudEL.FKREGION), operadorLogico.AND));
|
|
|
|
|
|
int fkusuarioxdependencia = this.objSolicitudEL.FKUSUARIOXDEPENDENCIA;
|
|
|
|
|
|
if (this.objSolicitudEL.FKUSUARIOXDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKUsuarioActividad(this.objSolicitudEL.FKUSUARIOXDEPENDENCIA.ToString(), operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.LISTADODEPENDENCIAS != string.Empty && this.objSolicitudEL.LISTADODEPENDENCIAS != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorListadoDependencia(this.objSolicitudEL.LISTADODEPENDENCIAS, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.ASTATE)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorEstado(this.objSolicitudEL.ASTATE, Tablas.solicitud, operadorLogico.NONE));
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, funcionesTLAgg.TOP.ToString() + " " + strTop, FuncionesBLAggDAL.OrderByDESC(t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString()));
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaSolicitudGestion(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Vistas.v_obtenerSolicitudGestion.ToString();
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objSolicitudEL.PK.HasValue)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKREGION != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKRegion(new int?(this.objSolicitudEL.FKREGION), operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKDependencia(new int?(this.objSolicitudEL.FKDEPENDENCIA), operadorLogico.AND));
|
|
|
|
|
|
int fkusuarioxdependencia = this.objSolicitudEL.FKUSUARIOXDEPENDENCIA;
|
|
|
|
|
|
if (this.objSolicitudEL.FKUSUARIOXDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKUsuarioActividad(this.objSolicitudEL.FKUSUARIOXDEPENDENCIA.ToString(), operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.LISTADODEPENDENCIAS != string.Empty && this.objSolicitudEL.LISTADODEPENDENCIAS != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorListadoDependencia(this.objSolicitudEL.LISTADODEPENDENCIAS, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.ASTATE)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorEstado(this.objSolicitudEL.ASTATE, Tablas.solicitud, operadorLogico.NONE));
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, FuncionesBLAggDAL.OrderByDESC(t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString()));
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaSolicitudGestionGrid(
|
|
|
|
|
|
ArrayList arlCondicionesFiltroBusqueda,
|
|
|
|
|
|
int nCantidadFilas)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Vistas.v_obtenerSolicitudGestion_Grid.ToString();
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objSolicitudEL.PK.HasValue)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKREGION != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKRegion(new int?(this.objSolicitudEL.FKREGION), operadorLogico.AND));
|
|
|
|
|
|
int fkusuarioxdependencia = this.objSolicitudEL.FKUSUARIOXDEPENDENCIA;
|
|
|
|
|
|
if (this.objSolicitudEL.FKUSUARIOXDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKUsuarioActividad(this.objSolicitudEL.FKUSUARIOXDEPENDENCIA.ToString(), operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.LISTADODEPENDENCIAS != string.Empty && this.objSolicitudEL.LISTADODEPENDENCIAS != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorListadoDependencia(this.objSolicitudEL.LISTADODEPENDENCIAS, operadorLogico.NONE));
|
|
|
|
|
|
if (this.objSolicitudEL.ASTATE)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorEstado(this.objSolicitudEL.ASTATE, Tablas.solicitud, operadorLogico.NONE));
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, funcionesTLAgg.TOP.ToString() + " " + nCantidadFilas.ToString() + " ", FuncionesBLAggDAL.OrderByDESC(t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString()));
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsExisteSolicitud(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Vistas.v_obtenerSolicitud.ToString();
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKSolicitud(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.NUMEROSOLICITUD != "" && this.objSolicitudEL.NUMEROSOLICITUD != null)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorNumSolicitudExiste(this.objSolicitudEL.NUMEROSOLICITUD, operadorLogico.NONE));
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaAnnos(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.CamposTabla = t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString();
|
|
|
|
|
|
this.NombreTabla = Vistas.v_obtenerAnnosSolicitud.ToString();
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, funcionesTLAgg.DISTINCT.ToString(), FuncionesBLAggDAL.OrderByDESC(t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString()));
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaUsoEdificacion(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.usoedificacion.ToString();
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaTipoInspeccion(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.tipoinspeccion.ToString();
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaTipoDisponibilidad(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.tipodisponibilidad.ToString();
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsTitularInmueble(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.titularinmueble.ToString();
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaTipoVisado(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.tipovisado.ToString();
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int insertarAsignacionActividadEncargado()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
this.NombreTabla = Modulos.t_sgm_.ToString() + Tablas.responsableactividad.ToString();
|
|
|
|
|
|
this.CamposTabla = t_seg_responsableactividad.FECHAASIGNACION.ToString() + Tablas.responsableactividad.ToString() + ", " + t_seg_responsableactividad.FECHARECIBIDO.ToString() + Tablas.responsableactividad.ToString() + ", " + t_seg_responsableactividad.FECHADEVOLUCION.ToString() + Tablas.responsableactividad.ToString() + ", " + t_seg_responsableactividad.VALIDACIONFIRMA.ToString() + Tablas.responsableactividad.ToString() + ", " + t_seg_responsableactividad.FKPROGRAMACIONSOLICITUD.ToString() + ", " + t_seg_responsableactividad.FKACTIVIDAD.ToString() + ", " + t_seg_responsableactividad.FKUSUARIOXDEPENDENCIA.ToString() + ", " + t_seg_responsableactividad.FKESTADO.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.responsableactividad.ToString() + " ";
|
|
|
|
|
|
this.ValoresCampos = new object[9]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) this.objresponsableActividadEL.FECHAASIGNACION,
|
|
|
|
|
|
(object) this.objresponsableActividadEL.FECHARECIBIDO,
|
|
|
|
|
|
(object) this.objresponsableActividadEL.FECHADEVOLUCION,
|
|
|
|
|
|
(object) this.objresponsableActividadEL.VALIDACIONFIRMA,
|
|
|
|
|
|
(object) this.objresponsableActividadEL.FKPROGRAMACIONSOLICITUD,
|
|
|
|
|
|
(object) this.objresponsableActividadEL.FKACTIVIDAD,
|
|
|
|
|
|
(object) this.objresponsableActividadEL.FKUSUARIOXDEPENDENCIA,
|
|
|
|
|
|
(object) this.objresponsableActividadEL.FKESTADO,
|
|
|
|
|
|
(object) 1
|
|
|
|
|
|
};
|
|
|
|
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaActividadesEncargado(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objSolicitudEL.PK.HasValue)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKProgramacionSolicitudActividades(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKACTIVIDAD != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int fkactividad = this.objSolicitudEL.FKACTIVIDAD;
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKActividadProgramacionSolicitud(new int?(this.objSolicitudEL.FKACTIVIDAD), operadorLogico.AND));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.ORDEN != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int orden = this.objSolicitudEL.ORDEN;
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorOrdenActividadProgramacionSolicitud(new int?(this.objSolicitudEL.ORDEN), operadorLogico.AND));
|
|
|
|
|
|
}
|
|
|
|
|
|
int fkusuarioxdependencia = this.objSolicitudEL.FKUSUARIOXDEPENDENCIA;
|
|
|
|
|
|
if (this.objSolicitudEL.FKUSUARIOXDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFK(this.objSolicitudEL.FKUSUARIOXDEPENDENCIA, Tablas.usuarioxdependencia, operadorLogico.AND));
|
|
|
|
|
|
int fkdependencia = this.objSolicitudEL.FKDEPENDENCIA;
|
|
|
|
|
|
if (this.objSolicitudEL.FKDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFK(this.objSolicitudEL.FKDEPENDENCIA, Tablas.dependencia, operadorLogico.AND));
|
|
|
|
|
|
int fksolicitud = this.objSolicitudEL.FKSOLICITUD;
|
|
|
|
|
|
if (this.objSolicitudEL.FKSOLICITUD != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFK(this.objSolicitudEL.FKSOLICITUD, Tablas.solicitud, operadorLogico.NONE));
|
|
|
|
|
|
CondicionDAL condicionDal1 = new CondicionDAL();
|
|
|
|
|
|
int fkestado = this.objSolicitudEL.FKESTADO;
|
|
|
|
|
|
if (this.objSolicitudEL.FKESTADO != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
CondicionDAL condicionDal2 = new CondicionDAL();
|
|
|
|
|
|
CondicionDAL condicionDal3 = this.buscarPorFK(this.objSolicitudEL.FKESTADO, Tablas.estado, operadorLogico.OR);
|
|
|
|
|
|
condicionDal3.parentesisInicio = true;
|
|
|
|
|
|
arrayList.Add((object) condicionDal3);
|
|
|
|
|
|
CondicionDAL condicionDal4 = new CondicionDAL();
|
|
|
|
|
|
int fkestadO2 = this.objSolicitudEL.FKESTADO2;
|
|
|
|
|
|
if (this.objSolicitudEL.FKESTADO2 != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
CondicionDAL condicionDal5 = this.buscarPorFK(this.objSolicitudEL.FKESTADO2, Tablas.estado, operadorLogico.AND);
|
|
|
|
|
|
condicionDal5.parentesisFinal = true;
|
|
|
|
|
|
arrayList.Add((object) condicionDal5);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
this.NombreTabla = Vistas.v_obtenerResponsableActividadSolicitud.ToString();
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, "ORDER BY ORDENACTIVIDAD DESC");
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-03-09 17:08:10 +00:00
|
|
|
|
//Requerimiento 5
|
2021-02-03 23:17:11 +00:00
|
|
|
|
public int ObtenerDiferenciaDias(DateTime FechaIngreso, DateTime FechaResolucion)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if (FechaResolucion.Date == FechaIngreso.Date)
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
|
|
int n = 0;
|
|
|
|
|
|
DateTime nextDate = FechaIngreso;
|
|
|
|
|
|
while (nextDate <= FechaResolucion.Date)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (nextDate.DayOfWeek != DayOfWeek.Saturday && nextDate.DayOfWeek != DayOfWeek.Sunday)
|
|
|
|
|
|
n++;
|
|
|
|
|
|
nextDate = nextDate.AddDays(1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return n - 1;
|
|
|
|
|
|
}
|
2021-03-09 17:08:10 +00:00
|
|
|
|
//Requerimiento 5
|
2021-02-03 23:17:11 +00:00
|
|
|
|
|
2021-01-22 15:05:35 +00:00
|
|
|
|
public DataSet dsListaUsuariosXActividades(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.CamposTabla = "*";
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objSolicitudEL.PK.HasValue)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKProgramacionSolicitudActividades(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKACTIVIDAD != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int fkactividad = this.objSolicitudEL.FKACTIVIDAD;
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKActividadProgramacionSolicitud(new int?(this.objSolicitudEL.FKACTIVIDAD), operadorLogico.AND));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.ORDEN != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int orden = this.objSolicitudEL.ORDEN;
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorOrdenActividadProgramacionSolicitud(new int?(this.objSolicitudEL.ORDEN), operadorLogico.AND));
|
|
|
|
|
|
}
|
|
|
|
|
|
int fkusuarioxdependencia = this.objSolicitudEL.FKUSUARIOXDEPENDENCIA;
|
|
|
|
|
|
if (this.objSolicitudEL.FKUSUARIOXDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFK(this.objSolicitudEL.FKUSUARIOXDEPENDENCIA, Tablas.usuarioxdependencia, operadorLogico.AND));
|
|
|
|
|
|
int fkdependencia = this.objSolicitudEL.FKDEPENDENCIA;
|
|
|
|
|
|
if (this.objSolicitudEL.FKDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFK(this.objSolicitudEL.FKDEPENDENCIA, Tablas.dependencia, operadorLogico.AND));
|
|
|
|
|
|
int fksolicitud = this.objSolicitudEL.FKSOLICITUD;
|
|
|
|
|
|
if (this.objSolicitudEL.FKSOLICITUD != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFK(this.objSolicitudEL.FKSOLICITUD, Tablas.solicitud, operadorLogico.NONE));
|
|
|
|
|
|
this.NombreTabla = Vistas.v_lista_usuarioxactividad.ToString();
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaActividadesXDependencia(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.CamposTabla = "*";
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objSolicitudEL.PK.HasValue)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKProgramacionSolicitudActividades(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKACTIVIDAD != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int fkactividad = this.objSolicitudEL.FKACTIVIDAD;
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKActividadProgramacionSolicitud(new int?(this.objSolicitudEL.FKACTIVIDAD), operadorLogico.AND));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.ORDEN != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int orden = this.objSolicitudEL.ORDEN;
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorOrdenActividadProgramacionSolicitud(new int?(this.objSolicitudEL.ORDEN), operadorLogico.AND));
|
|
|
|
|
|
}
|
|
|
|
|
|
int fkusuarioxdependencia = this.objSolicitudEL.FKUSUARIOXDEPENDENCIA;
|
|
|
|
|
|
if (this.objSolicitudEL.FKUSUARIOXDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFK(this.objSolicitudEL.FKUSUARIOXDEPENDENCIA, Tablas.usuarioxdependencia, operadorLogico.AND));
|
|
|
|
|
|
int fkdependencia = this.objSolicitudEL.FKDEPENDENCIA;
|
|
|
|
|
|
if (this.objSolicitudEL.FKDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFK(this.objSolicitudEL.FKDEPENDENCIA, Tablas.dependencia, operadorLogico.AND));
|
|
|
|
|
|
int fksolicitud = this.objSolicitudEL.FKSOLICITUD;
|
|
|
|
|
|
if (this.objSolicitudEL.FKSOLICITUD != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFK(this.objSolicitudEL.FKSOLICITUD, Tablas.solicitud, operadorLogico.NONE));
|
|
|
|
|
|
this.NombreTabla = Vistas.v_lista_actividadxdependencia.ToString();
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet dsListaActividadesEncargadoFirma(ArrayList arlCondicionesFiltroBusqueda)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList arrayList = new ArrayList();
|
|
|
|
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
|
|
|
|
int? pk = this.objSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objSolicitudEL.PK.HasValue)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorPKProgramacionSolicitudActividades(this.objSolicitudEL.PK, operadorLogico.AND));
|
|
|
|
|
|
if (this.objSolicitudEL.FKACTIVIDAD != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int fkactividad = this.objSolicitudEL.FKACTIVIDAD;
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFKActividadProgramacionSolicitud(new int?(this.objSolicitudEL.FKACTIVIDAD), operadorLogico.AND));
|
|
|
|
|
|
}
|
|
|
|
|
|
if (this.objSolicitudEL.ORDEN != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int orden = this.objSolicitudEL.ORDEN;
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorOrdenActividadProgramacionSolicitud(new int?(this.objSolicitudEL.ORDEN), operadorLogico.AND));
|
|
|
|
|
|
}
|
|
|
|
|
|
int fkusuarioxdependencia = this.objSolicitudEL.FKUSUARIOXDEPENDENCIA;
|
|
|
|
|
|
if (this.objSolicitudEL.FKUSUARIOXDEPENDENCIA != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFK(this.objSolicitudEL.FKUSUARIOXDEPENDENCIA, Tablas.usuarioxdependencia, operadorLogico.AND));
|
|
|
|
|
|
int fksolicitud = this.objSolicitudEL.FKSOLICITUD;
|
|
|
|
|
|
if (this.objSolicitudEL.FKSOLICITUD != 0)
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorFK(this.objSolicitudEL.FKSOLICITUD, Tablas.solicitud, operadorLogico.NONE));
|
|
|
|
|
|
CondicionDAL condicionDal1 = new CondicionDAL();
|
|
|
|
|
|
int fkestado = this.objSolicitudEL.FKESTADO;
|
|
|
|
|
|
if (this.objSolicitudEL.FKESTADO != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
CondicionDAL condicionDal2 = new CondicionDAL();
|
|
|
|
|
|
CondicionDAL condicionDal3 = this.buscarPorFK(this.objSolicitudEL.FKESTADO, Tablas.estado, operadorLogico.OR);
|
|
|
|
|
|
condicionDal3.parentesisInicio = true;
|
|
|
|
|
|
arrayList.Add((object) condicionDal3);
|
|
|
|
|
|
CondicionDAL condicionDal4 = new CondicionDAL();
|
|
|
|
|
|
int fkestadO2 = this.objSolicitudEL.FKESTADO2;
|
|
|
|
|
|
if (this.objSolicitudEL.FKESTADO2 != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
CondicionDAL condicionDal5 = this.buscarPorFK(this.objSolicitudEL.FKESTADO2, Tablas.estado, operadorLogico.AND);
|
|
|
|
|
|
condicionDal5.parentesisFinal = true;
|
|
|
|
|
|
arrayList.Add((object) condicionDal5);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
int num = this.objSolicitudEL.VALIDACIONFIRMARESPONSABLEACTIVIDAD ? 1 : 0;
|
|
|
|
|
|
arrayList.Add((object) this.buscarPorValidacionFirma(this.objSolicitudEL.VALIDACIONFIRMARESPONSABLEACTIVIDAD, operadorLogico.NONE));
|
|
|
|
|
|
this.NombreTabla = Vistas.v_obtenerResponsableActividadSolicitud.ToString();
|
|
|
|
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int eliminarAsignacionActividadEncargado()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
|
|
|
|
this.NombreTabla = Modulos.t_sgm_.ToString() + Tablas.responsableactividad.ToString();
|
|
|
|
|
|
int? pk = this.objresponsableActividadEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objresponsableActividadEL.PK.HasValue)
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorPKResponsableActividad(this.objresponsableActividadEL.PK, operadorLogico.AND));
|
|
|
|
|
|
return this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, p_arlCondiciones);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int actualizarProgramacionSolicitud(programacionsolicitudEL objProgramacionSolicitudEL)
|
|
|
|
|
|
{
|
|
|
|
|
|
int num = 0;
|
|
|
|
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.programacionsolicitud.ToString();
|
|
|
|
|
|
int? pk = objProgramacionSolicitudEL.PK;
|
|
|
|
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (objProgramacionSolicitudEL.FK.HasValue)
|
|
|
|
|
|
{
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(objProgramacionSolicitudEL.PK, Tablas.programacionsolicitud, operadorLogico.NONE));
|
|
|
|
|
|
this.CamposTabla = Constraints.FK.ToString() + Tablas.estadoprogramacion.ToString() + ", " + Constraints.FK.ToString() + Tablas.solicitud.ToString();
|
|
|
|
|
|
this.ValoresCampos = new object[2]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) objProgramacionSolicitudEL.FKESTADOPROGRAMACION,
|
|
|
|
|
|
(object) objProgramacionSolicitudEL.FKSOLICITUD
|
|
|
|
|
|
};
|
|
|
|
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
return num;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int actualizarActividadSolicitud()
|
|
|
|
|
|
{
|
|
|
|
|
|
int num = 0;
|
|
|
|
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
this.NombreTabla = Modulos.t_sgm_.ToString() + Tablas.responsableactividad.ToString();
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(this.objresponsableActividadEL.PK, Tablas.responsableactividad, operadorLogico.NONE));
|
|
|
|
|
|
this.CamposTabla = t_seg_responsableactividad.FECHADEVOLUCION.ToString() + Tablas.responsableactividad.ToString() + ", " + t_seg_responsableactividad.FKESTADO.ToString();
|
|
|
|
|
|
this.ValoresCampos = new object[2]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) this.objresponsableActividadEL.FECHADEVOLUCION,
|
|
|
|
|
|
(object) this.objresponsableActividadEL.FKESTADO
|
|
|
|
|
|
};
|
|
|
|
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int actualizarFirmaActividadSolicitud()
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
this.NombreTabla = Modulos.t_sgm_.ToString() + Tablas.responsableactividad.ToString();
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(this.objresponsableActividadEL.PK, Tablas.responsableactividad, operadorLogico.NONE));
|
|
|
|
|
|
this.CamposTabla = t_seg_responsableactividad.VALIDACIONFIRMA.ToString() + Tablas.responsableactividad.ToString();
|
|
|
|
|
|
this.ValoresCampos = new object[1]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) this.objresponsableActividadEL.VALIDACIONFIRMA
|
|
|
|
|
|
};
|
|
|
|
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int actualizarActividadSolicitudSiguiente()
|
|
|
|
|
|
{
|
|
|
|
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
this.NombreTabla = Modulos.t_sgm_.ToString() + Tablas.responsableactividad.ToString();
|
|
|
|
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(this.objresponsableActividadEL.PK, Tablas.responsableactividad, operadorLogico.NONE));
|
|
|
|
|
|
this.CamposTabla = t_seg_responsableactividad.FECHARECIBIDO.ToString() + Tablas.responsableactividad.ToString() + ", " + t_seg_responsableactividad.FKESTADO.ToString();
|
|
|
|
|
|
this.ValoresCampos = new object[2]
|
|
|
|
|
|
{
|
|
|
|
|
|
(object) this.objresponsableActividadEL.FECHADEVOLUCION,
|
|
|
|
|
|
(object) this.objresponsableActividadEL.FKESTADO
|
|
|
|
|
|
};
|
|
|
|
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet reutilizarSolicitud()
|
|
|
|
|
|
{
|
|
|
|
|
|
DbParameter[] p_dbpParametros = new DbParameter[4];
|
|
|
|
|
|
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 = "@PKSOLICITUDREUTLIZADA";
|
|
|
|
|
|
p_dbpParametros[0].Value = (object) this.objSolicitudEL.PK;
|
|
|
|
|
|
p_dbpParametros[0].DbType = DbType.Int32;
|
|
|
|
|
|
p_dbpParametros[1].ParameterName = "@USUARIO";
|
|
|
|
|
|
p_dbpParametros[1].Value = (object) this.objSolicitudEL.FKUSUARIOXDEPENDENCIA;
|
|
|
|
|
|
p_dbpParametros[1].DbType = DbType.Int32;
|
|
|
|
|
|
p_dbpParametros[2].ParameterName = "@P_STATUS";
|
|
|
|
|
|
p_dbpParametros[2].DbType = DbType.String;
|
|
|
|
|
|
p_dbpParametros[2].Size = 2;
|
|
|
|
|
|
p_dbpParametros[2].Direction = ParameterDirection.InputOutput;
|
|
|
|
|
|
p_dbpParametros[3].ParameterName = "@P_MENSAJE";
|
|
|
|
|
|
p_dbpParametros[3].DbType = DbType.String;
|
|
|
|
|
|
p_dbpParametros[3].Size = 500;
|
|
|
|
|
|
p_dbpParametros[3].Direction = ParameterDirection.InputOutput;
|
|
|
|
|
|
return this.baseDAL.dsProcedimientoAlmacenado("PA_REUTILIZARSOLICITUD", p_dbpParametros, this.NombreConeccionBD);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet revisionSolicitud()
|
|
|
|
|
|
{
|
|
|
|
|
|
DbParameter[] p_dbpParametros = new DbParameter[4];
|
|
|
|
|
|
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 = "@PKSOLICITUDREUTLIZADA";
|
|
|
|
|
|
p_dbpParametros[0].Value = (object) this.objSolicitudEL.PK;
|
|
|
|
|
|
p_dbpParametros[0].DbType = DbType.Int32;
|
|
|
|
|
|
p_dbpParametros[1].ParameterName = "@USUARIO";
|
|
|
|
|
|
p_dbpParametros[1].Value = (object) this.objSolicitudEL.FKUSUARIOXDEPENDENCIA;
|
|
|
|
|
|
p_dbpParametros[1].DbType = DbType.Int32;
|
|
|
|
|
|
p_dbpParametros[2].ParameterName = "@P_STATUS";
|
|
|
|
|
|
p_dbpParametros[2].DbType = DbType.String;
|
|
|
|
|
|
p_dbpParametros[2].Size = 2;
|
|
|
|
|
|
p_dbpParametros[2].Direction = ParameterDirection.InputOutput;
|
|
|
|
|
|
p_dbpParametros[3].ParameterName = "@P_MENSAJE";
|
|
|
|
|
|
p_dbpParametros[3].DbType = DbType.String;
|
|
|
|
|
|
p_dbpParametros[3].Size = 500;
|
|
|
|
|
|
p_dbpParametros[3].Direction = ParameterDirection.InputOutput;
|
|
|
|
|
|
return this.baseDAL.dsProcedimientoAlmacenado("PA_REVISIONSOLICITUD", p_dbpParametros, this.NombreConeccionBD);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorValidacionFirma(
|
|
|
|
|
|
bool p_bValidacion,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
CondicionDAL condicionDal = new CondicionDAL();
|
|
|
|
|
|
condicionDal.valorIzquierdo = t_seg_responsableactividad.VALIDACIONFIRMA.ToString() + Tablas.responsableactividad.ToString();
|
|
|
|
|
|
condicionDal.operadorGeneral = operadorGeneral.EQUAL;
|
|
|
|
|
|
condicionDal.operadorLogico = operador;
|
|
|
|
|
|
if (p_bValidacion)
|
|
|
|
|
|
condicionDal.valorDerecho = (object) 1;
|
|
|
|
|
|
if (!p_bValidacion)
|
|
|
|
|
|
condicionDal.valorDerecho = (object) 0;
|
|
|
|
|
|
return condicionDal;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorPKSolicitud(
|
|
|
|
|
|
int? p_nPKSolicitud,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = Constraints.PK.ToString() + Tablas.solicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_nPKSolicitud
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorFKRegion(int? p_nFKRegion, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.FKREGION.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_nFKRegion
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorFKDependencia(
|
|
|
|
|
|
int? p_nFKDependencia,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.FKDEPENDENCIASIGDD.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_nFKDependencia
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorNumSolicitud(
|
|
|
|
|
|
string p_strNumSolicitud,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.NUMEROSOLICITUD.ToString() + Tablas.solicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_strNumSolicitud
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorPlanoCatastro(
|
|
|
|
|
|
string p_strValor,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.NUMEROTERRENO.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorFolioReal(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.NUMEROFOLIO.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorNombre(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.NOMBRECOMPLETOSOLICITANTE.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorNombrePropietario(
|
|
|
|
|
|
string p_strValor,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.NOMBRECLIENTESOLICITUD.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorCedulaProp(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.CEDULACLIENTE.ToString() + Tablas.solicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorCedulaSolic(
|
|
|
|
|
|
string p_strValor,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.CEDULASOLICITANTE.ToString() + Tablas.solicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorNis(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.NUMERONIS.ToString() + Tablas.solicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorTelefono(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.NUMEROTELEFONO1.ToString() + Tablas.solicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorTelefono2(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.NUMEROTELEFONO2.ToString() + Tablas.solicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorFax(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.FAX.ToString() + Tablas.solicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorProvincia(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.DESCRIPCIONPROVINCIA.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorCanton(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.DESCRIPCIONCANTON.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorDistrito(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.DESCRIPCIONDISTRITO.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) ("%" + p_strValor + "%")
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorAnno(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.AÑO.ToString() + Tablas.solicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_strValor
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorFecha(DateTime? p_dtValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_dtValor
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorMes(string p_strValor, operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = funcionesFecha.MONTH.ToString() + "(" + t_dis_solicitud.FECHAINSERTA.ToString() + Tablas.solicitud.ToString() + ")",
|
|
|
|
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_strValor
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorNumSolicitudExiste(
|
|
|
|
|
|
string p_strNumSolicitud,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.NUMEROSOLICITUD.ToString() + Tablas.solicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_strNumSolicitud
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorPKProgramacionSolicitudActividades(
|
|
|
|
|
|
int? p_nFKSolicitud,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = Constraints.PK.ToString() + Tablas.programacionsolicitud.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_nFKSolicitud
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorFKActividadProgramacionSolicitud(
|
|
|
|
|
|
int? p_nFKActividad,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = Constraints.FK.ToString() + Tablas.actividad.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_nFKActividad
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorOrdenActividadProgramacionSolicitud(
|
|
|
|
|
|
int? p_nOrdenActividad,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_adm_actividad.ORDEN.ToString() + Tablas.actividad.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_nOrdenActividad
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorPKResponsableActividad(
|
|
|
|
|
|
int? p_nFKResponsable,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = Constraints.PK.ToString() + Tablas.responsableactividad.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_nFKResponsable
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorFKUsuarioActividad(
|
|
|
|
|
|
string p_nFKUsuario,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = Constraints.FK.ToString() + Tablas.usuarioxdependencia.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.IN,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_nFKUsuario
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private CondicionDAL buscarPorListadoDependencia(
|
|
|
|
|
|
string p_strListadoDependencias,
|
|
|
|
|
|
operadorLogico operador)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new CondicionDAL()
|
|
|
|
|
|
{
|
|
|
|
|
|
valorIzquierdo = t_dis_solicitud.FKDEPENDENCIASIGDD.ToString(),
|
|
|
|
|
|
operadorGeneral = operadorGeneral.IN,
|
|
|
|
|
|
operadorLogico = operador,
|
|
|
|
|
|
valorDerecho = (object) p_strListadoDependencias
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|