143 lines
5.8 KiB
C#
143 lines
5.8 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: AyABL.Usuario.clienteSolicitudBL
|
|
// 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.Tran;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Specialized;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
|
|
namespace AyABL.Usuario
|
|
{
|
|
public class clienteSolicitudBL : AyABL
|
|
{
|
|
private static NameValueCollection appSettings = ConfigurationManager.AppSettings;
|
|
|
|
public clienteSolicitudBL()
|
|
{
|
|
this.objclientesolicitudEL = new clienteSolicitudEL();
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.clientesolicitud.ToString();
|
|
this.NombreConeccionBD = BASESDEDATOS.SIGDD.ToString();
|
|
}
|
|
|
|
public clienteSolicitudEL objclientesolicitudEL { get; set; }
|
|
|
|
public int insertarClienteSolicitud()
|
|
{
|
|
try
|
|
{
|
|
this.CamposTabla = t_dis_clientesolicitud.FKSOLICITUD.ToString() + ", " + t_dis_clientesolicitud.CEDULA.ToString() + Tablas.clientesolicitud.ToString() + ", " + t_dis_clientesolicitud.NOMBRE.ToString() + Tablas.clientesolicitud.ToString() + ", " + t_dis_clientesolicitud.FKTIPOPROPIETARIO.ToString() + "," + Auditoria.ASTATE.ToString() + Tablas.clientesolicitud.ToString();
|
|
this.ValoresCampos = new object[5]
|
|
{
|
|
(object) this.objclientesolicitudEL.FKSOLICITUD,
|
|
(object) this.objclientesolicitudEL.CEDULA,
|
|
(object) this.objclientesolicitudEL.NOMBRE,
|
|
(object) this.objclientesolicitudEL.FKTIPOPROPIETARIO,
|
|
(object) true
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarClienteSolicitud()
|
|
{
|
|
try
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(this.objclientesolicitudEL.PK, Tablas.clientesolicitud, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_clientesolicitud.FKSOLICITUD.ToString() + Tablas.clientesolicitud.ToString() + ", " + t_dis_clientesolicitud.CEDULA.ToString() + Tablas.clientesolicitud.ToString() + ", " + t_dis_clientesolicitud.NOMBRE.ToString() + Tablas.clientesolicitud.ToString() + "," + t_dis_clientesolicitud.FKTIPOPROPIETARIO.ToString();
|
|
this.ValoresCampos = new object[4]
|
|
{
|
|
(object) this.objclientesolicitudEL.FKSOLICITUD,
|
|
(object) this.objclientesolicitudEL.CEDULA,
|
|
(object) this.objclientesolicitudEL.NOMBRE,
|
|
(object) this.objclientesolicitudEL.FKTIPOPROPIETARIO
|
|
};
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarClienteSolicitudNumSolicitudPermanente(string p_strNumSolicitud)
|
|
{
|
|
try
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
if (this.objclientesolicitudEL.FKSOLICITUD != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorNUMSOLICITUD(this.objclientesolicitudEL.FKSOLICITUD, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_clientesolicitud.FKSOLICITUD.ToString() + Tablas.clientesolicitud.ToString();
|
|
this.ValoresCampos = new object[1]
|
|
{
|
|
(object) p_strNumSolicitud
|
|
};
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public void eliminarClienteSolicitud()
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
try
|
|
{
|
|
int? pk = this.objclientesolicitudEL.PK;
|
|
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(this.objclientesolicitudEL.PK, Tablas.clientesolicitud, operadorLogico.NONE));
|
|
if (this.objclientesolicitudEL.FKSOLICITUD != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorNUMSOLICITUD(this.objclientesolicitudEL.FKSOLICITUD, operadorLogico.NONE));
|
|
this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, p_arlCondiciones);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public DataSet dsListaClienteSolicitud()
|
|
{
|
|
try
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
this.NombreTabla = Vistas.v_obtenerclientesolicitud.ToString();
|
|
if (this.objclientesolicitudEL.FKREUTILIZA != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorNUMSOLICITUD(this.objclientesolicitudEL.FKREUTILIZA, operadorLogico.OR));
|
|
p_arlCondiciones.Add((object) this.buscarPorNUMSOLICITUD(this.objclientesolicitudEL.FKSOLICITUD, operadorLogico.AND));
|
|
if (this.objclientesolicitudEL.FKTIPOPROPIETARIO != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorFK(this.objclientesolicitudEL.FKTIPOPROPIETARIO, Tablas.tipopropietario, operadorLogico.OR));
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, p_arlCondiciones, (string) null, (string) null);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
private CondicionDAL buscarPorNUMSOLICITUD(
|
|
int p_nNUMSOLICITUD,
|
|
operadorLogico operador)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = t_dis_clientesolicitud.FKSOLICITUD.ToString(),
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
operadorLogico = operador,
|
|
valorDerecho = (object) p_nNUMSOLICITUD
|
|
};
|
|
}
|
|
}
|
|
}
|