201 lines
8.1 KiB
C#
201 lines
8.1 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: AyABL.Tran.PlanoBL
|
|
// 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.Tran
|
|
{
|
|
public class PlanoBL : AyABL
|
|
{
|
|
private static NameValueCollection appSettings = ConfigurationManager.AppSettings;
|
|
|
|
public PlanoBL()
|
|
{
|
|
this.objplanoEL = new planoEL();
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.planocatastro.ToString();
|
|
this.NombreConeccionBD = BASESDEDATOS.SIGDD.ToString();
|
|
}
|
|
|
|
public planoEL objplanoEL { get; set; }
|
|
|
|
public int insertarPlanos()
|
|
{
|
|
try
|
|
{
|
|
this.CamposTabla = t_dis_planocatastrado.PLANOCATASTRO.ToString() + Tablas.planocatastro.ToString() + " ," + t_dis_planocatastrado.USUARIO.ToString() + Tablas.planocatastro.ToString() + " ," + t_dis_planocatastrado.NUMFOLIOREAL.ToString() + Tablas.planocatastro.ToString() + " ," + t_dis_planocatastrado.FECHA.ToString() + Tablas.planocatastro.ToString() + " ," + t_dis_planocatastrado.FKSOLICITUD.ToString() + Tablas.planocatastro.ToString();
|
|
this.ValoresCampos = new object[5]
|
|
{
|
|
(object) this.objplanoEL.PLANOCATASTRO,
|
|
(object) this.objplanoEL.USUARIO,
|
|
(object) this.objplanoEL.NUMFOLIOREAL,
|
|
(object) this.objplanoEL.Fecha,
|
|
(object) this.objplanoEL.FKSOLICITUD
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarPlanos()
|
|
{
|
|
try
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(this.objplanoEL.PK, Tablas.planocatastro, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_planocatastrado.PLANOCATASTRO.ToString() + Tablas.planocatastro.ToString() + "," + t_dis_planocatastrado.USUARIO.ToString() + Tablas.planocatastro.ToString() + "," + t_dis_planocatastrado.NUMFOLIOREAL.ToString() + Tablas.planocatastro.ToString() + "," + t_dis_planocatastrado.FECHA.ToString() + Tablas.planocatastro.ToString() + "," + t_dis_planocatastrado.FKSOLICITUD.ToString() + Tablas.planocatastro.ToString();
|
|
this.ValoresCampos = new object[5]
|
|
{
|
|
(object) this.objplanoEL.PLANOCATASTRO,
|
|
(object) this.objplanoEL.USUARIO,
|
|
(object) this.objplanoEL.NUMFOLIOREAL,
|
|
(object) this.objplanoEL.Fecha,
|
|
(object) this.objplanoEL.FKSOLICITUD
|
|
};
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int actualizarNumSolicitudPlanos(string strNumSolicitudPermanente)
|
|
{
|
|
try
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
int fksolicitud = this.objplanoEL.FKSOLICITUD;
|
|
p_arlCondiciones.Add((object) this.buscarPorNUMSOLICITUD(this.objplanoEL.FKSOLICITUD, Tablas.planocatastro, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_planocatastrado.FKSOLICITUD.ToString() + Tablas.planocatastro.ToString();
|
|
this.ValoresCampos = new object[1]
|
|
{
|
|
(object) strNumSolicitudPermanente
|
|
};
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public void eliminarSolicitud()
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
try
|
|
{
|
|
int? pk = this.objplanoEL.PK;
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(this.objplanoEL.PK, Tablas.planocatastro, operadorLogico.NONE));
|
|
if (this.objplanoEL.FKSOLICITUD != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorNUMSOLICITUD(this.objplanoEL.FKSOLICITUD, Tablas.planocatastro, operadorLogico.NONE));
|
|
this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, p_arlCondiciones);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public DataSet listarPlanos(
|
|
ArrayList arlCondicionesFiltroBusqueda,
|
|
bool buscarPorASTATE,
|
|
string p_strPrefijoDependencia)
|
|
{
|
|
try
|
|
{
|
|
ArrayList arrayList = new ArrayList();
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
int? pk = this.objplanoEL.PK;
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0)
|
|
arrayList.Add((object) this.buscarPorPK(this.objplanoEL.PK, Tablas.planocatastro, operadorLogico.AND));
|
|
if (this.objplanoEL.PLANOCATASTRO != null)
|
|
arrayList.Add((object) this.buscarPorPlano(this.objplanoEL.PLANOCATASTRO, Tablas.planocatastro, operadorLogico.AND));
|
|
if (this.objplanoEL.NUMFOLIOREAL != null)
|
|
arrayList.Add((object) this.buscarPorFolio(this.objplanoEL.NUMFOLIOREAL, Tablas.planocatastro, operadorLogico.NONE));
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, "ORDER BY PKPLANOCATASTRADO DESC");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public DataSet dsListarPlanos(ArrayList arlCondicionesFiltroBusqueda)
|
|
{
|
|
try
|
|
{
|
|
ArrayList arrayList = new ArrayList();
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
int? pk = this.objplanoEL.PK;
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objplanoEL.PK.HasValue)
|
|
arrayList.Add((object) this.buscarPorPK(this.objplanoEL.PK, Tablas.planocatastro, operadorLogico.AND));
|
|
if (this.objplanoEL.PLANOCATASTRO != null)
|
|
arrayList.Add((object) this.buscarPorPlano(this.objplanoEL.PLANOCATASTRO, Tablas.planocatastro, operadorLogico.AND));
|
|
if (this.objplanoEL.NUMFOLIOREAL != null)
|
|
arrayList.Add((object) this.buscarPorFolio(this.objplanoEL.NUMFOLIOREAL, Tablas.planocatastro, operadorLogico.AND));
|
|
int fksolicitud = this.objplanoEL.FKSOLICITUD;
|
|
arrayList.Add((object) this.buscarPorNUMSOLICITUD(this.objplanoEL.FKSOLICITUD, Tablas.planocatastro, operadorLogico.NONE));
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
protected CondicionDAL buscarPorPlano(
|
|
string p_strPlano,
|
|
Tablas p_nombreTabla,
|
|
operadorLogico logOp)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = t_dis_planocatastrado.PLANOCATASTRO.ToString() + p_nombreTabla.ToString(),
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
operadorLogico = logOp,
|
|
valorDerecho = (object) p_strPlano
|
|
};
|
|
}
|
|
|
|
protected CondicionDAL buscarPorFolio(
|
|
string p_strFolio,
|
|
Tablas p_nombreTabla,
|
|
operadorLogico logOp)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = t_dis_planocatastrado.NUMFOLIOREAL.ToString() + p_nombreTabla.ToString(),
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
operadorLogico = logOp,
|
|
valorDerecho = (object) p_strFolio
|
|
};
|
|
}
|
|
|
|
protected CondicionDAL buscarPorNUMSOLICITUD(
|
|
int p_strNUMSOLICITUD,
|
|
Tablas p_nombreTabla,
|
|
operadorLogico logOp)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = t_dis_planocatastrado.FKSOLICITUD.ToString(),
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
operadorLogico = logOp,
|
|
valorDerecho = (object) p_strNUMSOLICITUD
|
|
};
|
|
}
|
|
}
|
|
}
|