90 lines
3.3 KiB
C#
90 lines
3.3 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: AyABL.Usuario.distritoBL
|
|
// 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.MANT;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Specialized;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
|
|
namespace AyABL.Usuario
|
|
{
|
|
public class distritoBL : AyABL
|
|
{
|
|
private static NameValueCollection appSettings = ConfigurationManager.AppSettings;
|
|
|
|
public distritoBL()
|
|
{
|
|
this.objdistritoEL = new distritoEL();
|
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.distrito.ToString();
|
|
this.NombreConeccionBD = BASESDEDATOS.SIGDD.ToString();
|
|
}
|
|
|
|
public distritoEL objdistritoEL { get; set; }
|
|
|
|
public DataSet dsListaDistrito(ArrayList arlCondicionesFiltroBusqueda)
|
|
{
|
|
try
|
|
{
|
|
ArrayList arrayList = new ArrayList();
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
if (this.objdistritoEL.FKCANTON != 0)
|
|
arrayList.Add((object) this.buscarPorDistrito(this.objdistritoEL.FKCANTON, operadorLogico.AND));
|
|
int? pk = this.objdistritoEL.PK;
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objdistritoEL.PK.HasValue)
|
|
arrayList.Add((object) this.buscarPorPKDistrito(this.objdistritoEL.PK, operadorLogico.AND));
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, "ORDER BY PKDISTRITO ASC");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public DataSet dsListaDistritos(ArrayList arlCondicionesFiltroBusqueda)
|
|
{
|
|
try
|
|
{
|
|
ArrayList arrayList = new ArrayList();
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
if (this.objdistritoEL.FKCANTON != 0)
|
|
arrayList.Add((object) this.buscarPorDistrito(this.objdistritoEL.FKCANTON, operadorLogico.AND));
|
|
int? pk = this.objdistritoEL.PK;
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objdistritoEL.PK.HasValue)
|
|
arrayList.Add((object) this.buscarPorPKDistrito(this.objdistritoEL.PK, operadorLogico.AND));
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, "ORDER BY PKDISTRITO ASC");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
private CondicionDAL buscarPorDistrito(int p_nDistrito, operadorLogico operador)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = t_adm_distrito.FKCANTON.ToString(),
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
operadorLogico = operador,
|
|
valorDerecho = (object) p_nDistrito
|
|
};
|
|
}
|
|
|
|
private CondicionDAL buscarPorPKDistrito(int? p_nDistrito, operadorLogico operador)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = Constraints.PK.ToString() + Tablas.distrito.ToString(),
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
operadorLogico = operador,
|
|
valorDerecho = (object) p_nDistrito
|
|
};
|
|
}
|
|
}
|
|
}
|