99 lines
4.2 KiB
C#
99 lines
4.2 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Data.Common;
|
|
using System.Configuration;
|
|
using AyAEL.TRA;
|
|
using AyADAL;
|
|
using System.Collections.Specialized;
|
|
using Helper;
|
|
|
|
|
|
|
|
namespace AyABL.TRA
|
|
{
|
|
public class requisitoBL : AyABL
|
|
{
|
|
#region Constructores
|
|
|
|
public requisitoBL()
|
|
{
|
|
objrequisitoEL = new requisitoEL();
|
|
|
|
this.NombreConeccionBD = BASESDEDATOS.SIGPC.ToString();
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Atributos
|
|
|
|
public requisitoEL objrequisitoEL
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
private static NameValueCollection appSettings = ConfigurationManager.AppSettings;
|
|
|
|
#endregion
|
|
|
|
#region Metodos
|
|
public RequisitosList ConsultarRequisitosCFIA()
|
|
{
|
|
RequisitosList requisitosList = new RequisitosList();
|
|
DbParameter[] p_dbpParametros = new DbParameter[2];
|
|
try
|
|
{
|
|
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 = "@P_STATUS";
|
|
p_dbpParametros[0].DbType = DbType.String;
|
|
p_dbpParametros[0].Size = 2;
|
|
p_dbpParametros[0].Direction = ParameterDirection.InputOutput;
|
|
p_dbpParametros[1].ParameterName = "@P_MENSAJE";
|
|
p_dbpParametros[1].DbType = DbType.String;
|
|
p_dbpParametros[1].Size = 500;
|
|
p_dbpParametros[1].Direction = ParameterDirection.InputOutput;
|
|
DataSet dataSet = this.baseDAL.dsProcedimientoAlmacenado("PA_CONSULTARREQUISITOSCFIA", ref p_dbpParametros, this.NombreConeccionBD);
|
|
if (dataSet.Tables[0].Rows.Count > 0)
|
|
{
|
|
foreach (DataRow row in (InternalDataCollectionBase)dataSet.Tables[0].Rows)
|
|
{
|
|
this.objrequisitoEL = new requisitoEL();
|
|
this.objrequisitoEL.PKREQUISITO = int.Parse(row["PKREQUISITO"].ToString());
|
|
this.objrequisitoEL.DESCRIPCIONREQUISITO = row["DESCRIPCIONREQUISITO"].ToString();
|
|
this.objrequisitoEL.PRORROGA = bool.Parse(row["PRORROGAREQUISITO"].ToString());
|
|
this.objrequisitoEL.REVISION = bool.Parse(row["REVISIONREQUISITO"].ToString());
|
|
this.objrequisitoEL.POSEEDOR = bool.Parse(row["POSEEDORREQUISITO"].ToString());
|
|
this.objrequisitoEL.SEGREGACION = bool.Parse(row["SEGREGACIONREQUISITO"].ToString());
|
|
this.objrequisitoEL.DERECHOS = bool.Parse(row["DERECHOSREQUISITO"].ToString());
|
|
this.objrequisitoEL.AUTORIZADOLEGAL = bool.Parse(row["AUTORIZADOLEGALREQUISITO"].ToString());
|
|
this.objrequisitoEL.FKNATURALEZAINMUEBLE = int.Parse(row["FKNATURALEZAINMUEBLE"].ToString());
|
|
this.objrequisitoEL.FKTIPOPROPIETARIO = int.Parse(row["FKTIPOPROPIETARIO"].ToString());
|
|
this.objrequisitoEL.FKTIPOINSPECCION = int.Parse(row["FKTIPOINSPECCION"].ToString());
|
|
requisitosList.datos.Add(this.objrequisitoEL);
|
|
}
|
|
}
|
|
requisitosList.NumeroError = p_dbpParametros[0].Value.ToString();
|
|
requisitosList.MensajeError = p_dbpParametros[1].Value.ToString();
|
|
return requisitosList;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
requisitosList.NumeroError = p_dbpParametros[14].Value.ToString() + " : Error del sitio web: " + ex.HResult.ToString();
|
|
requisitosList.MensajeError = p_dbpParametros[15].Value.ToString() + " : Error del sitio web: " + ex.Message.ToString();
|
|
requisitosList.datos.Add(this.objrequisitoEL);
|
|
return requisitosList;
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
}
|
|
}
|