Solución FROPI
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C491
This commit is contained in:
parent
94c8c3f57b
commit
50700fd78b
1065 changed files with 1199697 additions and 0 deletions
153
AYA.FROPI/AyABL/ADM/CatalogoBL.cs
Normal file
153
AYA.FROPI/AyABL/ADM/CatalogoBL.cs
Normal file
|
|
@ -0,0 +1,153 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class CatalogoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public CatalogoBL()
|
||||||
|
{
|
||||||
|
objCatalogoEL = new CatalogoEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.catalogo.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public CatalogoEL objCatalogoEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_objCatalogoEL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
|
||||||
|
public DataSet getCatalogo()
|
||||||
|
{
|
||||||
|
DataSet dsCatalogo = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objCatalogoEL.Padre != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPadre(objCatalogoEL.Padre, Tablas.catalogo, operadorLogico.AND, operadorGeneral.EQUAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(objCatalogoEL.ASTATE, Tablas.catalogo, operadorLogico.NONE));
|
||||||
|
|
||||||
|
dsCatalogo = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsCatalogo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye los datos del Catalogo en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// SEG/Catalogo/frwCatalogo.aspx
|
||||||
|
|
||||||
|
public bool insertarCatalogo()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.catalogo.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.catalogo.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objCatalogoEL.Padre,
|
||||||
|
objCatalogoEL.Nombre};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos del Catalogo en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarCatalogo()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objCatalogoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objCatalogoEL.PK, Tablas.catalogo, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.catalogo.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.catalogo.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objCatalogoEL.Padre,
|
||||||
|
objCatalogoEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Catalogo en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool borradoLogicoCatalogo()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objCatalogoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objCatalogoEL.PK, Tablas.catalogo, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.catalogo.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objCatalogoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
153
AYA.FROPI/AyABL/ADM/ComplejidadBL.cs
Normal file
153
AYA.FROPI/AyABL/ADM/ComplejidadBL.cs
Normal file
|
|
@ -0,0 +1,153 @@
|
||||||
|
using AyADAL;
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class ComplejidadBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public ComplejidadBL()
|
||||||
|
{
|
||||||
|
objComplejidadEL = new ComplejidadEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.complejidad.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public ComplejidadEL objComplejidadEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_objDependenciaEL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
|
||||||
|
public DataSet getComplejidad(ArrayList p_arlCondicionesBuscador)
|
||||||
|
{
|
||||||
|
DataSet dsEstado = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
cargarCondicionBusqueda(arlCondiciones, p_arlCondicionesBuscador);
|
||||||
|
|
||||||
|
if (objComplejidadEL.Padre != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPadre(objComplejidadEL.Padre, Tablas.complejidad, operadorLogico.AND, operadorGeneral.EQUAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objComplejidadEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objComplejidadEL.PK, Tablas.complejidad, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
dsEstado = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsEstado;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye los datos del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// SEG/Dependencia/frwDependencia.aspx
|
||||||
|
|
||||||
|
public bool insertarComplejidad()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
int intPK = SiguientePKAutoIncremental(this.NombreTabla, this.NombreConeccionBD);
|
||||||
|
this.CamposTabla = Constraints.PK.ToString() + Tablas.complejidad.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.complejidad.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objComplejidadEL.PK,
|
||||||
|
objComplejidadEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarComplejidad()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objComplejidadEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objComplejidadEL.PK, Tablas.complejidad, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Constraints.PK.ToString() + Tablas.complejidad.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.complejidad.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objComplejidadEL.PK,
|
||||||
|
objComplejidadEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el complejidad del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool borradoLogicoComplejidad()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objComplejidadEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objComplejidadEL.PK, Tablas.complejidad, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.complejidad.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objComplejidadEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
196
AYA.FROPI/AyABL/ADM/DependenciaBL.cs
Normal file
196
AYA.FROPI/AyABL/ADM/DependenciaBL.cs
Normal file
|
|
@ -0,0 +1,196 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class DependenciaBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public DependenciaBL()
|
||||||
|
{
|
||||||
|
objDependenciaEL = new DependenciaEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.dependencia.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public DependenciaEL objDependenciaEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_objDependenciaEL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
|
||||||
|
public DataSet getDependencia(ArrayList p_arlCondicionesBuscador)
|
||||||
|
{
|
||||||
|
DataSet dsDependencia = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
cargarCondicionBusqueda(arlCondiciones, p_arlCondicionesBuscador);
|
||||||
|
|
||||||
|
if (objDependenciaEL.Padre != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPadre(objDependenciaEL.Padre, Tablas.dependencia, operadorLogico.AND, operadorGeneral.EQUAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objDependenciaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objDependenciaEL.PK, Tablas.dependencia, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.dependencia, operadorLogico.NONE));
|
||||||
|
|
||||||
|
dsDependencia = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, " Order by NOMBREDEPENDENCIA");
|
||||||
|
|
||||||
|
return dsDependencia;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye los datos del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// SEG/Dependencia/frwDependencia.aspx
|
||||||
|
|
||||||
|
public bool insertarDependencia()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int intPK = SiguientePKAutoIncremental(this.NombreTabla, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
string strNuevoCodigo = getCodigoDependenciaPadre() + intPK.ToString();
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.dependencia.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.dependencia.ToString().ToUpper() + ", " +
|
||||||
|
t_adm_dependencia.CODIGOACCESO.ToString() + Tablas.dependencia.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objDependenciaEL.Padre,
|
||||||
|
objDependenciaEL.Nombre,
|
||||||
|
strNuevoCodigo+ ";"
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarDependencia()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objDependenciaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objDependenciaEL.PK, Tablas.dependencia, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.dependencia.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.dependencia.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objDependenciaEL.Padre,
|
||||||
|
objDependenciaEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool borradoLogicoDependencia()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objDependenciaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objDependenciaEL.PK, Tablas.dependencia, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.dependencia.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objDependenciaEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Devuelve el prefijo de una dependencia X
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public string getCodigoDependenciaPadre()
|
||||||
|
{
|
||||||
|
string prefijoOrganizacion = string.Empty;
|
||||||
|
DataSet dsDependencia = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
|
||||||
|
if (objDependenciaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(this.objDependenciaEL.PK, Tablas.dependencia, operadorLogico.NONE));
|
||||||
|
|
||||||
|
this.CamposTabla = t_adm_dependencia.CODIGOACCESO.ToString() + Tablas.dependencia.ToString().ToUpper();
|
||||||
|
|
||||||
|
dsDependencia = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones,
|
||||||
|
null, null);
|
||||||
|
|
||||||
|
if (dsDependencia.Tables[0].Rows.Count > 0)
|
||||||
|
{
|
||||||
|
prefijoOrganizacion = dsDependencia.Tables[0].Rows[0]["CODIGOACCESODEPENDENCIA"].ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return prefijoOrganizacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
149
AYA.FROPI/AyABL/ADM/EstadoBL.cs
Normal file
149
AYA.FROPI/AyABL/ADM/EstadoBL.cs
Normal file
|
|
@ -0,0 +1,149 @@
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using AyADAL;
|
||||||
|
using System.Data;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class EstadoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public EstadoBL()
|
||||||
|
{
|
||||||
|
objEstadoEL = new EstadoEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.estado.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public EstadoEL objEstadoEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_objDependenciaEL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
|
||||||
|
public DataSet getEstado(ArrayList p_arlCondicionesBuscador)
|
||||||
|
{
|
||||||
|
DataSet dsEstado = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
cargarCondicionBusqueda(arlCondiciones, p_arlCondicionesBuscador);
|
||||||
|
|
||||||
|
if (objEstadoEL.Padre != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPadre(objEstadoEL.Padre, Tablas.estado, operadorLogico.AND, operadorGeneral.EQUAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objEstadoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objEstadoEL.PK, Tablas.estado, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
dsEstado = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null,null);
|
||||||
|
|
||||||
|
return dsEstado;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye los datos del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// SEG/Dependencia/frwDependencia.aspx
|
||||||
|
|
||||||
|
public bool insertarEstado()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
int intPK = SiguientePKAutoIncremental(this.NombreTabla, this.NombreConeccionBD);
|
||||||
|
this.CamposTabla = Constraints.PK.ToString() + Tablas.estado.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.estado.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objEstadoEL.PK,
|
||||||
|
objEstadoEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarEstado()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objEstadoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objEstadoEL.PK, Tablas.estado, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Constraints.PK.ToString() + Tablas.estado.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.estado.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objEstadoEL.PK,
|
||||||
|
objEstadoEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool borradoLogicoDependencia()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objEstadoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objEstadoEL.PK, Tablas.estado, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.estado.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objEstadoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
155
AYA.FROPI/AyABL/ADM/FuenteFinanciamientoBL.cs
Normal file
155
AYA.FROPI/AyABL/ADM/FuenteFinanciamientoBL.cs
Normal file
|
|
@ -0,0 +1,155 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class FuenteFinanciamientoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public FuenteFinanciamientoBL()
|
||||||
|
{
|
||||||
|
objFuenteFinanciamientoEL = new FuenteFinanciamientoEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.fuentefinanciamiento.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public FuenteFinanciamientoEL objFuenteFinanciamientoEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
|
||||||
|
public DataSet getFuenteFinanciamiento()
|
||||||
|
{
|
||||||
|
DataSet dsFuenteFinanciamiento = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objFuenteFinanciamientoEL.Padre != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPadre(objFuenteFinanciamientoEL.Padre, Tablas.fuentefinanciamiento, operadorLogico.AND, operadorGeneral.EQUAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objFuenteFinanciamientoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objFuenteFinanciamientoEL.PK, Tablas.fuentefinanciamiento, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.fuentefinanciamiento, operadorLogico.NONE));
|
||||||
|
|
||||||
|
dsFuenteFinanciamiento = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsFuenteFinanciamiento;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye los datos del FuenteFinanciamiento en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// SEG/FuenteFinanciamiento/frwFuenteFinanciamiento.aspx
|
||||||
|
|
||||||
|
public bool insertarFuenteFinanciamiento()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.fuentefinanciamiento.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.fuentefinanciamiento.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objFuenteFinanciamientoEL.Padre,
|
||||||
|
objFuenteFinanciamientoEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos del FuenteFinanciamiento en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarFuenteFinanciamiento()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objFuenteFinanciamientoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objFuenteFinanciamientoEL.PK, Tablas.fuentefinanciamiento, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.fuentefinanciamiento.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.fuentefinanciamiento.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objFuenteFinanciamientoEL.Padre,
|
||||||
|
objFuenteFinanciamientoEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del FuenteFinanciamiento en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarEstadoFuenteFinanciamiento()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objFuenteFinanciamientoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objFuenteFinanciamientoEL.PK, Tablas.fuentefinanciamiento, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.fuentefinanciamiento.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objFuenteFinanciamientoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
152
AYA.FROPI/AyABL/ADM/PartidaPresupuestariaBL.cs
Normal file
152
AYA.FROPI/AyABL/ADM/PartidaPresupuestariaBL.cs
Normal file
|
|
@ -0,0 +1,152 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class PartidaPresupuestariaBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public PartidaPresupuestariaBL()
|
||||||
|
{
|
||||||
|
objPartidaPresupuestariaEL = new PartidaPresupuestariaEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.partidapresupuestaria.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public PartidaPresupuestariaEL objPartidaPresupuestariaEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrPartidaPresupuestaria.aspx
|
||||||
|
|
||||||
|
public DataSet getPartidaPresupuestaria()
|
||||||
|
{
|
||||||
|
DataSet dsPartidaPresupuestaria = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
|
||||||
|
if (objPartidaPresupuestariaEL.PK == 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.partidapresupuestaria, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objPartidaPresupuestariaEL.PK > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objPartidaPresupuestariaEL.PK, Tablas.partidapresupuestaria, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
dsPartidaPresupuestaria = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsPartidaPresupuestaria;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Insertar datos en la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarPartidaPresupuestaria()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.CamposTabla = t_adm_partidapresupuestaria.INDICE.ToString() + Tablas.partidapresupuestaria.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.partidapresupuestaria.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objPartidaPresupuestariaEL.Indice,
|
||||||
|
objPartidaPresupuestariaEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarPartidaPresupuestaria()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objPartidaPresupuestariaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objPartidaPresupuestariaEL.PK, Tablas.partidapresupuestaria, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_adm_partidapresupuestaria.INDICE.ToString() + Tablas.partidapresupuestaria.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.partidapresupuestaria.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objPartidaPresupuestariaEL.Indice,
|
||||||
|
objPartidaPresupuestariaEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Borrado logico de la PartidaPresupuestaria en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool borradoLogicoPartidaPresupuestaria()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objPartidaPresupuestariaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objPartidaPresupuestariaEL.PK, Tablas.partidapresupuestaria, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.partidapresupuestaria.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objPartidaPresupuestariaEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
145
AYA.FROPI/AyABL/ADM/ProcedenciaCentrogestorBL.cs
Normal file
145
AYA.FROPI/AyABL/ADM/ProcedenciaCentrogestorBL.cs
Normal file
|
|
@ -0,0 +1,145 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class ProcedenciaCentrogestorBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public ProcedenciaCentrogestorBL()
|
||||||
|
{
|
||||||
|
objProcedenciaCentrogestorEL = new ProcedenciaCentrogestorEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.procedenciacentrogestor.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public ProcedenciaCentrogestorEL objProcedenciaCentrogestorEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_objProcedenciaCentrogestorEL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
|
||||||
|
public DataSet GetProcedenciaCentrogestor()
|
||||||
|
{
|
||||||
|
DataSet dsProcedenciaCentrogestor = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objProcedenciaCentrogestorEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objProcedenciaCentrogestorEL.PK, Tablas.procedenciacentrogestor, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
dsProcedenciaCentrogestor = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsProcedenciaCentrogestor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye los datos del ProcedenciaCentrogestor en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// SEG/ProcedenciaCentrogestor/frwProcedenciaCentrogestor.aspx
|
||||||
|
|
||||||
|
public bool insertarProcedenciaCentrogestor()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.procedenciacentrogestor.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objProcedenciaCentrogestorEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos del ProcedenciaCentrogestor en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarProcedenciaCentrogestor()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objProcedenciaCentrogestorEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objProcedenciaCentrogestorEL.PK, Tablas.procedenciacentrogestor, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.procedenciacentrogestor.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objProcedenciaCentrogestorEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del ProcedenciaCentrogestor en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarEstadoProcedenciaCentrogestor()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objProcedenciaCentrogestorEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objProcedenciaCentrogestorEL.PK, Tablas.procedenciacentrogestor, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.procedenciacentrogestor.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objProcedenciaCentrogestorEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
146
AYA.FROPI/AyABL/ADM/ProgramaBL.cs
Normal file
146
AYA.FROPI/AyABL/ADM/ProgramaBL.cs
Normal file
|
|
@ -0,0 +1,146 @@
|
||||||
|
using AyADAL;
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class ProgramaBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public ProgramaBL()
|
||||||
|
{
|
||||||
|
objProgramaEL = new ProgramaEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.programa.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public ProgramaEL objProgramaEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_objDependenciaEL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
public DataSet getPrograma(ArrayList p_arlCondicionesBuscador)
|
||||||
|
{
|
||||||
|
DataSet dsEstado = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
cargarCondicionBusqueda(arlCondiciones, p_arlCondicionesBuscador);
|
||||||
|
|
||||||
|
if (objProgramaEL.Padre != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPadre(objProgramaEL.Padre, Tablas.programa, operadorLogico.AND, operadorGeneral.EQUAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objProgramaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objProgramaEL.PK, Tablas.programa, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
dsEstado = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsEstado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye los datos del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// SEG/Dependencia/frwDependencia.aspx
|
||||||
|
public bool insertarPrograma()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
int intPK = SiguientePKAutoIncremental(this.NombreTabla, this.NombreConeccionBD);
|
||||||
|
this.CamposTabla = Constraints.PK.ToString() + Tablas.programa.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.programa.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objProgramaEL.PK,
|
||||||
|
objProgramaEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool actualizarPrograma()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objProgramaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objProgramaEL.PK, Tablas.programa, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Constraints.PK.ToString() + Tablas.programa.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.programa.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objProgramaEL.PK,
|
||||||
|
objProgramaEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el programa del Dependencia en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool borradoLogicoPrograma()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objProgramaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objProgramaEL.PK, Tablas.programa, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.programa.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objProgramaEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
158
AYA.FROPI/AyABL/ADM/RecursoBL.cs
Normal file
158
AYA.FROPI/AyABL/ADM/RecursoBL.cs
Normal file
|
|
@ -0,0 +1,158 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class RecursoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public RecursoBL()
|
||||||
|
{
|
||||||
|
objRecursoEL = new RecursoEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.recurso.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public RecursoEL objRecursoEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_objRecursoEL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
|
||||||
|
public DataSet getRecurso()
|
||||||
|
{
|
||||||
|
DataSet dsRecurso = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objRecursoEL.Padre != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPadre(objRecursoEL.Padre, Tablas.recurso, operadorLogico.AND, operadorGeneral.EQUAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objRecursoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objRecursoEL.PK, Tablas.recurso, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.recurso, operadorLogico.NONE));
|
||||||
|
|
||||||
|
dsRecurso = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsRecurso;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye los datos del Recurso en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// SEG/Recurso/frwRecurso.aspx
|
||||||
|
|
||||||
|
public bool insertarRecurso()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.recurso.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.recurso.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objRecursoEL.Padre,
|
||||||
|
objRecursoEL.Nombre};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos del Recurso en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarRecurso()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objRecursoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objRecursoEL.PK, Tablas.recurso, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.recurso.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.recurso.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objRecursoEL.Padre,
|
||||||
|
objRecursoEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Recurso en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool borradoLogicoRecurso()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objRecursoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objRecursoEL.PK, Tablas.recurso, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.recurso.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objRecursoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
180
AYA.FROPI/AyABL/ADM/RegionBL.cs
Normal file
180
AYA.FROPI/AyABL/ADM/RegionBL.cs
Normal file
|
|
@ -0,0 +1,180 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class RegionBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public RegionBL()
|
||||||
|
{
|
||||||
|
objRegionEL = new RegionEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.region.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public RegionEL objRegionEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrRegion.aspx
|
||||||
|
|
||||||
|
public DataSet getRegion()
|
||||||
|
{
|
||||||
|
DataSet dsRegion = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objRegionEL.Padre != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPadre(objRegionEL.Padre, Tablas.region, operadorLogico.AND, operadorGeneral.EQUAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objRegionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objRegionEL.PK, Tablas.region, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.region, operadorLogico.NONE));
|
||||||
|
|
||||||
|
dsRegion = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsRegion;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Insertar datos en la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarRegion()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.region.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.region.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objRegionEL.Padre,
|
||||||
|
objRegionEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarRegion()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objRegionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objRegionEL.PK, Tablas.region, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.region.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.region.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objRegionEL.Padre,
|
||||||
|
objRegionEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Borrado logico de la Region en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool borradoLogicoRegion()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objRegionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objRegionEL.PK, Tablas.region, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.region.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objRegionEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los roles
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet listarRegiones()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objRegionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objRegionEL.PK, Tablas.rol, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.objRegionEL.Padre == -1)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPadre(objRegionEL.Padre, Tablas.region, operadorLogico.NONE, operadorGeneral.EQUAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorActivo(objRegionEL.ASTATE, Tablas.rol, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsRegion = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKREGION DESC ");
|
||||||
|
|
||||||
|
return dsRegion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
145
AYA.FROPI/AyABL/ADM/TipoRecursoHumanoBL.cs
Normal file
145
AYA.FROPI/AyABL/ADM/TipoRecursoHumanoBL.cs
Normal file
|
|
@ -0,0 +1,145 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class TipoRecursoHumanoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public TipoRecursoHumanoBL()
|
||||||
|
{
|
||||||
|
objTipoRecursoHumanoEL = new TipoRecursoHumanoEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.tiporecursohumano.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public TipoRecursoHumanoEL objTipoRecursoHumanoEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_objTipoRecursoHumanoEL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
|
||||||
|
public DataSet GetTipoRecursoHumano()
|
||||||
|
{
|
||||||
|
DataSet dsTipoRecursoHumano = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objTipoRecursoHumanoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objTipoRecursoHumanoEL.PK, Tablas.tiporecursohumano, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
dsTipoRecursoHumano = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsTipoRecursoHumano;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye los datos del TipoRecursoHumano en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// SEG/TipoRecursoHumano/frwTipoRecursoHumano.aspx
|
||||||
|
|
||||||
|
public bool insertarTipoRecursoHumano()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.tiporecursohumano.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objTipoRecursoHumanoEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos del TipoRecursoHumano en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarTipoRecursoHumano()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objTipoRecursoHumanoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objTipoRecursoHumanoEL.PK, Tablas.tiporecursohumano, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.tiporecursohumano.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objTipoRecursoHumanoEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del TipoRecursoHumano en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarEstadoTipoRecursoHumano()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objTipoRecursoHumanoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objTipoRecursoHumanoEL.PK, Tablas.tiporecursohumano, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.tiporecursohumano.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objTipoRecursoHumanoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
259
AYA.FROPI/AyABL/ADM/UbicacionBL.cs
Normal file
259
AYA.FROPI/AyABL/ADM/UbicacionBL.cs
Normal file
|
|
@ -0,0 +1,259 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
|
||||||
|
using AyAEL.ADM;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.ADM
|
||||||
|
{
|
||||||
|
public class UbicacionBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public UbicacionBL()
|
||||||
|
{
|
||||||
|
objUbicacionEL = new UbicacionEL();
|
||||||
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.ubicacion.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public UbicacionEL objUbicacionEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_objUbicacionEL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
|
||||||
|
public DataSet getUbicacion()
|
||||||
|
{
|
||||||
|
DataSet dsUbicacion = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objUbicacionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objUbicacionEL.PK, Tablas.ubicacion, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objUbicacionEL.Padre != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPadre(objUbicacionEL.Padre, Tablas.ubicacion, operadorLogico.NONE, operadorGeneral.EQUAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dsUbicacion = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsUbicacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getUbicacion(int PKPROYECTO)
|
||||||
|
{
|
||||||
|
DataSet dsUbicacion = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
arlCondiciones.Add(buscarPorFK(PKPROYECTO, Tablas.proyecto, operadorLogico.NONE));
|
||||||
|
dsUbicacion = baseDAL.EjecutarConsulta(Vistas.v_ubicacion.ToString(), CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsUbicacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Metodo encargado de obtener un dataset con las ubicaciones por proyecto
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="FKPROYECTO"> Corresponde a la llave del proyecto que desea consultar</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public DataSet getUbicacionProyecto(int FKPROYECTO)
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
DataSet dsProyecto = baseDAL.ejecutarConsulta("SELECT proyecto.FKPROYECTO, provincias.PKUBICACION AS FKUBICACIONPROVINCIA, provincias.NOMBREUBICACION AS PROVINCIA, " +
|
||||||
|
"cantones.NOMBREUBICACION AS CANTON, proyecto.FKUBICACIONDISTRITO, distritos.NOMBREUBICACION AS DISTRITO, " +
|
||||||
|
"proyecto.FKUBICACIONBARRIO, barrios.NOMBREUBICACION AS BARRIO FROM dbo.t_agp_ubicacion AS proyecto INNER JOIN " +
|
||||||
|
"dbo.t_adm_ubicacion AS distritos ON proyecto.FKUBICACIONDISTRITO = distritos.PKUBICACION LEFT JOIN " +
|
||||||
|
"dbo.t_adm_ubicacion AS cantones ON distritos.PADREUBICACION = cantones.PKUBICACION LEFT JOIN " +
|
||||||
|
"dbo.t_adm_ubicacion AS provincias ON cantones.PADREUBICACION = provincias.PKUBICACION LEFT JOIN " +
|
||||||
|
"dbo.t_adm_ubicacion AS barrios ON proyecto.FKUBICACIONBARRIO = barrios.PKUBICACION " +
|
||||||
|
"WHERE proyecto.ASTATEUBICACION = 1 AND proyecto.FKPROYECTO = " + FKPROYECTO, arlCondiciones, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return dsProyecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool validarUbicacionProyecto(UbicacionEL pObjUbicacionEL, string pCamposTabla, string pNombreTabla, object[] pValores)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
arlCondiciones.Add(buscarPorFK(pObjUbicacionEL.FK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.ubicacion, operadorLogico.AND));
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorColumna(pObjUbicacionEL.FKUBICACIONDISTRITO.ToString(),
|
||||||
|
"FKUBICACIONDISTRITO",
|
||||||
|
pObjUbicacionEL.FKUBICACIONBARRIO != 0 ? operadorLogico.AND : operadorLogico.NONE));
|
||||||
|
|
||||||
|
if (pObjUbicacionEL.FKUBICACIONBARRIO != 0)
|
||||||
|
arlCondiciones.Add(buscarPorColumna(pObjUbicacionEL.FKUBICACIONBARRIO.ToString(), "FKUBICACIONBARRIO", operadorLogico.NONE));
|
||||||
|
|
||||||
|
var dsResultado = baseDAL.EjecutarConsulta(pNombreTabla, pCamposTabla, this.NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
if (dsResultado != null && dsResultado.Tables.Count > 0 && dsResultado.Tables[0].Rows.Count > 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye los datos del Ubicacion en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// SEG/Ubicacion/frwUbicacion.aspx
|
||||||
|
public bool insertarUbicacion()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.ubicacion.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.ubicacion.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objUbicacionEL.Padre,
|
||||||
|
objUbicacionEL.Nombre};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
blnEjecutado = true;
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool InsertarUbicacionProyecto()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
this.CamposTabla = objUbicacionEL.FKUBICACIONBARRIO == 0 ? "FKPROYECTO, FKUBICACIONDISTRITO,ASTATEUBICACION" : "FKPROYECTO, FKUBICACIONDISTRITO, FKUBICACIONBARRIO, ASTATEUBICACION";
|
||||||
|
|
||||||
|
this.ValoresCampos = objUbicacionEL.FKUBICACIONBARRIO == 0 ? new object[]{objUbicacionEL.FK,
|
||||||
|
objUbicacionEL.FKUBICACIONDISTRITO,
|
||||||
|
1} :
|
||||||
|
|
||||||
|
new object[]{objUbicacionEL.FK,
|
||||||
|
objUbicacionEL.FKUBICACIONDISTRITO,
|
||||||
|
objUbicacionEL.FKUBICACIONBARRIO,
|
||||||
|
1}; ;
|
||||||
|
|
||||||
|
this.NombreTabla = Modulos.t_agp_.ToString() + Tablas.ubicacion.ToString();
|
||||||
|
|
||||||
|
if(!validarUbicacionProyecto(objUbicacionEL,this.CamposTabla,this.NombreTabla,this.ValoresCampos))
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos del Ubicacion en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool actualizarUbicacion()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objUbicacionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objUbicacionEL.PK, Tablas.ubicacion, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.PADRE.ToString() + Tablas.ubicacion.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.ubicacion.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objUbicacionEL.Padre,
|
||||||
|
objUbicacionEL.Nombre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Ubicacion en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool borradoLogicoUbicacion()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objUbicacionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objUbicacionEL.PK, Tablas.ubicacion, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.ubicacion.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objUbicacionEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool borradoLogicoUbicacionProyecto()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorFK(objUbicacionEL.FK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorColumna(objUbicacionEL.FKUBICACIONDISTRITO.ToString(),
|
||||||
|
"FKUBICACIONDISTRITO",
|
||||||
|
objUbicacionEL.FKUBICACIONBARRIO != 0 ? operadorLogico.AND : operadorLogico.NONE));
|
||||||
|
|
||||||
|
if (objUbicacionEL.FKUBICACIONBARRIO != 0)
|
||||||
|
arlCondiciones.Add(buscarPorColumna(objUbicacionEL.FKUBICACIONBARRIO.ToString(), "FKUBICACIONBARRIO", operadorLogico.NONE));
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.ubicacion.ToString().ToUpper();
|
||||||
|
this.ValoresCampos = new object[] { objUbicacionEL.ASTATE };
|
||||||
|
this.NombreTabla = Modulos.t_agp_.ToString() + Tablas.ubicacion.ToString();
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD,arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
183
AYA.FROPI/AyABL/AGP/ObjetivoEspecificoBL.cs
Normal file
183
AYA.FROPI/AyABL/AGP/ObjetivoEspecificoBL.cs
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.AGP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.AGP
|
||||||
|
{
|
||||||
|
public class ObjetivoEspecificoBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public ObjetivoEspecificoBL()
|
||||||
|
{
|
||||||
|
objObjetivoEspecificoEL = new ObjetivoEspecificoEL();
|
||||||
|
this.NombreTabla = Modulos.t_agp_.ToString() + Tablas.objetivoespecifico.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public ObjetivoEspecificoEL objObjetivoEspecificoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del ObjetivoEspecifico
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarObjetivo()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_objetivoespecifico.NUMERO.ToString() + Tablas.objetivoespecifico.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.objetivoespecifico.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objObjetivoEspecificoEL.Numero,
|
||||||
|
objObjetivoEspecificoEL.Descripcion,
|
||||||
|
objObjetivoEspecificoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del ObjetivoEspecifico
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarObjetivo()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
//CAmbio a buscar por fk
|
||||||
|
if (objObjetivoEspecificoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objObjetivoEspecificoEL.PK, Tablas.objetivoespecifico, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_objetivoespecifico.NUMERO.ToString() + Tablas.objetivoespecifico.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.objetivoespecifico.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_objetivoespecifico.CUMPLIDO.ToString() + Tablas.objetivoespecifico.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objObjetivoEspecificoEL.Numero,
|
||||||
|
objObjetivoEspecificoEL.Descripcion,
|
||||||
|
objObjetivoEspecificoEL.Cumplido,
|
||||||
|
objObjetivoEspecificoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del ObjetivoEspecifico
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoObjetivo()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objObjetivoEspecificoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objObjetivoEspecificoEL.PK, Tablas.objetivoespecifico, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.objetivoespecifico.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objObjetivoEspecificoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los ObjetivoEspecifico
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getObjetivoEspecifico()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objObjetivoEspecificoEL.PK > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objObjetivoEspecificoEL.PK, Tablas.objetivoespecifico, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.objObjetivoEspecificoEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objObjetivoEspecificoEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.objetivoespecifico, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsObjetivoEspecifico = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY NUMEROOBJETIVOESPECIFICO ASC ");
|
||||||
|
|
||||||
|
return dsObjetivoEspecifico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getObjetivoEspecificoFicha()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorFK(objObjetivoEspecificoEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorCumplido(objObjetivoEspecificoEL.Cumplido, Tablas.objetivoespecifico, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsObjetivoEspecifico = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY NUMEROOBJETIVOESPECIFICO ASC ");
|
||||||
|
|
||||||
|
return dsObjetivoEspecifico;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorCumplido(Nullable<bool> p_blnCumplido, Tablas p_nombreTabla, operadorLogico operador)
|
||||||
|
{
|
||||||
|
int intValor = 0;
|
||||||
|
|
||||||
|
//Se utiliza para hacer la conversión cuando el valor es booleano
|
||||||
|
if (p_blnCumplido == true)
|
||||||
|
intValor = 1;
|
||||||
|
else
|
||||||
|
intValor = 0;
|
||||||
|
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = t_agp_objetivoespecifico.CUMPLIDO.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = intValor;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
532
AYA.FROPI/AyABL/AGP/ProyectoBL.cs
Normal file
532
AYA.FROPI/AyABL/AGP/ProyectoBL.cs
Normal file
|
|
@ -0,0 +1,532 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.AGP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.AGP
|
||||||
|
{
|
||||||
|
public class ProyectoBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public ProyectoBL()
|
||||||
|
{
|
||||||
|
objProyectoEL = new ProyectoEL();
|
||||||
|
this.NombreTabla = Modulos.t_agp_.ToString() + Tablas.proyecto.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public ProyectoEL objProyectoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Proyecto
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarProyecto()
|
||||||
|
{
|
||||||
|
int intEjecutado = 0;
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.NUMEROBPIP.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.NUMEROACCIONESTRATEGICA.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.METAACCIONESTRATEGICA.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.BENEFICIARIODIRECTO.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.BENEFICIARIOINDIRECTO.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.METAINSTITUCIONAL.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.OBJETIVOGENERAL.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.CODIGOACCESO.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.CANTON.ToString().ToUpper() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.DISTRITO.ToString().ToUpper() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.dependencia.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.SECTOR.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.AREATEMATICA.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.AREAINFLUENCIA.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.CATEGORIA.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.PROVINCIA.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.REGION.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.PRIORIDAD.ToString().ToUpper() + "," +
|
||||||
|
t_agp_proyecto.COSTOESTIMADO.ToString() + Tablas.proyecto.ToString().ToUpper() + "," +
|
||||||
|
t_agp_proyecto.PATROCINADOR.ToString() + Tablas.proyecto.ToString().ToUpper() + "," +
|
||||||
|
t_agp_proyecto.LIDER.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objProyectoEL.Nombre,
|
||||||
|
objProyectoEL.NumeroBPIP,
|
||||||
|
objProyectoEL.NumeroAccionEstrategica,
|
||||||
|
objProyectoEL.MetaAccionEstrategica,
|
||||||
|
objProyectoEL.BeneficiarioDirecto,
|
||||||
|
objProyectoEL.BeneficiarioIndirecto,
|
||||||
|
objProyectoEL.MetaInstitucional,
|
||||||
|
objProyectoEL.Descripcion,
|
||||||
|
objProyectoEL.ObjetivoGeneral,
|
||||||
|
objProyectoEL.CodigoAcceso,
|
||||||
|
objProyectoEL.Canton,
|
||||||
|
objProyectoEL.Distrito,
|
||||||
|
objProyectoEL.Dependencia,
|
||||||
|
objProyectoEL.Sector,
|
||||||
|
objProyectoEL.AreaTematica,
|
||||||
|
objProyectoEL.AreaInfluencia,
|
||||||
|
objProyectoEL.Categoria,
|
||||||
|
objProyectoEL.Provincia,
|
||||||
|
objProyectoEL.Region,
|
||||||
|
objProyectoEL.Prioridad,
|
||||||
|
objProyectoEL.TotalEstimado,
|
||||||
|
objProyectoEL.Patrocinador,
|
||||||
|
objProyectoEL.Lider
|
||||||
|
};
|
||||||
|
|
||||||
|
intEjecutado = baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return intEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Proyecto
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.NUMEROBPIP.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.NUMEROACCIONESTRATEGICA.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.METAACCIONESTRATEGICA.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.BENEFICIARIODIRECTO.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.BENEFICIARIOINDIRECTO.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.METAINSTITUCIONAL.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.OBJETIVOGENERAL.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.dependencia.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.SECTOR.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.AREATEMATICA.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.AREAINFLUENCIA.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.CATEGORIA.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.REGION.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_agp_proyecto.PRIORIDAD.ToString().ToUpper() + "," +
|
||||||
|
t_agp_proyecto.COSTOESTIMADO.ToString() + Tablas.proyecto.ToString().ToUpper() + "," +
|
||||||
|
t_agp_proyecto.PATROCINADOR.ToString() + Tablas.proyecto.ToString().ToUpper() + "," +
|
||||||
|
t_agp_proyecto.LIDER.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objProyectoEL.Nombre,
|
||||||
|
objProyectoEL.NumeroBPIP,
|
||||||
|
objProyectoEL.NumeroAccionEstrategica,
|
||||||
|
objProyectoEL.MetaAccionEstrategica,
|
||||||
|
objProyectoEL.BeneficiarioDirecto,
|
||||||
|
objProyectoEL.BeneficiarioIndirecto,
|
||||||
|
objProyectoEL.MetaInstitucional,
|
||||||
|
objProyectoEL.Descripcion,
|
||||||
|
objProyectoEL.ObjetivoGeneral,
|
||||||
|
objProyectoEL.Dependencia,
|
||||||
|
objProyectoEL.Sector,
|
||||||
|
objProyectoEL.AreaTematica,
|
||||||
|
objProyectoEL.AreaInfluencia,
|
||||||
|
objProyectoEL.Categoria,
|
||||||
|
objProyectoEL.Region,
|
||||||
|
objProyectoEL.Prioridad,
|
||||||
|
objProyectoEL.TotalEstimado,
|
||||||
|
objProyectoEL.Patrocinador,
|
||||||
|
objProyectoEL.Lider
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool actualizarAprobacionProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objProyectoEL.VistoBuenoOficina != false)
|
||||||
|
{
|
||||||
|
CamposTabla = t_agp_proyecto.VISTOBUENOOFICINA.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
ValoresCampos = new object[] { objProyectoEL.VistoBuenoOficina };
|
||||||
|
}
|
||||||
|
if (objProyectoEL.VistoBuenoSubGerencia != false)
|
||||||
|
{
|
||||||
|
CamposTabla = t_agp_proyecto.VISTOBUENOSUBGERENCIA.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
ValoresCampos = new object[] { objProyectoEL.VistoBuenoSubGerencia };
|
||||||
|
}
|
||||||
|
if (objProyectoEL.VistoBuenoPlanificacion != false)
|
||||||
|
{
|
||||||
|
CamposTabla = t_agp_proyecto.VISTOBUENOPLANIFICACION.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
ValoresCampos = new object[] { objProyectoEL.VistoBuenoPlanificacion };
|
||||||
|
}
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool mantenimientoProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_proyecto.CODIGOACCESO.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_proyecto.NUMEROBPIP.ToString() + Tablas.proyecto.ToString().ToUpper() + "," +
|
||||||
|
Constraints.FK.ToString() + Tablas.estado.ToString().ToUpper() + "," +
|
||||||
|
Constraints.FK.ToString() + Tablas.complejidad.ToString().ToUpper() + "," +
|
||||||
|
Constraints.FK.ToString() + Tablas.programa.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objProyectoEL.CodigoAcceso,
|
||||||
|
objProyectoEL.NumeroBPIP,
|
||||||
|
objProyectoEL.Estado,
|
||||||
|
objProyectoEL.Complejidad,
|
||||||
|
objProyectoEL.Programa
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Proyecto
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.proyecto.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objProyectoEL.ASTATE = false };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool actualizaDependenciaProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_proyecto.CODIGOACCESO.ToString() + Tablas.proyecto.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objProyectoEL.CodigoAcceso };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Proyectoes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getProyectos()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.objProyectoEL.CodigoAcceso != null)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorCodigo(objProyectoEL.CodigoAcceso, Tablas.proyecto, operadorLogico.AND, operadorGeneral.LIKE));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.proyecto, operadorLogico.NONE));
|
||||||
|
|
||||||
|
CamposTabla = "*, " + t_agp_proyecto.NUMEROBPIP.ToString() + Tablas.proyecto.ToString().ToUpper() + " + ' - ' + " + Concepto.NOMBRE.ToString() + Tablas.proyecto.ToString().ToUpper() + " AS NOMBREPROYECTO2";
|
||||||
|
this.NombreTabla += " LEFT JOIN t_adm_estado ON FKESTADO = PKESTADO";
|
||||||
|
|
||||||
|
DataSet dsProyecto = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY NOMBREPROYECTO ASC ");
|
||||||
|
|
||||||
|
return dsProyecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getFichaProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorPK(objProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
|
||||||
|
CamposTabla = "*";
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_fichaproyecto.ToString();
|
||||||
|
|
||||||
|
DataSet dsProyecto = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKProyecto ASC ");
|
||||||
|
|
||||||
|
return dsProyecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getListadoProyectos(ArrayList arlCondicionesFiltroBusqueda)
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (arlCondicionesFiltroBusqueda != null)
|
||||||
|
{
|
||||||
|
cargarCondicionBusqueda(arlCondiciones, arlCondicionesFiltroBusqueda);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Este cambio se hizo para el nuevo requerimiento de la minuta, verificar en el listado de intranet
|
||||||
|
if (this.objProyectoEL.CodigoAcceso != null)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorCodigo(objProyectoEL.CodigoAcceso, Tablas.proyecto, operadorLogico.AND, operadorGeneral.LIKE));
|
||||||
|
}
|
||||||
|
|
||||||
|
CamposTabla = "*";
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_fichaproyecto.ToString();
|
||||||
|
|
||||||
|
DataSet dsProyecto = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, "ORDER BY NOMBREPROYECTO");
|
||||||
|
|
||||||
|
return dsProyecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// metodo para verificar si existe un proyecto con el mismo nombre
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool verificaProyecto()
|
||||||
|
{
|
||||||
|
bool blnValorRetornado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objProyectoEL.NumeroBPIP != "Sin Asignar" && objProyectoEL.NumeroBPIP != null)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorNombre(objProyectoEL.Nombre, Tablas.proyecto, operadorLogico.OR));
|
||||||
|
arlCondiciones.Add(buscarPorBPIP(objProyectoEL.NumeroBPIP, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
arlCondiciones.Add(buscarPorNombre(objProyectoEL.Nombre, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.proyecto, operadorLogico.NONE));
|
||||||
|
|
||||||
|
DataSet dsProyecto = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
if (dsProyecto.Tables[0].Rows.Count == 0)
|
||||||
|
blnValorRetornado = true;
|
||||||
|
|
||||||
|
return blnValorRetornado;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Proyecto disponibles para asignar a Líderes de Proyectos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getProyectosParaAsignar()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorVistoBuenoPlanificacion(true, Tablas.proyecto, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsProyecto = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKProyecto ASC ");
|
||||||
|
|
||||||
|
return dsProyecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Proyecto disponibles para asignar a Líderes de Proyectos por Región
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>dataSet</returns>
|
||||||
|
|
||||||
|
public DataSet getProyectosParaAsignar(int pkRegion)
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
DataSet dsProyecto = baseDAL.ejecutarConsulta("SELECT p.PKPROYECTO, p.NOMBREPROYECTO FROM dbo.t_agp_proyecto p " +
|
||||||
|
"JOIN dbo.t_igp_informaciongeneral i ON i.FKPROYECTO = p.PKPROYECTO WHERE i.FKREGION = " + pkRegion + " AND p.ASTATEPROYECTO = 1 AND p.VISTOBUENOPLANIFICACIONPROYECTO = 1",
|
||||||
|
arlCondiciones, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return dsProyecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool actualizaNivel1()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.NombreTabla = Modulos.t_agp_.ToString() + Tablas.proyecto.ToString();
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_proyecto.VISTOBUENOOFICINA.ToString() + Tablas.proyecto.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objProyectoEL.VistoBuenoOficina = true };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool actualizaNivel2()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.NombreTabla = Modulos.t_agp_.ToString() + Tablas.proyecto.ToString();
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_proyecto.VISTOBUENOSUBGERENCIA.ToString() + Tablas.proyecto.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objProyectoEL.VistoBuenoSubGerencia = true };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool actualizaPlanificacion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.NombreTabla = Modulos.t_agp_.ToString() + Tablas.proyecto.ToString();
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_proyecto.VISTOBUENOPLANIFICACION.ToString() + Tablas.proyecto.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objProyectoEL.VistoBuenoPlanificacion = true };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool reinicioAprobaciones()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.NombreTabla = Modulos.t_agp_.ToString() + Tablas.proyecto.ToString();
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_proyecto.VISTOBUENOOFICINA.ToString() + Tablas.proyecto.ToString() + ", " +
|
||||||
|
t_agp_proyecto.VISTOBUENOSUBGERENCIA.ToString() + Tablas.proyecto.ToString() + ", " +
|
||||||
|
t_agp_proyecto.VISTOBUENOPLANIFICACION.ToString() + Tablas.proyecto.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objProyectoEL.VistoBuenoOficina,
|
||||||
|
objProyectoEL.VistoBuenoSubGerencia,
|
||||||
|
objProyectoEL.VistoBuenoPlanificacion};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorNombre(string p_strNombre, Tablas p_nombreTabla, operadorLogico logOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
if (objProyectoEL.NumeroBPIP != "Sin Asignar" && objProyectoEL.NumeroBPIP != null)
|
||||||
|
cdlCondicion.valorIzquierdo = "(" + Concepto.NOMBRE.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
else
|
||||||
|
cdlCondicion.valorIzquierdo = Concepto.NOMBRE.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.valorDerecho = p_strNombre;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorBPIP(string p_strBPIP, Tablas p_nombreTabla, operadorLogico logOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = t_agp_proyecto.NUMEROBPIP.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.valorDerecho = p_strBPIP;
|
||||||
|
cdlCondicion.parentesisFinal = true;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
150
AYA.FROPI/AyABL/AGP/ResultadoBL.cs
Normal file
150
AYA.FROPI/AyABL/AGP/ResultadoBL.cs
Normal file
|
|
@ -0,0 +1,150 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.AGP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.AGP
|
||||||
|
{
|
||||||
|
public class ResultadoBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public ResultadoBL()
|
||||||
|
{
|
||||||
|
objResultadoEL = new ResultadoEL();
|
||||||
|
this.NombreTabla = Modulos.t_agp_.ToString() + Tablas.resultado.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public ResultadoEL objResultadoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Resultado
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarResultado()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_resultado.NUMERO.ToString() + Tablas.resultado.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.resultado.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objResultadoEL.Numero,
|
||||||
|
objResultadoEL.Descripcion,
|
||||||
|
objResultadoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Resultado
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarResultado()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objResultadoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objResultadoEL.PK, Tablas.resultado, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_resultado.NUMERO.ToString() + Tablas.resultado.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.resultado.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objResultadoEL.Numero,
|
||||||
|
objResultadoEL.Descripcion,
|
||||||
|
objResultadoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Resultado
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoResultado()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objResultadoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objResultadoEL.PK, Tablas.resultado, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.resultado.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objResultadoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los ResultadoS
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getResultados()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objResultadoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objResultadoEL.PK, Tablas.resultado, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.objResultadoEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objResultadoEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.resultado, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsResultado = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY NUMERORESULTADO ASC ");
|
||||||
|
|
||||||
|
return dsResultado;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
862
AYA.FROPI/AyABL/AUT/Autenticacion/AutenticacionBL.cs
Normal file
862
AYA.FROPI/AyABL/AUT/Autenticacion/AutenticacionBL.cs
Normal file
|
|
@ -0,0 +1,862 @@
|
||||||
|
using System;
|
||||||
|
using System.Data;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.DirectoryServices;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
/****************************************************************************/
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Collections;
|
||||||
|
/****************************************************************************/
|
||||||
|
using AyABL.AUT.FiltroBuscador;
|
||||||
|
using AyABL.AUT.Login;
|
||||||
|
using AyABL.AUT.PropiedadesAyuda;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AyABL.AUT.Autenticacion
|
||||||
|
{
|
||||||
|
public class AutenticacionBL
|
||||||
|
{
|
||||||
|
private static string passPhrase = "P@SzFr@c3"; // puede ser cualquier string
|
||||||
|
private static string saltValue = "S@7tV@763"; // puede ser cualquier string
|
||||||
|
private static string hashAlgorithm = "MD5"; // puede ser "SHA1"
|
||||||
|
private static int passwordIterations = 3; // puede ser cualquier number
|
||||||
|
private static string initVector = "@1B2c3D4e5F6g7H8"; // debe ser 16 bytes
|
||||||
|
private static int keySize = 256; // puede ser 192 o 128
|
||||||
|
/****************************************************************************/
|
||||||
|
private string _adPassword = string.Empty;
|
||||||
|
private string _adPath = string.Empty;
|
||||||
|
private string _adLogin = string.Empty;
|
||||||
|
private DirectoryEntry _dirEntry = null;
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Metodo constructor
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public AutenticacionBL()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Metodo constructor
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="de"></param>
|
||||||
|
|
||||||
|
public AutenticacionBL(DirectoryEntry de)
|
||||||
|
{
|
||||||
|
_dirEntry = de;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Char Chr(int i)
|
||||||
|
{
|
||||||
|
//Return the character of the given character value
|
||||||
|
//Devuelve el caracter del codigo ascii que se le pasa ejemplo Convert.ToChar(162) = ó
|
||||||
|
return Convert.ToChar(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Metodo que se utiliza para validar contra el Active Directory(AD)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userName"></param>
|
||||||
|
/// <param name="password"></param>
|
||||||
|
/// <param name="domain"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool Autenticar(string userName, string password, string domain)
|
||||||
|
{
|
||||||
|
bool authentic = false;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DirectoryEntry entry = new DirectoryEntry("LDAP://" + domain, userName, password);
|
||||||
|
|
||||||
|
object nativeObject = entry.NativeObject;
|
||||||
|
|
||||||
|
DirectorySearcher Buscar = new DirectorySearcher(entry);
|
||||||
|
|
||||||
|
Buscar.Filter = "(SAMAccountName=" + userName + ")";
|
||||||
|
Buscar.PropertiesToLoad.Add("cn");
|
||||||
|
|
||||||
|
SearchResult Resultado = Buscar.FindOne();
|
||||||
|
|
||||||
|
authentic = true;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
return authentic;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Busca usuarios en el ActiveDirectory
|
||||||
|
|
||||||
|
public enum objectClass
|
||||||
|
{
|
||||||
|
usuario, grupo, estacion,
|
||||||
|
user, group, computer
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum returnType
|
||||||
|
{
|
||||||
|
distinguishedName, ObjectGUID
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetADLogin(objectClass objectCls, returnType returnValue, string objectName, string LdapDomain)
|
||||||
|
{
|
||||||
|
string distinguishedName = string.Empty;
|
||||||
|
string connectionPrefix = "LDAP://" + LdapDomain;
|
||||||
|
DirectoryEntry entry = new DirectoryEntry(connectionPrefix);
|
||||||
|
DirectorySearcher mySearcher = new DirectorySearcher(entry);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
switch (objectCls)
|
||||||
|
{
|
||||||
|
case objectClass.usuario:
|
||||||
|
mySearcher.Filter = "(&(objectClass=user) (|(cn=" + objectName + ")(sAMAccountName=" + objectName + ")))";
|
||||||
|
break;
|
||||||
|
case objectClass.grupo:
|
||||||
|
mySearcher.Filter = "(&(objectClass=group) (|(cn=" + objectName + ")(dn=" + objectName + ")))";
|
||||||
|
break;
|
||||||
|
case objectClass.estacion:
|
||||||
|
mySearcher.Filter = "(&(objectClass=computer) (|(cn=" + objectName + ")(dn=" + objectName + ")))";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SearchResult result = mySearcher.FindOne();
|
||||||
|
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new NullReferenceException
|
||||||
|
("unable to locate the distinguishedName for the object " +
|
||||||
|
objectName + " in the " + LdapDomain + " domain");
|
||||||
|
}
|
||||||
|
DirectoryEntry directoryObject = result.GetDirectoryEntry();
|
||||||
|
if (returnValue.Equals(returnType.distinguishedName))
|
||||||
|
{
|
||||||
|
distinguishedName = "LDAP://" + directoryObject.Properties
|
||||||
|
["distinguishedName"].Value;
|
||||||
|
}
|
||||||
|
if (returnValue.Equals(returnType.ObjectGUID))
|
||||||
|
{
|
||||||
|
distinguishedName = directoryObject.Guid.ToString();
|
||||||
|
}
|
||||||
|
entry.Close();
|
||||||
|
entry.Dispose();
|
||||||
|
mySearcher.Dispose();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return distinguishedName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Metodo que se utiliza para identificar los servidores en los que se encuentra el Active Directory(AD)
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
private DirectoryEntry GetDirectoryObject()
|
||||||
|
{
|
||||||
|
DirectoryEntry oDE, oDE2;
|
||||||
|
oDE = new DirectoryEntry("LDAP://aya-srv-0111/DC=intranet,DC=aya,DC=go,DC=cr", /*"administrator", "password",*/"","", AuthenticationTypes.Secure);
|
||||||
|
oDE2 = new DirectoryEntry("LDAP://aya-vsrv-0112/DC=intranet,DC=aya,DC=go,DC=cr", /*"administrator", "password",*/"", "", AuthenticationTypes.Secure);
|
||||||
|
return oDE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DirectoryEntry GetAllLoginBLs()
|
||||||
|
{
|
||||||
|
DirectoryEntry de = GetDirectoryObject();
|
||||||
|
DirectorySearcher deSearch = new DirectorySearcher();
|
||||||
|
deSearch.SearchRoot = de;
|
||||||
|
|
||||||
|
deSearch.Filter = "(&(objectClass=user))";
|
||||||
|
deSearch.SearchScope = SearchScope.Subtree;
|
||||||
|
SearchResult results = deSearch.FindOne();
|
||||||
|
|
||||||
|
if (!(results == null))
|
||||||
|
{
|
||||||
|
de = new DirectoryEntry(results.Path, "","",/*"administrator", "password",*/ AuthenticationTypes.Secure);
|
||||||
|
return de;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Decrypt(string cipherText)
|
||||||
|
{
|
||||||
|
// Convert strings defining encryption key characteristics into byte
|
||||||
|
// arrays. Let us assume that strings only contain ASCII codes.
|
||||||
|
// If strings include Unicode characters, use Unicode, UTF7, or UTF8
|
||||||
|
// encoding.
|
||||||
|
byte[] initVectorBytes = Encoding.ASCII.GetBytes(initVector);
|
||||||
|
byte[] saltValueBytes = Encoding.ASCII.GetBytes(saltValue);
|
||||||
|
|
||||||
|
// Convert our ciphertext into a byte array.
|
||||||
|
byte[] cipherTextBytes = Convert.FromBase64String(cipherText);
|
||||||
|
|
||||||
|
// First, we must create a password, from which the key will be
|
||||||
|
// derived. This password will be generated from the specified
|
||||||
|
// passphrase and salt value. The password will be created using
|
||||||
|
// the specified hash algorithm. Password creation can be done in
|
||||||
|
// several iterations.
|
||||||
|
PasswordDeriveBytes password = new PasswordDeriveBytes(
|
||||||
|
passPhrase,
|
||||||
|
saltValueBytes,
|
||||||
|
hashAlgorithm,
|
||||||
|
passwordIterations);
|
||||||
|
|
||||||
|
// Use the password to generate pseudo-random bytes for the encryption
|
||||||
|
// key. Specify the size of the key in bytes (instead of bits).
|
||||||
|
byte[] keyBytes = password.GetBytes(keySize / 8);
|
||||||
|
|
||||||
|
// Create uninitialized Rijndael encryption object.
|
||||||
|
RijndaelManaged symmetricKey = new RijndaelManaged();
|
||||||
|
|
||||||
|
// It is reasonable to set encryption mode to Cipher Block Chaining
|
||||||
|
// (CBC). Use default options for other symmetric key parameters.
|
||||||
|
symmetricKey.Mode = CipherMode.CBC;
|
||||||
|
|
||||||
|
// Generate decryptor from the existing key bytes and initialization
|
||||||
|
// vector. Key size will be defined based on the number of the key
|
||||||
|
// bytes.
|
||||||
|
ICryptoTransform decryptor = symmetricKey.CreateDecryptor(
|
||||||
|
keyBytes,
|
||||||
|
initVectorBytes);
|
||||||
|
|
||||||
|
// Define memory stream which will be used to hold encrypted data.
|
||||||
|
MemoryStream memoryStream = new MemoryStream(cipherTextBytes);
|
||||||
|
|
||||||
|
// Define cryptographic stream (always use Read mode for encryption).
|
||||||
|
CryptoStream cryptoStream = new CryptoStream(memoryStream,
|
||||||
|
decryptor,
|
||||||
|
CryptoStreamMode.Read);
|
||||||
|
|
||||||
|
// Since at this point we don't know what the size of decrypted data
|
||||||
|
// will be, allocate the buffer long enough to hold ciphertext;
|
||||||
|
// plaintext is never longer than ciphertext.
|
||||||
|
byte[] plainTextBytes = new byte[cipherTextBytes.Length];
|
||||||
|
|
||||||
|
// Start decrypting.
|
||||||
|
int decryptedByteCount = cryptoStream.Read(plainTextBytes,
|
||||||
|
0,
|
||||||
|
plainTextBytes.Length);
|
||||||
|
|
||||||
|
// Close both streams.
|
||||||
|
memoryStream.Close();
|
||||||
|
cryptoStream.Close();
|
||||||
|
|
||||||
|
// Convert decrypted data into a string.
|
||||||
|
// Let us assume that the original plaintext string was UTF8-encoded.
|
||||||
|
string plainText = Encoding.UTF8.GetString(plainTextBytes,
|
||||||
|
0,
|
||||||
|
decryptedByteCount);
|
||||||
|
|
||||||
|
// Return decrypted string.
|
||||||
|
return plainText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Encrypt(string plainText)
|
||||||
|
{
|
||||||
|
// Convert strings into byte arrays.
|
||||||
|
// Let us assume that strings only contain ASCII codes.
|
||||||
|
// If strings include Unicode characters, use Unicode, UTF7, or UTF8
|
||||||
|
// encoding.
|
||||||
|
byte[] initVectorBytes = Encoding.ASCII.GetBytes(initVector);
|
||||||
|
byte[] saltValueBytes = Encoding.ASCII.GetBytes(saltValue);
|
||||||
|
|
||||||
|
// Convert our plaintext into a byte array.
|
||||||
|
// Let us assume that plaintext contains UTF8-encoded characters.
|
||||||
|
byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
|
||||||
|
|
||||||
|
// First, we must create a password, from which the key will be derived.
|
||||||
|
// This password will be generated from the specified passphrase and
|
||||||
|
// salt value. The password will be created using the specified hash
|
||||||
|
// algorithm. Password creation can be done in several iterations.
|
||||||
|
PasswordDeriveBytes password = new PasswordDeriveBytes(
|
||||||
|
passPhrase,
|
||||||
|
saltValueBytes,
|
||||||
|
hashAlgorithm,
|
||||||
|
passwordIterations);
|
||||||
|
|
||||||
|
// Use the password to generate pseudo-random bytes for the encryption
|
||||||
|
// key. Specify the size of the key in bytes (instead of bits).
|
||||||
|
byte[] keyBytes = password.GetBytes(keySize / 8);
|
||||||
|
|
||||||
|
// Create uninitialized Rijndael encryption object.
|
||||||
|
RijndaelManaged symmetricKey = new RijndaelManaged();
|
||||||
|
|
||||||
|
// It is reasonable to set encryption mode to Cipher Block Chaining
|
||||||
|
// (CBC). Use default options for other symmetric key parameters.
|
||||||
|
symmetricKey.Mode = CipherMode.CBC;
|
||||||
|
|
||||||
|
// Generate encryptor from the existing key bytes and initialization
|
||||||
|
// vector. Key size will be defined based on the number of the key
|
||||||
|
// bytes.
|
||||||
|
ICryptoTransform encryptor = symmetricKey.CreateEncryptor(
|
||||||
|
keyBytes,
|
||||||
|
initVectorBytes);
|
||||||
|
|
||||||
|
// Define memory stream which will be used to hold encrypted data.
|
||||||
|
MemoryStream memoryStream = new MemoryStream();
|
||||||
|
|
||||||
|
// Define cryptographic stream (always use Write mode for encryption).
|
||||||
|
CryptoStream cryptoStream = new CryptoStream(memoryStream,
|
||||||
|
encryptor,
|
||||||
|
CryptoStreamMode.Write);
|
||||||
|
// Start encrypting.
|
||||||
|
cryptoStream.Write(plainTextBytes, 0, plainTextBytes.Length);
|
||||||
|
|
||||||
|
// Finish encrypting.
|
||||||
|
cryptoStream.FlushFinalBlock();
|
||||||
|
|
||||||
|
// Convert our encrypted data from a memory stream into a byte array.
|
||||||
|
byte[] cipherTextBytes = memoryStream.ToArray();
|
||||||
|
|
||||||
|
// Close both streams.
|
||||||
|
memoryStream.Close();
|
||||||
|
cryptoStream.Close();
|
||||||
|
|
||||||
|
// Convert encrypted data into a base64-encoded string.
|
||||||
|
string cipherText = Convert.ToBase64String(cipherTextBytes);
|
||||||
|
|
||||||
|
// Return encrypted string.
|
||||||
|
return cipherText;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
public void Connect(string adPath, string adLogin, string adPassword)
|
||||||
|
{
|
||||||
|
_adPath = adPath;
|
||||||
|
_adLogin = adLogin;
|
||||||
|
_adPassword = adPassword;
|
||||||
|
if (string.Empty == _adLogin || null == _adLogin)
|
||||||
|
{
|
||||||
|
_adLogin = null;
|
||||||
|
_adPassword = null;
|
||||||
|
}
|
||||||
|
_dirEntry = new DirectoryEntry(_adPath, _adLogin, _adPassword, AuthenticationTypes.Secure);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Connect(string adPath)
|
||||||
|
{
|
||||||
|
_adPath = adPath;
|
||||||
|
_dirEntry = new DirectoryEntry(_adPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Conecta con el servidor de active directory con las credenciales sumistradas.
|
||||||
|
/// El servidor de AD esta en ServerLdapPath.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Login">Login de usuario de AD.</param>
|
||||||
|
/// <param name="Clave">Clave del usuario de AD</param>
|
||||||
|
/// <returns>Objeto del helper de AD.</returns>
|
||||||
|
private static AutenticacionBL GetConnection(string Login, string Clave)
|
||||||
|
{
|
||||||
|
AutenticacionBL helper = new AutenticacionBL();
|
||||||
|
//helper.Connect(System.Configuration.ConfigurationSettings.AppSettings["ServerLdapPath"], Login, Clave);
|
||||||
|
helper.Connect(System.Configuration.ConfigurationSettings.AppSettings["ServerLdapPath"]);
|
||||||
|
return helper;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Metodo utilizado para autenticarde contra el Active Directory.
|
||||||
|
/// Si el no se puede autenticar devuelve un error que sera manejado en otras capas.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Login">Login de Usuario de AD.</param>
|
||||||
|
/// <param name="Clave">Clave del usuario de AD.</param>
|
||||||
|
public void Autenticar(string Login, string Clave)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Object c = GetConnection(Login, Clave)._dirEntry.NativeObject;
|
||||||
|
}
|
||||||
|
catch (DirectoryServicesCOMException ex)
|
||||||
|
{ throw ex; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Metodo Utilizado para buscar usuarios del AD.
|
||||||
|
/// Es utilizados en busquedas tanto por nombre como por login de usuario.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userName">Texto que se desea buscar en la infomacion del usuario.</param>
|
||||||
|
/// <param name="Login">Login para porder conectarde al AD.</param>
|
||||||
|
/// <param name="Clave">Clave para porder conectarde al AD.</param>
|
||||||
|
/// <returns>Tabla con la infomacion acerca de los usuarios encontrados.</returns>
|
||||||
|
|
||||||
|
public DataSet BuscarLoginUsuario(string userName, string Login, string Clave)
|
||||||
|
{
|
||||||
|
AutenticacionBL helper = GetConnection(Login, Clave);
|
||||||
|
string customFilter = string.Format("(&(objectClass=user)(|(givenName={0}*)(sn={0}*)(SamAccountName={0}*)))", userName);
|
||||||
|
FiltroBuscadorBL usersFilter = new FiltroBuscadorBL(customFilter);
|
||||||
|
//ArrayList users = helper.FindObjects(usersFilter, "CN=cn,FirstName=givenName,LastName=sn,LogonName=sAMAccountName,Groups=memberOf");
|
||||||
|
ArrayList users = helper.FindObjects(usersFilter, "CN=cn,Display FirstName=givenName,LastName=sn,LogonName=sAMAccountName,Groups=memberOf,P.O.Box=postOfficeBox");
|
||||||
|
DataSet resultDs = new DataSet();
|
||||||
|
DataTable resultDt = new DataTable("LoginBLs");
|
||||||
|
|
||||||
|
resultDs.Tables.Add(resultDt);
|
||||||
|
resultDt.Columns.Add("Login", typeof(String));
|
||||||
|
resultDt.Columns.Add("Nombre", typeof(String));
|
||||||
|
//resultDt.Columns.Add("Apellidos", typeof(String));
|
||||||
|
resultDt.Columns.Add("Cedula", typeof(String));
|
||||||
|
|
||||||
|
foreach (Hashtable userProperties in users) //convert the array list to dataset table
|
||||||
|
{
|
||||||
|
LoginBL resultLoginBL = new LoginBL();
|
||||||
|
PropiedadesAyudaBL.FillObject(resultLoginBL, userProperties);
|
||||||
|
DataRow row = resultDt.NewRow();
|
||||||
|
//row["Login"] = resultLoginBL.LogonName;
|
||||||
|
row["Login"] = userProperties["LogonName"].ToString();
|
||||||
|
//row["Nombre"] = Convert.ToString(resultLoginBL.CN);
|
||||||
|
row["Nombre"] = userProperties["CN"].ToString();
|
||||||
|
//row["Apellidos"] = Convert.ToString(resultLoginBL.LastName);
|
||||||
|
row["Cedula"] = userProperties["P.O.Box"] == null ? " " : userProperties["P.O.Box"].ToString();
|
||||||
|
resultDt.Rows.Add(row);
|
||||||
|
}
|
||||||
|
return resultDs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet BuscarGruposUsuario(string userName, string Login, string Clave)
|
||||||
|
{
|
||||||
|
AutenticacionBL helper = GetConnection(Login, Clave);
|
||||||
|
string customFilter = string.Format("(&(objectClass=user)(|(givenName={0}*)(sn={0}*)(SamAccountName={0}*)))", userName);
|
||||||
|
FiltroBuscadorBL usersFilter = new FiltroBuscadorBL(customFilter);
|
||||||
|
ArrayList arlUsuarios = helper.FindObjects(usersFilter, "Groups=memberOf");
|
||||||
|
DataSet dsGrupos = new DataSet();
|
||||||
|
DataTable dtGrupos = new DataTable("Grupos");
|
||||||
|
|
||||||
|
dsGrupos.Tables.Add(dtGrupos);
|
||||||
|
dtGrupos.Columns.Add("Grupos", typeof(String));
|
||||||
|
|
||||||
|
foreach (Hashtable userProperties in arlUsuarios) //convert the array list to dataset table
|
||||||
|
{
|
||||||
|
LoginBL resultLoginBL = new LoginBL();
|
||||||
|
PropiedadesAyudaBL.FillObject(resultLoginBL, userProperties);
|
||||||
|
foreach (string strGrupos in resultLoginBL.Groups)
|
||||||
|
{
|
||||||
|
|
||||||
|
DataRow row = dtGrupos.NewRow();
|
||||||
|
row["Grupos"] = strGrupos;
|
||||||
|
dtGrupos.Rows.Add(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return dsGrupos;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Metodo para buscar un usuario espesifico.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Login">Login del usuario que se busca. Tambien se autentica con este Usuario.</param>
|
||||||
|
/// <param name="Clave">Clave del usuario para autenticarse con el AD.</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public LoginBL BuscarUnLoginUsuario(string Login, string Clave)
|
||||||
|
{
|
||||||
|
AutenticacionBL helper = GetConnection(Login, Clave);
|
||||||
|
string customFilter = string.Format("(&(objectClass=user)(|(givenName={0}*)(sn={0}*)(SamAccountName={0}*)))", Login);
|
||||||
|
FiltroBuscadorBL usersFilter = new FiltroBuscadorBL(customFilter);
|
||||||
|
ArrayList users = helper.FindObjects(usersFilter, "CN=cn,FirstName=givenName,LastName=sn,LogonName=sAMAccountName,Groups=memberOf");
|
||||||
|
LoginBL resultLoginBL = new LoginBL();
|
||||||
|
foreach (Hashtable userProperties in users) //Convierte el array list en un dataset table
|
||||||
|
{
|
||||||
|
PropiedadesAyudaBL.FillObject(resultLoginBL, userProperties);
|
||||||
|
}
|
||||||
|
return resultLoginBL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Metodo para buscar un usuario espesifico.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Login">Login del usuario que se busca. Tambien se autentica con este Usuario.</param>
|
||||||
|
/// <param name="Clave">Clave del usuario para autenticarse con el AD.</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
//public DataSet BuscarUnGrupoUsuario(string Login, string Clave)
|
||||||
|
//{
|
||||||
|
// DataSet dsUsuarios = new DataSet();
|
||||||
|
|
||||||
|
// AutenticacionBL helper = GetConnection(Login, Clave);
|
||||||
|
// string customFilter = string.Format("(&(objectClass=user)(|(givenName={0}*)(sn={0}*)(SamAccountName={0}*)))", Login);
|
||||||
|
// FiltroBuscadorBL usersFilter = new FiltroBuscadorBL(customFilter);
|
||||||
|
// dsUsuarios = helper.FindObjects(usersFilter, "CN=cn,FirstName=givenName,LastName=sn,LogonName=sAMAccountName,Groups=memberOf");
|
||||||
|
// DataSet dsUsuarios = users;
|
||||||
|
// LoginBL resultLoginBL = new LoginBL();
|
||||||
|
// foreach (Hashtable userProperties in users) //Convierte el array list en un dataset table
|
||||||
|
// {
|
||||||
|
// PropiedadesAyudaBL.FillObject(resultLoginBL, userProperties);
|
||||||
|
// }
|
||||||
|
// return resultLoginBL;
|
||||||
|
//}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Copia las entidades del AD.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="configInfo"></param>
|
||||||
|
/// <param name="de"></param>
|
||||||
|
/// <param name="propertyValues"></param>
|
||||||
|
private void CopyEntryToProperties(string configInfo, DirectoryEntry de, Hashtable propertyValues)
|
||||||
|
{
|
||||||
|
foreach (string property in configInfo.Split(','))
|
||||||
|
{
|
||||||
|
string[] propertyValue = property.Split('=');
|
||||||
|
if (propertyValue.Length == 2)
|
||||||
|
{
|
||||||
|
propertyValues[propertyValue[0]] = this.GetProperty(de, propertyValue[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
propertyValues.Add("LdapPath", de.Path);
|
||||||
|
propertyValues.Add("LdapObjectClass", de.Properties["objectClass"][de.Properties["objectClass"].Count - 1]);
|
||||||
|
propertyValues.Add("ParentLdapPath", de.Parent.Path);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Obtiene una propidade de una entidad del AD.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="de">Entidad de AD.</param>
|
||||||
|
/// <param name="PropertyName">Propiedad que se busca en el entidad.</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private object GetProperty(DirectoryEntry de, string PropertyName)
|
||||||
|
{
|
||||||
|
if (de.Properties.Contains(PropertyName))
|
||||||
|
{
|
||||||
|
if (de.Properties[PropertyName].Count == 1)
|
||||||
|
{
|
||||||
|
return de.Properties[PropertyName].Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IList values = new ArrayList();
|
||||||
|
foreach (object item in de.Properties[PropertyName])
|
||||||
|
{
|
||||||
|
values.Add(item);
|
||||||
|
}
|
||||||
|
return values;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Copia las propiedades a una entidad.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="configInfo"></param>
|
||||||
|
/// <param name="propertyValues"></param>
|
||||||
|
/// <param name="de"></param>
|
||||||
|
private void CopyPropertiesToEntry(string configInfo, Hashtable propertyValues, DirectoryEntry de)
|
||||||
|
{
|
||||||
|
foreach (string property in configInfo.Split(','))
|
||||||
|
{
|
||||||
|
string[] propertyValue = property.Split('=');
|
||||||
|
if (propertyValue.Length == 2)
|
||||||
|
{
|
||||||
|
object value = propertyValues[propertyValue[0]];
|
||||||
|
if (value != null)
|
||||||
|
{
|
||||||
|
this.SetProperty(de, propertyValue[1], propertyValues[propertyValue[0]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Escribe el valor de una propiedad en la entidad recivida.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="de">Entidad del Ad.</param>
|
||||||
|
/// <param name="propertyName">Nombre de la propidad.</param>
|
||||||
|
/// <param name="propertyValue">Valor de la propidad.</param>
|
||||||
|
|
||||||
|
private void SetProperty(DirectoryEntry de, string propertyName, object propertyValue)
|
||||||
|
{
|
||||||
|
if (propertyValue != null)
|
||||||
|
{
|
||||||
|
IList values = propertyValue as ArrayList;
|
||||||
|
bool isArray = (values != null);
|
||||||
|
if (de.Properties.Contains(propertyName))
|
||||||
|
{
|
||||||
|
if (!isArray)
|
||||||
|
{
|
||||||
|
if (propertyValue.ToString() != string.Empty)
|
||||||
|
{
|
||||||
|
de.Properties[propertyName].Value = propertyValue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
de.Properties[propertyName].Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
de.Properties[propertyName].Clear();
|
||||||
|
foreach (object value in values)
|
||||||
|
{
|
||||||
|
// En en .NET 1.1 SP3 y Windows 2000 levanta una excepcion en este punto
|
||||||
|
de.Properties[propertyName].Add(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// begin - HACK para que funcione en .NET 1.1 SP3 y Windows 2000
|
||||||
|
de.CommitChanges();
|
||||||
|
foreach (object value in values)
|
||||||
|
{
|
||||||
|
de.Properties[propertyName].Add(value);
|
||||||
|
}
|
||||||
|
// end - HACK para que funcione en .NET 1.1 SP3 y Windows 2000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!isArray)
|
||||||
|
{
|
||||||
|
if (propertyValue.ToString() != string.Empty)
|
||||||
|
{
|
||||||
|
de.Properties[propertyName].Add(propertyValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (object value in values)
|
||||||
|
{
|
||||||
|
de.Properties[propertyName].Add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Crea un objeto del una entidad padre a una nueva entidad y devuelve el path
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parentObject"></param>
|
||||||
|
/// <param name="createString"></param>
|
||||||
|
/// <param name="objectClass"></param>
|
||||||
|
/// <param name="properties"></param>
|
||||||
|
/// <param name="propertyInfo"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public string CreateObject(FiltroBuscadorBL parentObject, string createString, string objectClass, Hashtable properties, string propertyInfo)
|
||||||
|
{
|
||||||
|
DirectoryEntry parentEntry = this.FindEntry(parentObject);
|
||||||
|
DirectoryEntry newEntry = parentEntry.Children.Add(createString, objectClass);
|
||||||
|
newEntry = this.SetLoginBLToDirEntry(newEntry);
|
||||||
|
this.CopyPropertiesToEntry(propertyInfo, properties, newEntry);
|
||||||
|
newEntry.CommitChanges();
|
||||||
|
return newEntry.Path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Crea un objeto del una entidad padre a una nueva entidad y devuelve el path
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parentObjectPath"></param>
|
||||||
|
/// <param name="createString"></param>
|
||||||
|
/// <param name="objectClass"></param>
|
||||||
|
/// <param name="properties"></param>
|
||||||
|
/// <param name="propertyInfo"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public string CreateObject(string parentObjectPath, string createString, string objectClass, Hashtable properties, string propertyInfo)
|
||||||
|
{
|
||||||
|
DirectoryEntry parentEntry = this.FindEntry(parentObjectPath);
|
||||||
|
DirectoryEntry newEntry = parentEntry.Children.Add(createString, objectClass);
|
||||||
|
newEntry = this.SetLoginBLToDirEntry(newEntry);
|
||||||
|
this.CopyPropertiesToEntry(propertyInfo, properties, newEntry);
|
||||||
|
newEntry.CommitChanges();
|
||||||
|
return newEntry.Path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Busca en objeto de AD y devuelve las propiedades de este.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sf">Filtro de buscador</param>
|
||||||
|
/// <param name="propertyInfo">Informacion de las propiedades.</param>
|
||||||
|
/// <returns>Tabla de propiedades.</returns>
|
||||||
|
|
||||||
|
public Hashtable FindObject(FiltroBuscadorBL sf, string propertyInfo)
|
||||||
|
{
|
||||||
|
DirectoryEntry entry = this.FindEntry(sf);
|
||||||
|
if (entry == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Hashtable properties = new Hashtable();
|
||||||
|
this.CopyEntryToProperties(propertyInfo, entry, properties);
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ldapPath"></param>
|
||||||
|
/// <param name="propertyInfo"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Hashtable FindObject(string ldapPath, string propertyInfo)
|
||||||
|
{
|
||||||
|
DirectoryEntry entry = this.FindEntry(ldapPath);
|
||||||
|
if (entry == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Hashtable properties = new Hashtable();
|
||||||
|
this.CopyEntryToProperties(propertyInfo, entry, properties);
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Buscar objetos del active directory y debuelve un lista con estos objetos.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sf">Filtro de la busqueda.</param>
|
||||||
|
/// <param name="propertyInfo">Informacion de las propiedades.</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public ArrayList FindObjects(FiltroBuscadorBL sf, string propertyInfo)
|
||||||
|
{
|
||||||
|
ArrayList objects = new ArrayList();
|
||||||
|
SearchResultCollection results = this.FindAll(sf.Filter);
|
||||||
|
foreach (SearchResult result in results)
|
||||||
|
{
|
||||||
|
Hashtable properties = new Hashtable();
|
||||||
|
this.CopyEntryToProperties(propertyInfo, this.SetLoginBLToDirEntry(result.GetDirectoryEntry()), properties);
|
||||||
|
objects.Add(properties);
|
||||||
|
|
||||||
|
}
|
||||||
|
return objects;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// borra el objeto segun el path
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ldapPath">path que se desea borrar.</param>
|
||||||
|
|
||||||
|
public void RemoveObject(string ldapPath)
|
||||||
|
{
|
||||||
|
DirectoryEntry entry = this.FindEntry(ldapPath);
|
||||||
|
DirectoryEntry parentEntry = SetLoginBLToDirEntry(entry.Parent);
|
||||||
|
parentEntry.Children.Remove(entry);
|
||||||
|
parentEntry.CommitChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el objeto con las propiedades resividas.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ldapPath"></param>
|
||||||
|
/// <param name="properties"></param>
|
||||||
|
/// <param name="propertyInfo"></param>
|
||||||
|
|
||||||
|
public void UpdateObject(string ldapPath, Hashtable properties, string propertyInfo)
|
||||||
|
{
|
||||||
|
DirectoryEntry entry = this.FindEntry(ldapPath);
|
||||||
|
this.CopyPropertiesToEntry(propertyInfo, properties, entry);
|
||||||
|
entry.CommitChanges();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Buscar todas las entidades.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filter">Filtro para la busqueda.</param>
|
||||||
|
/// <returns>Collecion de resultados de la busqueda.</returns>
|
||||||
|
private SearchResultCollection FindAll(string filter)
|
||||||
|
{
|
||||||
|
DirectorySearcher searcher = new DirectorySearcher();
|
||||||
|
searcher.SearchRoot = this._dirEntry;
|
||||||
|
searcher.Filter = filter;
|
||||||
|
searcher.SearchScope = SearchScope.Subtree;
|
||||||
|
return searcher.FindAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Encuetra entidades dependiendo del filtro.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sf"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private ArrayList FindEntries(FiltroBuscadorBL sf)
|
||||||
|
{
|
||||||
|
ArrayList entries = new ArrayList();
|
||||||
|
SearchResultCollection results = this.FindAll(sf.Filter);
|
||||||
|
|
||||||
|
foreach (SearchResult result in results)
|
||||||
|
{
|
||||||
|
entries.Add(result.GetDirectoryEntry());
|
||||||
|
}
|
||||||
|
return entries;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Obtiene una entidad con el usuario de la propiedad actual.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="de"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private DirectoryEntry SetLoginBLToDirEntry(DirectoryEntry de)
|
||||||
|
{
|
||||||
|
de.Username = this._dirEntry.Username;
|
||||||
|
//de.Password = this._dirEntry.Password;
|
||||||
|
de.AuthenticationType = this._dirEntry.AuthenticationType;
|
||||||
|
return de;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una enditdad dependiendo del path.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ldapPath"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public DirectoryEntry FindEntry(string ldapPath)
|
||||||
|
{
|
||||||
|
string ldap = ldapPath;
|
||||||
|
const string regularExpresion = "LDAP://.*/";
|
||||||
|
if (ldapPath.ToUpper().IndexOf("LDAP://") == -1)
|
||||||
|
{
|
||||||
|
Match m = Regex.Match(_dirEntry.Path, regularExpresion);
|
||||||
|
if (m.Length > 0)
|
||||||
|
{
|
||||||
|
string server = m.Value;
|
||||||
|
ldap = server + ldap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new DirectoryEntry(ldap, this._dirEntry.Username, "" /*this._dirEntry.Password*/);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una entidad dependiendo del filtro.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sf"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public DirectoryEntry FindEntry(FiltroBuscadorBL sf)
|
||||||
|
{
|
||||||
|
SearchResult result = this.FindOne(sf.Filter);
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return this.SetLoginBLToDirEntry(result.GetDirectoryEntry());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una entidad dependiendo del filtro.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sf"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public SearchResult FindOne(string filter)
|
||||||
|
{
|
||||||
|
DirectorySearcher searcher = new DirectorySearcher();
|
||||||
|
searcher.SearchRoot = this._dirEntry;
|
||||||
|
searcher.Filter = filter;
|
||||||
|
searcher.SearchScope = SearchScope.Subtree;
|
||||||
|
return searcher.FindOne();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
161
AYA.FROPI/AyABL/AUT/Encripta/EncriptaBL.cs
Normal file
161
AYA.FROPI/AyABL/AUT/Encripta/EncriptaBL.cs
Normal file
|
|
@ -0,0 +1,161 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
|
namespace AyABL.AUT.Encripta
|
||||||
|
{
|
||||||
|
public class EncriptaBL
|
||||||
|
{
|
||||||
|
private static string initVector = "@1B2c3D4e5F6g7H8"; // must be 16 bytes
|
||||||
|
private static string passPhrase = "P@SzFr@c3"; // can be any string
|
||||||
|
private static string saltValue = "S@7tV@763"; // can be any string
|
||||||
|
private static string hashAlgorithm = "MD5"; // can be "SHA1"
|
||||||
|
private static int passwordIterations = 3; // can be any number
|
||||||
|
private static int keySize = 256; // can be 192 or 128
|
||||||
|
|
||||||
|
public string Decryptar(string cipherText)
|
||||||
|
{
|
||||||
|
// Convert strings defining encryption key characteristics into byte
|
||||||
|
// arrays. Let us assume that strings only contain ASCII codes.
|
||||||
|
// If strings include Unicode characters, use Unicode, UTF7, or UTF8
|
||||||
|
// encoding.
|
||||||
|
byte[] initVectorBytes = Encoding.ASCII.GetBytes(initVector);
|
||||||
|
byte[] saltValueBytes = Encoding.ASCII.GetBytes(saltValue);
|
||||||
|
|
||||||
|
// Convert our ciphertext into a byte array.
|
||||||
|
byte[] cipherTextBytes = Convert.FromBase64String(cipherText);
|
||||||
|
|
||||||
|
// First, we must create a password, from which the key will be
|
||||||
|
// derived. This password will be generated from the specified
|
||||||
|
// passphrase and salt value. The password will be created using
|
||||||
|
// the specified hash algorithm. Password creation can be done in
|
||||||
|
// several iterations.
|
||||||
|
PasswordDeriveBytes password = new PasswordDeriveBytes(
|
||||||
|
passPhrase,
|
||||||
|
saltValueBytes,
|
||||||
|
hashAlgorithm,
|
||||||
|
passwordIterations);
|
||||||
|
|
||||||
|
// Use the password to generate pseudo-random bytes for the encryption
|
||||||
|
// key. Specify the size of the key in bytes (instead of bits).
|
||||||
|
byte[] keyBytes = password.GetBytes(keySize / 8);
|
||||||
|
|
||||||
|
// Create uninitialized Rijndael encryption object.
|
||||||
|
RijndaelManaged symmetricKey = new RijndaelManaged();
|
||||||
|
|
||||||
|
// It is reasonable to set encryption mode to Cipher Block Chaining
|
||||||
|
// (CBC). Use default options for other symmetric key parameters.
|
||||||
|
symmetricKey.Mode = CipherMode.CBC;
|
||||||
|
|
||||||
|
// Generate decryptor from the existing key bytes and initialization
|
||||||
|
// vector. Key size will be defined based on the number of the key
|
||||||
|
// bytes.
|
||||||
|
ICryptoTransform decryptor = symmetricKey.CreateDecryptor(
|
||||||
|
keyBytes,
|
||||||
|
initVectorBytes);
|
||||||
|
|
||||||
|
// Define memory stream which will be used to hold encrypted data.
|
||||||
|
MemoryStream memoryStream = new MemoryStream(cipherTextBytes);
|
||||||
|
|
||||||
|
// Define cryptographic stream (always use Read mode for encryption).
|
||||||
|
CryptoStream cryptoStream = new CryptoStream(memoryStream,
|
||||||
|
decryptor,
|
||||||
|
CryptoStreamMode.Read);
|
||||||
|
|
||||||
|
// Since at this point we don't know what the size of decrypted data
|
||||||
|
// will be, allocate the buffer long enough to hold ciphertext;
|
||||||
|
// plaintext is never longer than ciphertext.
|
||||||
|
byte[] plainTextBytes = new byte[cipherTextBytes.Length];
|
||||||
|
|
||||||
|
// Start decrypting.
|
||||||
|
int decryptedByteCount = cryptoStream.Read(plainTextBytes,
|
||||||
|
0,
|
||||||
|
plainTextBytes.Length);
|
||||||
|
|
||||||
|
// Close both streams.
|
||||||
|
memoryStream.Close();
|
||||||
|
cryptoStream.Close();
|
||||||
|
|
||||||
|
// Convert decrypted data into a string.
|
||||||
|
// Let us assume that the original plaintext string was UTF8-encoded.
|
||||||
|
string plainText = Encoding.UTF8.GetString(plainTextBytes,
|
||||||
|
0,
|
||||||
|
decryptedByteCount);
|
||||||
|
|
||||||
|
// Return decrypted string.
|
||||||
|
return plainText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Encryptar(string plainText)
|
||||||
|
{
|
||||||
|
// Convert strings into byte arrays.
|
||||||
|
// Let us assume that strings only contain ASCII codes.
|
||||||
|
// If strings include Unicode characters, use Unicode, UTF7, or UTF8
|
||||||
|
// encoding.
|
||||||
|
byte[] initVectorBytes = Encoding.ASCII.GetBytes(initVector);
|
||||||
|
byte[] saltValueBytes = Encoding.ASCII.GetBytes(saltValue);
|
||||||
|
|
||||||
|
// Convert our plaintext into a byte array.
|
||||||
|
// Let us assume that plaintext contains UTF8-encoded characters.
|
||||||
|
byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
|
||||||
|
|
||||||
|
// First, we must create a password, from which the key will be derived.
|
||||||
|
// This password will be generated from the specified passphrase and
|
||||||
|
// salt value. The password will be created using the specified hash
|
||||||
|
// algorithm. Password creation can be done in several iterations.
|
||||||
|
PasswordDeriveBytes password = new PasswordDeriveBytes(
|
||||||
|
passPhrase,
|
||||||
|
saltValueBytes,
|
||||||
|
hashAlgorithm,
|
||||||
|
passwordIterations);
|
||||||
|
|
||||||
|
// Use the password to generate pseudo-random bytes for the encryption
|
||||||
|
// key. Specify the size of the key in bytes (instead of bits).
|
||||||
|
byte[] keyBytes = password.GetBytes(keySize / 8);
|
||||||
|
|
||||||
|
// Create uninitialized Rijndael encryption object.
|
||||||
|
RijndaelManaged symmetricKey = new RijndaelManaged();
|
||||||
|
|
||||||
|
// It is reasonable to set encryption mode to Cipher Block Chaining
|
||||||
|
// (CBC). Use default options for other symmetric key parameters.
|
||||||
|
symmetricKey.Mode = CipherMode.CBC;
|
||||||
|
|
||||||
|
// Generate encryptor from the existing key bytes and initialization
|
||||||
|
// vector. Key size will be defined based on the number of the key
|
||||||
|
// bytes.
|
||||||
|
ICryptoTransform encryptor = symmetricKey.CreateEncryptor(
|
||||||
|
keyBytes,
|
||||||
|
initVectorBytes);
|
||||||
|
|
||||||
|
// Define memory stream which will be used to hold encrypted data.
|
||||||
|
MemoryStream memoryStream = new MemoryStream();
|
||||||
|
|
||||||
|
// Define cryptographic stream (always use Write mode for encryption).
|
||||||
|
CryptoStream cryptoStream = new CryptoStream(memoryStream,
|
||||||
|
encryptor,
|
||||||
|
CryptoStreamMode.Write);
|
||||||
|
// Start encrypting.
|
||||||
|
cryptoStream.Write(plainTextBytes, 0, plainTextBytes.Length);
|
||||||
|
|
||||||
|
// Finish encrypting.
|
||||||
|
cryptoStream.FlushFinalBlock();
|
||||||
|
|
||||||
|
// Convert our encrypted data from a memory stream into a byte array.
|
||||||
|
byte[] cipherTextBytes = memoryStream.ToArray();
|
||||||
|
|
||||||
|
// Close both streams.
|
||||||
|
memoryStream.Close();
|
||||||
|
cryptoStream.Close();
|
||||||
|
|
||||||
|
// Convert encrypted data into a base64-encoded string.
|
||||||
|
string cipherText = Convert.ToBase64String(cipherTextBytes);
|
||||||
|
|
||||||
|
// Return encrypted string.
|
||||||
|
return cipherText;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
100
AYA.FROPI/AyABL/AUT/FiltroBuscador/FiltroBuscadorBL.cs
Normal file
100
AYA.FROPI/AyABL/AUT/FiltroBuscador/FiltroBuscadorBL.cs
Normal file
|
|
@ -0,0 +1,100 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
public enum SearchTypesEnum { All, Users, Groups, Container, OrganizationalUnit }
|
||||||
|
public enum AttributeEnum { cn, givenName, sn, SamAccountName, CommonName, FirstName, LastName, Logon }
|
||||||
|
|
||||||
|
namespace AyABL.AUT.FiltroBuscador
|
||||||
|
{
|
||||||
|
public class FiltroBuscadorBL
|
||||||
|
{
|
||||||
|
private NameValueCollection _attributes = new NameValueCollection();
|
||||||
|
private string _filter = string.Empty;
|
||||||
|
private string _objectClass = string.Empty;
|
||||||
|
private string _parentObject = string.Empty;
|
||||||
|
|
||||||
|
private string[] _attributeStrings = new string[] { "cn", "givenName", "sn", "SamAccountName", "cn", "givenName", "sn", "SamAccountName" };
|
||||||
|
private string[] _searchTypesStrings = new string[] { "*", "user", "group", "container", "organizationalunit" };
|
||||||
|
|
||||||
|
|
||||||
|
private const string ATTRIBUTE_FORMAT = "({0}={1})";
|
||||||
|
private const string FILTER_FORMAT = "(&(objectClass={0}){1})";
|
||||||
|
|
||||||
|
public FiltroBuscadorBL()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public FiltroBuscadorBL(string customFilter)
|
||||||
|
{
|
||||||
|
_filter = customFilter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FiltroBuscadorBL(SearchTypesEnum searchType)
|
||||||
|
{
|
||||||
|
_objectClass = _searchTypesStrings[(int)searchType];
|
||||||
|
}
|
||||||
|
|
||||||
|
public FiltroBuscadorBL(AttributeEnum attribute, string searchText, SearchTypesEnum searchType)
|
||||||
|
{
|
||||||
|
_objectClass = _searchTypesStrings[(int)searchType];
|
||||||
|
AddAttribute(attribute, searchText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FiltroBuscadorBL(string attribute, string searchText, SearchTypesEnum searchType)
|
||||||
|
{
|
||||||
|
_objectClass = _searchTypesStrings[(int)searchType];
|
||||||
|
AddAttribute(attribute, searchText);
|
||||||
|
}
|
||||||
|
|
||||||
|
private string BuildFilter()
|
||||||
|
{
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
foreach (string attributeName in _attributes.AllKeys)
|
||||||
|
{
|
||||||
|
builder.Append(string.Format(ATTRIBUTE_FORMAT, attributeName, _attributes[attributeName]));
|
||||||
|
}
|
||||||
|
return builder.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddAttribute(string attribute, string searchText)
|
||||||
|
{
|
||||||
|
if (searchText != null && searchText.Trim() != string.Empty)
|
||||||
|
{
|
||||||
|
_attributes.Add(attribute, searchText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddAttribute(AttributeEnum attribute, string searchText)
|
||||||
|
{
|
||||||
|
AddAttribute(_attributeStrings[(int)attribute], searchText);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ObjectClass
|
||||||
|
{
|
||||||
|
get { return _objectClass; }
|
||||||
|
set { _objectClass = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ParentObject
|
||||||
|
{
|
||||||
|
get { return _parentObject; }
|
||||||
|
set { _parentObject = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Filter
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (String.Empty != this._filter)
|
||||||
|
{
|
||||||
|
return this._filter;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return String.Format(FILTER_FORMAT, this._objectClass, this.BuildFilter());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
119
AYA.FROPI/AyABL/AUT/Login/LoginBL.cs
Normal file
119
AYA.FROPI/AyABL/AUT/Login/LoginBL.cs
Normal file
|
|
@ -0,0 +1,119 @@
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
namespace AyABL.AUT.Login
|
||||||
|
{
|
||||||
|
public class LoginBL
|
||||||
|
{
|
||||||
|
public LoginBL()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private string _cn = string.Empty;
|
||||||
|
private string _ldapPath = string.Empty;
|
||||||
|
private string _parentLdapPath = string.Empty;
|
||||||
|
private string _firstName = string.Empty;
|
||||||
|
private string _lastName = string.Empty;
|
||||||
|
private string _logonName = string.Empty;
|
||||||
|
private ArrayList _groups = new ArrayList();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Propiedad que mape la propiedades que se desean consultar.
|
||||||
|
/// </summary>
|
||||||
|
public static string PropertyMappingsRead
|
||||||
|
{
|
||||||
|
get { return "CN=cn,FirstName=givenName,LastName=sn,LogonName=sAMAccountName,Groups=memberOf"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Utilizada para actualizar los mapeos.
|
||||||
|
/// </summary>
|
||||||
|
public static string PropertyMappingsUpdate
|
||||||
|
{
|
||||||
|
get { return ""; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Utilizada para Crear un nuevo mapeo.
|
||||||
|
/// </summary>
|
||||||
|
public static string PropertyMappingsCreate
|
||||||
|
{
|
||||||
|
get { return ""; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clase usuario.
|
||||||
|
/// </summary>
|
||||||
|
public static string ObjectClass
|
||||||
|
{
|
||||||
|
get { return "user"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Crea el string. con el formato "Cn="-
|
||||||
|
/// </summary>
|
||||||
|
public string CreateString
|
||||||
|
{
|
||||||
|
get { return "CN=" + _cn; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Propiedad Cn.
|
||||||
|
/// </summary>
|
||||||
|
public string CN
|
||||||
|
{
|
||||||
|
get { return _cn; }
|
||||||
|
set { _cn = value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Path del usuario que se consulto.
|
||||||
|
/// </summary>
|
||||||
|
public string LdapPath
|
||||||
|
{
|
||||||
|
get { return _ldapPath; }
|
||||||
|
set { _ldapPath = value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Path del objeto padre del usuario.
|
||||||
|
/// </summary>
|
||||||
|
public string ParentLdapPath
|
||||||
|
{
|
||||||
|
get { return _parentLdapPath; }
|
||||||
|
set { _parentLdapPath = value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Primer nombre en el active directory.
|
||||||
|
/// </summary>
|
||||||
|
public string FirstName
|
||||||
|
{
|
||||||
|
get { return _firstName; }
|
||||||
|
set { _firstName = value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Apellido del usuario. Informacion del AD.
|
||||||
|
/// </summary>
|
||||||
|
public string LastName
|
||||||
|
{
|
||||||
|
get { return _lastName; }
|
||||||
|
set { _lastName = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Login de Usuario. Informacion del AD.
|
||||||
|
/// </summary>
|
||||||
|
public string LogonName
|
||||||
|
{
|
||||||
|
get { return _logonName; }
|
||||||
|
set { _logonName = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grupos a los que pertenese. Informacion del AD.
|
||||||
|
/// </summary>
|
||||||
|
public ArrayList Groups
|
||||||
|
{
|
||||||
|
get { return _groups; }
|
||||||
|
set { _groups = value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
91
AYA.FROPI/AyABL/AUT/PropiedadesAyuda/PropiedadesAyudaBL.cs
Normal file
91
AYA.FROPI/AyABL/AUT/PropiedadesAyuda/PropiedadesAyudaBL.cs
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace AyABL.AUT.PropiedadesAyuda
|
||||||
|
{
|
||||||
|
public class PropiedadesAyudaBL
|
||||||
|
{
|
||||||
|
public PropiedadesAyudaBL()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public static object GetObject( Type objectType, Hashtable properties )
|
||||||
|
{
|
||||||
|
object newObject = Activator.CreateInstance( objectType );
|
||||||
|
foreach ( object key in properties.Keys )
|
||||||
|
{
|
||||||
|
string keyName = key.ToString();
|
||||||
|
object propertyValue = properties[ key ];
|
||||||
|
PropertyInfo property = objectType.GetProperty( keyName );
|
||||||
|
if ( property != null )
|
||||||
|
{
|
||||||
|
property.GetSetMethod().Invoke( newObject, new object[]{ propertyValue } );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return newObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FillObject( object theObject, Hashtable properties )
|
||||||
|
{
|
||||||
|
Type objectType = theObject.GetType();
|
||||||
|
foreach ( string key in properties.Keys )
|
||||||
|
{
|
||||||
|
string keyName = key.ToString();
|
||||||
|
object propertyValue = properties[ key ];
|
||||||
|
PropertyInfo property = objectType.GetProperty( keyName );
|
||||||
|
if ( property != null )
|
||||||
|
{
|
||||||
|
if ( property.PropertyType == typeof( ArrayList ) && !( propertyValue is ArrayList ) )
|
||||||
|
{
|
||||||
|
if ( propertyValue != null )
|
||||||
|
{
|
||||||
|
ArrayList values = property.GetValue( theObject, null ) as ArrayList;
|
||||||
|
values.Add( propertyValue );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( propertyValue != null )
|
||||||
|
{
|
||||||
|
property.GetSetMethod().Invoke( theObject, new object[]{ propertyValue } );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Hashtable GetProperties( object theObject )
|
||||||
|
{
|
||||||
|
Type objectType = theObject.GetType();
|
||||||
|
Hashtable properties = new Hashtable();
|
||||||
|
foreach ( PropertyInfo property in objectType.GetProperties() )
|
||||||
|
{
|
||||||
|
object propertyValue = property.GetValue( theObject, null );
|
||||||
|
properties.Add( property.Name, propertyValue );
|
||||||
|
}
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static object GetProperty( object theObject, string propertyName, object defaultValue )
|
||||||
|
{
|
||||||
|
Type objectType = theObject.GetType();
|
||||||
|
PropertyInfo property = objectType.GetProperty( propertyName );
|
||||||
|
if ( property == null )
|
||||||
|
{
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return property.GetValue( theObject, null );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool PropertyIsInExcludeList( string propertyName, string excludeList )
|
||||||
|
{
|
||||||
|
string[] list = excludeList.Split( ',' );
|
||||||
|
return ( Array.IndexOf( list, propertyName ) >= -1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
13
AYA.FROPI/AyABL/App.config
Normal file
13
AYA.FROPI/AyABL/App.config
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||||
|
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||||
|
</configSections>
|
||||||
|
<entityFramework>
|
||||||
|
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
||||||
|
<providers>
|
||||||
|
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||||
|
</providers>
|
||||||
|
</entityFramework>
|
||||||
|
</configuration>
|
||||||
270
AYA.FROPI/AyABL/AyABL.cs
Normal file
270
AYA.FROPI/AyABL/AyABL.cs
Normal file
|
|
@ -0,0 +1,270 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
using System.Data;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AyABL
|
||||||
|
{
|
||||||
|
public class AyABL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
// Para comunicar la capa BL con la capa AyADL
|
||||||
|
protected BaseDAL baseDAL = new BaseDAL();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Nombre de la tabla en la base de datos
|
||||||
|
/// </summary>
|
||||||
|
protected string NombreTabla { get; set; }
|
||||||
|
|
||||||
|
// Setea o devuelve los campos que deseo recuperar de la base de datos
|
||||||
|
protected string CamposTabla = "*";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Nombre de la coneccion a la base de datos
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
protected string NombreConeccionBD = "FOPI";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Nombre de la tabla en la base de datos
|
||||||
|
/// </summary>
|
||||||
|
protected string NombreProcedimiento { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Guarda los valores ingresados por el usuario los cuales se van a enviar a la base de datos
|
||||||
|
/// </summary>
|
||||||
|
protected object[] ValoresCampos { get; set; }
|
||||||
|
|
||||||
|
private string strSentenciaSQL = "";
|
||||||
|
|
||||||
|
private DataSet dsResultado = new DataSet();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Parametros
|
||||||
|
|
||||||
|
public enum Parametros
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos Personalizados
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Carga las condiciones de busqueda ingresadas por el usuario y las convierte a tipo CondicionDAL
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="arlCondiciones"></param>
|
||||||
|
/// <param name="condicionesBusqueda"></param>
|
||||||
|
protected void cargarCondicionBusqueda(ArrayList arlCondicionesDestino, ArrayList condicionesBusquedaOrigen)
|
||||||
|
{
|
||||||
|
if (condicionesBusquedaOrigen != null && condicionesBusquedaOrigen.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (CondicionDAL cdlCondicion in condicionesBusquedaOrigen)
|
||||||
|
{
|
||||||
|
arlCondicionesDestino.Add(cdlCondicion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// Método que retorna la llave próxima a insertar en la tabla para
|
||||||
|
///// llaves que estan definidas como identity
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="strTableName">Nombre de la tabla</param>
|
||||||
|
///// <param name="strConnectionString">string de conexión</param>
|
||||||
|
///// <returns>Proxima PK a insertar</returns>
|
||||||
|
public int SiguientePKAutoIncremental(string p_strNombreTabla, string p_strConnectionString)
|
||||||
|
{
|
||||||
|
dsResultado = new DataSet();
|
||||||
|
int intValorRetornado = 0;
|
||||||
|
|
||||||
|
strSentenciaSQL = String.Format("{0} {1}('{2}')", clausulasDML.SELECT, funcionesTLAgg.IDENT_CURRENT, p_strNombreTabla);
|
||||||
|
|
||||||
|
dsResultado = baseDAL.ejecutarConsulta(strSentenciaSQL, null, p_strConnectionString);
|
||||||
|
|
||||||
|
if (dsResultado != null && dsResultado.Tables[0].Rows.Count > 0 &&
|
||||||
|
dsResultado.Tables[0].Rows[0][0] != null &&
|
||||||
|
!String.IsNullOrEmpty(dsResultado.Tables[0].Rows[0][0].ToString()))
|
||||||
|
intValorRetornado = (int.Parse(dsResultado.Tables[0].Rows[0][0].ToString()) + 1);
|
||||||
|
else
|
||||||
|
return intValorRetornado;
|
||||||
|
|
||||||
|
return intValorRetornado;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Devuelve la condicion de busqueda por pk
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_intPK"></param>
|
||||||
|
/// <param name="p_nombreTabla"></param>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
protected CondicionDAL buscarPorPK(Nullable<int> p_intPK, Tablas p_nombreTabla, operadorLogico logOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Constraints.PK.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.valorDerecho = p_intPK;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Devuelve la condicion de busqueda por fk
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_intFK"></param>
|
||||||
|
/// <param name="p_nombreTabla"></param>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
protected CondicionDAL buscarPorFK(Nullable<int> p_intFK, Tablas p_nombreTabla, operadorLogico logOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Constraints.FK.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.valorDerecho = p_intFK;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorAstate(Nullable<bool> p_blnAstate, Tablas p_nombreTabla, operadorLogico operador)
|
||||||
|
{
|
||||||
|
int intValor = 0;
|
||||||
|
|
||||||
|
//Se utiliza para hacer la conversión cuando el valor es booleano
|
||||||
|
if (p_blnAstate == true)
|
||||||
|
intValor = 1;
|
||||||
|
else
|
||||||
|
intValor = 0;
|
||||||
|
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Concepto.ASTATE.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = intValor;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorVistoBuenoPlanificacion(Nullable<bool> p_blnVistoBueno, Tablas p_nombreTabla, operadorLogico operador)
|
||||||
|
{
|
||||||
|
int intValor = 0;
|
||||||
|
|
||||||
|
//Se utiliza para hacer la conversión cuando el valor es booleano
|
||||||
|
if (p_blnVistoBueno == true)
|
||||||
|
intValor = 1;
|
||||||
|
else
|
||||||
|
intValor = 0;
|
||||||
|
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = t_agp_proyecto.VISTOBUENOPLANIFICACION.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = intValor;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Devuelve la condicion de busqueda por pk
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_intPK"></param>
|
||||||
|
/// <param name="p_nombreTabla"></param>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
protected CondicionDAL buscarPorPadre(Nullable<int> p_intPKPadre, Tablas p_nombreTabla, operadorLogico logOp, operadorGeneral genOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Concepto.PADRE.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = genOp;
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.valorDerecho = p_intPKPadre;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Devuelve la condición de busqueda por prefijo
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_strPrefijo"></param>
|
||||||
|
/// <param name="p_nombreTabla"></param>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
protected CondicionDAL buscarPorCodigo(string p_strCodigo, Tablas p_nombreTabla, operadorLogico logOp, operadorGeneral genOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = t_adm_dependencia.CODIGOACCESO.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = genOp;
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.valorDerecho = p_strCodigo;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Metodo que se utiliza para construir una condicion de los registro que están o no Activos
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_blnActivo"></param>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorActivo(Nullable<bool> p_blnActivo, Tablas p_nombreTabla, operadorLogico operador)
|
||||||
|
{
|
||||||
|
int intValor = 0;
|
||||||
|
|
||||||
|
//Se utiliza para hacer la conversión cuando el valor es booleano
|
||||||
|
if (p_blnActivo == true)
|
||||||
|
intValor = 1;
|
||||||
|
else
|
||||||
|
intValor = 0;
|
||||||
|
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Concepto.ACTIVO.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = intValor;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_nombreTabla"></param>
|
||||||
|
/// <param name="p_dteFechaInicio"></param>
|
||||||
|
/// <param name="p_dteFechaFinal"></param>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ArrayList buscarPorFechas(Tablas p_nombreTabla, DateTime p_dteFechaInicio, DateTime p_dteFechaFinal, operadorLogico operador)
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Concepto.FECHA.ToString() + p_nombreTabla.ToString();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.BIGGEREQUALTHAN;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = p_dteFechaInicio;
|
||||||
|
arlCondiciones.Add(cdlCondicion);
|
||||||
|
|
||||||
|
cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Concepto.FECHA.ToString() + p_nombreTabla.ToString();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.SMALLEREQUALTHAN;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = p_dteFechaFinal;
|
||||||
|
arlCondiciones.Add(cdlCondicion);
|
||||||
|
|
||||||
|
return arlCondiciones;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorColumna(string p_strValor, string p_strColumna, operadorLogico operador)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = p_strColumna.ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = p_strValor;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
169
AYA.FROPI/AyABL/AyABL.csproj
Normal file
169
AYA.FROPI/AyABL/AyABL.csproj
Normal file
|
|
@ -0,0 +1,169 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{C3C8CE41-C68F-4873-A5FC-2A77E4CE43DA}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>AyABL</RootNamespace>
|
||||||
|
<AssemblyName>AyABL</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<SccProjectName>SAK</SccProjectName>
|
||||||
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
|
<SccAuxPath>SAK</SccAuxPath>
|
||||||
|
<SccProvider>SAK</SccProvider>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="AjaxControlToolkit, Version=16.1.1.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\Base\packages\AjaxControlToolkit.16.1.1.0\lib\net40\AjaxControlToolkit.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="EntityFramework">
|
||||||
|
<HintPath>..\Base\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="EntityFramework.SqlServer">
|
||||||
|
<HintPath>..\Base\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\Base\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.Common.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.ReportViewer.ProcessingObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\Base\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.ProcessingObjectModel.DLL</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\Base\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.WebForms.DLL</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.DirectoryServices" />
|
||||||
|
<Reference Include="System.Web" />
|
||||||
|
<Reference Include="System.Web.Entity" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="ADM\CatalogoBL.cs" />
|
||||||
|
<Compile Include="ADM\ComplejidadBL.cs" />
|
||||||
|
<Compile Include="ADM\DependenciaBL.cs" />
|
||||||
|
<Compile Include="ADM\EstadoBL.cs" />
|
||||||
|
<Compile Include="ADM\FuenteFinanciamientoBL.cs" />
|
||||||
|
<Compile Include="ADM\PartidaPresupuestariaBL.cs" />
|
||||||
|
<Compile Include="ADM\ProcedenciaCentrogestorBL.cs" />
|
||||||
|
<Compile Include="ADM\ProgramaBL.cs" />
|
||||||
|
<Compile Include="ADM\RecursoBL.cs" />
|
||||||
|
<Compile Include="ADM\RegionBL.cs" />
|
||||||
|
<Compile Include="ADM\TipoRecursoHumanoBL.cs" />
|
||||||
|
<Compile Include="ADM\UbicacionBL.cs" />
|
||||||
|
<Compile Include="CIP\CierreBL.cs" />
|
||||||
|
<Compile Include="CIP\ComentarioBL.cs" />
|
||||||
|
<Compile Include="CIP\LeccionBL.cs" />
|
||||||
|
<Compile Include="IGP\CentroGestorBL.cs" />
|
||||||
|
<Compile Include="AGP\ObjetivoEspecificoBL.cs" />
|
||||||
|
<Compile Include="AGP\ProyectoBL.cs" />
|
||||||
|
<Compile Include="AGP\ResultadoBL.cs" />
|
||||||
|
<Compile Include="IGP\InformacionGeneralBL.cs" />
|
||||||
|
<Compile Include="IGP\RelacionPlanEstrategicoBL.cs" />
|
||||||
|
<Compile Include="IGP\TipoCambioBL.cs" />
|
||||||
|
<Compile Include="CVP\CicloVidaBL.cs" />
|
||||||
|
<Compile Include="CVP\EtapaBL.cs" />
|
||||||
|
<Compile Include="CVP\RespuestaEtapaBL.cs" />
|
||||||
|
<Compile Include="EVP\AnalisisAmbientalBL.cs" />
|
||||||
|
<Compile Include="EVP\EvaluacionSocialBL.cs" />
|
||||||
|
<Compile Include="EVP\EvaluacionCostosBL.cs" />
|
||||||
|
<Compile Include="EVP\EvaluacionFinancieraBL.cs" />
|
||||||
|
<Compile Include="EVP\AnalisisRiesgoBL.cs" />
|
||||||
|
<Compile Include="FNP\EndeudamientoBL.cs" />
|
||||||
|
<Compile Include="FNP\FinanciamientoBL.cs" />
|
||||||
|
<Compile Include="ICP\InformacionBL.cs" />
|
||||||
|
<Compile Include="ICP\ObservacionBL.cs" />
|
||||||
|
<Compile Include="PLE\ObjetivoBL.cs" />
|
||||||
|
<Compile Include="PLE\PerspectivaBL.cs" />
|
||||||
|
<Compile Include="PLE\PlanEstrategicoBL.cs" />
|
||||||
|
<Compile Include="PLE\TemaEstrategicoBL.cs" />
|
||||||
|
<Compile Include="PPP\DistribucionPartidaBL.cs" />
|
||||||
|
<Compile Include="RHP\RequerimientoRecursoBL.cs" />
|
||||||
|
<Compile Include="SEG\ComandoBL.cs" />
|
||||||
|
<Compile Include="SEG\MenuBL.cs" />
|
||||||
|
<Compile Include="SEG\MenuComandoBL.cs" />
|
||||||
|
<Compile Include="SEG\RolBL.cs" />
|
||||||
|
<Compile Include="SEG\RolMenuComandoBL.cs" />
|
||||||
|
<Compile Include="AUT\Autenticacion\AutenticacionBL.cs" />
|
||||||
|
<Compile Include="AUT\Encripta\EncriptaBL.cs" />
|
||||||
|
<Compile Include="AUT\FiltroBuscador\FiltroBuscadorBL.cs" />
|
||||||
|
<Compile Include="AUT\Login\LoginBL.cs" />
|
||||||
|
<Compile Include="AUT\PropiedadesAyuda\PropiedadesAyudaBL.cs" />
|
||||||
|
<Compile Include="AyABL.cs" />
|
||||||
|
<Compile Include="SEG\BitacoraBL.cs" />
|
||||||
|
<Compile Include="enumsBL.cs" />
|
||||||
|
<Compile Include="RCS\AccionBitacora.Designer.cs" />
|
||||||
|
<Compile Include="RCS\MensajesAplicacion.Designer.cs" />
|
||||||
|
<Compile Include="RCS\MensajesBitacora.Designer.cs" />
|
||||||
|
<Compile Include="SEG\UsuarioBL.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="SEP\IndicadorProyectoBL.cs" />
|
||||||
|
<Compile Include="SEP\LiderProyectoBL.cs" />
|
||||||
|
<Compile Include="SEP\PeriodoPublicacionBL.cs" />
|
||||||
|
<Compile Include="SEP\VisitanteProyectoBL.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\AyADAL\AyADAL.csproj">
|
||||||
|
<Project>{b93dd461-70f2-4882-b02f-d511739cea14}</Project>
|
||||||
|
<Name>AyADAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\AyAEL\AyAEL.csproj">
|
||||||
|
<Project>{ce52f597-e6c2-45ec-bcde-d9280bd14fef}</Project>
|
||||||
|
<Name>AyAEL</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="RCS\AccionBitacora.resx" />
|
||||||
|
<EmbeddedResource Include="RCS\MensajesAplicacion.resx" />
|
||||||
|
<EmbeddedResource Include="RCS\MensajesBitacora.resx" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
<None Include="fonts\glyphicons-halflings-regular.eot" />
|
||||||
|
<None Include="fonts\glyphicons-halflings-regular.ttf" />
|
||||||
|
<None Include="fonts\glyphicons-halflings-regular.woff" />
|
||||||
|
<None Include="fonts\glyphicons-halflings-regular.woff2" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="fonts\glyphicons-halflings-regular.svg" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
161
AYA.FROPI/AyABL/CIP/CierreBL.cs
Normal file
161
AYA.FROPI/AyABL/CIP/CierreBL.cs
Normal file
|
|
@ -0,0 +1,161 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.CIP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.CIP
|
||||||
|
{
|
||||||
|
public class CierreBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public CierreBL()
|
||||||
|
{
|
||||||
|
objCierreEL = new CierreEL();
|
||||||
|
this.NombreTabla = Modulos.t_cip_.ToString() + Tablas.cierre.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public CierreEL objCierreEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Cierre
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarCierre()
|
||||||
|
{
|
||||||
|
this.CamposTabla = t_cip_cierre.DOCUMENTOFINANCIAMIENTO.ToString() + Tablas.cierre.ToString().ToUpper() + ", " +
|
||||||
|
t_cip_cierre.DOCUMENTOINVERSION.ToString() + Tablas.cierre.ToString().ToUpper() + ", " +
|
||||||
|
t_cip_cierre.DOCUMENTOPREINVERSION.ToString() + Tablas.cierre.ToString().ToUpper() + ", " +
|
||||||
|
t_cip_cierre.FECHACAPITALIZACION.ToString() + Tablas.cierre.ToString().ToUpper() + ", " +
|
||||||
|
t_cip_cierre.MONTOCAPITALIZACION.ToString() + Tablas.cierre.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objCierreEL.DocumentoFinanciamiento,
|
||||||
|
objCierreEL.DocumentoInversion,
|
||||||
|
objCierreEL.DocumentoPreInversion,
|
||||||
|
objCierreEL.FechaCapitalizacion,
|
||||||
|
objCierreEL.MontoCapitalizacion,
|
||||||
|
objCierreEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
return baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Cierre
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarCierre()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objCierreEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objCierreEL.PK, Tablas.cierre, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.cierre, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_cip_cierre.DOCUMENTOFINANCIAMIENTO.ToString() + Tablas.cierre.ToString().ToUpper() + ", " +
|
||||||
|
t_cip_cierre.DOCUMENTOINVERSION.ToString() + Tablas.cierre.ToString().ToUpper() + ", " +
|
||||||
|
t_cip_cierre.DOCUMENTOPREINVERSION.ToString() + Tablas.cierre.ToString().ToUpper() + ", " +
|
||||||
|
t_cip_cierre.FECHACAPITALIZACION.ToString() + Tablas.cierre.ToString().ToUpper() + ", " +
|
||||||
|
t_cip_cierre.MONTOCAPITALIZACION.ToString() + Tablas.cierre.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objCierreEL.DocumentoFinanciamiento,
|
||||||
|
objCierreEL.DocumentoInversion,
|
||||||
|
objCierreEL.DocumentoPreInversion,
|
||||||
|
objCierreEL.FechaCapitalizacion,
|
||||||
|
objCierreEL.MontoCapitalizacion,
|
||||||
|
objCierreEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Cierre
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoCierre()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objCierreEL.PK > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objCierreEL.PK, Tablas.cierre, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.cierre, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.cierre.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objCierreEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Cierrees
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getCierre()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objCierreEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objCierreEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.cierre, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
DataSet dsCierre = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKCierre ASC ");
|
||||||
|
|
||||||
|
return dsCierre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getOtrosDatos()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorPK(objCierreEL.Proyecto, Tablas.proyecto, operadorLogico.NONE));
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_otrosdatos.ToString();
|
||||||
|
|
||||||
|
DataSet dsCierre = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsCierre;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
151
AYA.FROPI/AyABL/CIP/ComentarioBL.cs
Normal file
151
AYA.FROPI/AyABL/CIP/ComentarioBL.cs
Normal file
|
|
@ -0,0 +1,151 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.CIP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.CIP
|
||||||
|
{
|
||||||
|
public class ComentarioBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public ComentarioBL()
|
||||||
|
{
|
||||||
|
objComentarioEL = new ComentarioEL();
|
||||||
|
this.NombreTabla = Modulos.t_cip_.ToString() + Tablas.comentario.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public ComentarioEL objComentarioEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del comentario
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarComentario()
|
||||||
|
{
|
||||||
|
this.CamposTabla = t_cip_comentario.FECHAINGRESO.ToString() + Tablas.comentario.ToString().ToUpper() + ", " +
|
||||||
|
Tablas.comentario.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.cierre.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objComentarioEL.Fecha,
|
||||||
|
objComentarioEL.Comentario,
|
||||||
|
objComentarioEL.Cierre
|
||||||
|
};
|
||||||
|
|
||||||
|
return baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del comentario
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarComentario()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objComentarioEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objComentarioEL.PK, Tablas.comentario, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.comentario, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_cip_comentario.FECHAINGRESO.ToString() + Tablas.comentario.ToString().ToUpper() + ", " +
|
||||||
|
Tablas.comentario.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.cierre.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objComentarioEL.Fecha,
|
||||||
|
objComentarioEL.Comentario,
|
||||||
|
objComentarioEL.Cierre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del comentario
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoComentario()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objComentarioEL.PK > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objComentarioEL.PK, Tablas.comentario, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.comentario, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.comentario.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objComentarioEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los comentarioes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getComentario()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorFK(objComentarioEL.Cierre, Tablas.cierre, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.comentario, operadorLogico.AND));
|
||||||
|
|
||||||
|
DataSet dscomentario = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKcomentario ASC ");
|
||||||
|
|
||||||
|
return dscomentario;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getComentario2()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objComentarioEL.PK != 0)
|
||||||
|
arlCondiciones.Add(buscarPorPK(objComentarioEL.PK, Tablas.comentario, operadorLogico.AND));
|
||||||
|
|
||||||
|
if (this.objComentarioEL.Cierre != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objComentarioEL.Cierre, Tablas.cierre, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.comentario, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
DataSet dscomentario = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKcomentario ASC ");
|
||||||
|
|
||||||
|
return dscomentario;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
151
AYA.FROPI/AyABL/CIP/LeccionBL.cs
Normal file
151
AYA.FROPI/AyABL/CIP/LeccionBL.cs
Normal file
|
|
@ -0,0 +1,151 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.CIP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.CIP
|
||||||
|
{
|
||||||
|
public class LeccionBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public LeccionBL()
|
||||||
|
{
|
||||||
|
objLeccionEL = new LeccionEL();
|
||||||
|
this.NombreTabla = Modulos.t_cip_.ToString() + Tablas.leccion.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public LeccionEL objLeccionEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Leccion
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarLeccion()
|
||||||
|
{
|
||||||
|
this.CamposTabla = t_cip_leccion.EVENTO.ToString() + Tablas.leccion.ToString().ToUpper() + ", " +
|
||||||
|
t_cip_leccion.DESCRIPCION.ToString() + Tablas.leccion.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.cierre.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objLeccionEL.Evento,
|
||||||
|
objLeccionEL.Descripcion,
|
||||||
|
objLeccionEL.Cierre
|
||||||
|
};
|
||||||
|
|
||||||
|
return baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Leccion
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarLeccion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objLeccionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objLeccionEL.PK, Tablas.leccion, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.leccion, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_cip_leccion.EVENTO.ToString() + Tablas.leccion.ToString().ToUpper() + ", " +
|
||||||
|
t_cip_leccion.DESCRIPCION.ToString() + Tablas.leccion.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.cierre.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objLeccionEL.Evento,
|
||||||
|
objLeccionEL.Descripcion,
|
||||||
|
objLeccionEL.Cierre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Leccion
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoLeccion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objLeccionEL.PK > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objLeccionEL.PK, Tablas.leccion, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.leccion, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.leccion.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objLeccionEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Lecciones
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getLeccion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorFK(objLeccionEL.Cierre, Tablas.cierre, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.leccion, operadorLogico.AND));
|
||||||
|
|
||||||
|
DataSet dsLeccion = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKLeccion ASC ");
|
||||||
|
|
||||||
|
return dsLeccion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getLeccion2()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objLeccionEL.PK != 0)
|
||||||
|
arlCondiciones.Add(buscarPorPK(objLeccionEL.PK, Tablas.leccion, operadorLogico.AND));
|
||||||
|
|
||||||
|
if (this.objLeccionEL.Cierre != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objLeccionEL.Cierre, Tablas.cierre, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.leccion, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
DataSet dsLeccion = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKLeccion ASC ");
|
||||||
|
|
||||||
|
return dsLeccion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
177
AYA.FROPI/AyABL/CVP/CicloVidaBL.cs
Normal file
177
AYA.FROPI/AyABL/CVP/CicloVidaBL.cs
Normal file
|
|
@ -0,0 +1,177 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.CVP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.CVP
|
||||||
|
{
|
||||||
|
public class CicloVidaBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public CicloVidaBL()
|
||||||
|
{
|
||||||
|
objCicloVidaEL = new CicloVidaEL();
|
||||||
|
this.NombreTabla = Modulos.t_cvp_.ToString() + Tablas.ciclovida.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public CicloVidaEL objCicloVidaEL { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del CicloVida
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarCicloVida()
|
||||||
|
{
|
||||||
|
int intEjecutado = 0;
|
||||||
|
|
||||||
|
this.CamposTabla = t_cvp_ciclovida.PORCENTAJE.ToString() + Tablas.ciclovida.ToString().ToUpper() + ", " +
|
||||||
|
t_cvp_ciclovida.MONTO.ToString() + Tablas.ciclovida.ToString().ToUpper() + ", " +
|
||||||
|
//t_cvp_ciclovida.FECHAETAPAANTERIOR.ToString() + Tablas.ciclovida.ToString().ToUpper() + ", " +
|
||||||
|
//t_cvp_ciclovida.FECHAAPROBACION.ToString() + Tablas.ciclovida.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_cvp_ciclovida.ETAPAACTUAL.ToString().ToUpper() + ", " +
|
||||||
|
//Constraints.FK.ToString() + t_cvp_ciclovida.ETAPAANTERIOR.ToString().ToUpper() + ", " +
|
||||||
|
//Constraints.FK.ToString() + t_cvp_ciclovida.FASEEJECUCION.ToString().ToUpper() + ", " +
|
||||||
|
//Constraints.FK.ToString() + t_cvp_ciclovida.ESTUDIOFACTIBILIDAD.ToString().ToUpper() + ", " +
|
||||||
|
//Constraints.FK.ToString() + t_cvp_ciclovida.EJECUTAPROYECTO.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objCicloVidaEL.Porcentaje,
|
||||||
|
objCicloVidaEL.Monto,
|
||||||
|
//objCicloVidaEL.FechaEtapaAnterior,
|
||||||
|
//objCicloVidaEL.FechaAprobacion,
|
||||||
|
objCicloVidaEL.EtapaActual,
|
||||||
|
//objCicloVidaEL.EtapaAnterior,
|
||||||
|
//objCicloVidaEL.FaseEjecucion,
|
||||||
|
//objCicloVidaEL.EstudioFactibilidad,
|
||||||
|
//objCicloVidaEL.EjecutaProyecto,
|
||||||
|
objCicloVidaEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
intEjecutado = baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return intEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del CicloVida
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarCicloVida()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objCicloVidaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objCicloVidaEL.PK, Tablas.ciclovida, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_cvp_ciclovida.PORCENTAJE.ToString() + Tablas.ciclovida.ToString().ToUpper() + ", " +
|
||||||
|
t_cvp_ciclovida.MONTO.ToString() + Tablas.ciclovida.ToString().ToUpper() + ", " +
|
||||||
|
//t_cvp_ciclovida.FECHAETAPAANTERIOR.ToString() + Tablas.ciclovida.ToString().ToUpper() + ", " +
|
||||||
|
//t_cvp_ciclovida.FECHAAPROBACION.ToString() + Tablas.ciclovida.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_cvp_ciclovida.ETAPAACTUAL.ToString().ToUpper(); // + ", " +
|
||||||
|
//Constraints.FK.ToString() + t_cvp_ciclovida.ETAPAANTERIOR.ToString().ToUpper() + ", " +
|
||||||
|
//Constraints.FK.ToString() + t_cvp_ciclovida.FASEEJECUCION.ToString().ToUpper() + ", " +
|
||||||
|
//Constraints.FK.ToString() + t_cvp_ciclovida.ESTUDIOFACTIBILIDAD.ToString().ToUpper() + ", " +
|
||||||
|
//Constraints.FK.ToString() + t_cvp_ciclovida.EJECUTAPROYECTO.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objCicloVidaEL.Porcentaje,
|
||||||
|
objCicloVidaEL.Monto,
|
||||||
|
//objCicloVidaEL.FechaEtapaAnterior,
|
||||||
|
//objCicloVidaEL.FechaAprobacion,
|
||||||
|
objCicloVidaEL.EtapaActual
|
||||||
|
//objCicloVidaEL.EtapaAnterior,
|
||||||
|
//objCicloVidaEL.FaseEjecucion,
|
||||||
|
//objCicloVidaEL.EstudioFactibilidad,
|
||||||
|
//objCicloVidaEL.EjecutaProyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del CicloVida
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoCicloVida()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objCicloVidaEL.Proyecto, Tablas.proyecto, operadorLogico.NONE));
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.ciclovida.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objCicloVidaEL.ASTATE = false };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los CicloVidaes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getCicloVida()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objCicloVidaEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objCicloVidaEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.ciclovida, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsCicloVida = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKCicloVida ASC ");
|
||||||
|
|
||||||
|
return dsCicloVida;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getFichaCicloVida()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorFK(objCicloVidaEL.Proyecto, Tablas.proyecto, operadorLogico.NONE));
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_fichaciclovida.ToString();
|
||||||
|
|
||||||
|
DataSet dsCicloVida = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKCicloVida ASC ");
|
||||||
|
|
||||||
|
return dsCicloVida;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
178
AYA.FROPI/AyABL/CVP/EtapaBL.cs
Normal file
178
AYA.FROPI/AyABL/CVP/EtapaBL.cs
Normal file
|
|
@ -0,0 +1,178 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.CVP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.CVP
|
||||||
|
{
|
||||||
|
public class EtapaBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public EtapaBL()
|
||||||
|
{
|
||||||
|
objEtapaEL = new EtapaEL();
|
||||||
|
this.NombreTabla = Modulos.t_cvp_.ToString() + Tablas.etapa.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public EtapaEL objEtapaEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Etapa
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarEtapa()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = t_cvp_etapa.FECHAINICIO.ToString() + Tablas.etapa.ToString().ToUpper() + ", " +
|
||||||
|
t_cvp_etapa.FECHAFIN.ToString() + Tablas.etapa.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_cvp_etapa.SITUACIONACTUAL.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.etapa.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objEtapaEL.FechaInicio,
|
||||||
|
objEtapaEL.FechaFin,
|
||||||
|
objEtapaEL.SituacionActual,
|
||||||
|
objEtapaEL.Etapa,
|
||||||
|
objEtapaEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Etapa
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarEtapa()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objEtapaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objEtapaEL.PK, Tablas.etapa, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_cvp_etapa.FECHAINICIO.ToString() + Tablas.etapa.ToString().ToUpper() + ", " +
|
||||||
|
t_cvp_etapa.FECHAFIN.ToString() + Tablas.etapa.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_cvp_etapa.SITUACIONACTUAL.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.etapa.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objEtapaEL.FechaInicio,
|
||||||
|
objEtapaEL.FechaFin,
|
||||||
|
objEtapaEL.SituacionActual,
|
||||||
|
objEtapaEL.Etapa,
|
||||||
|
objEtapaEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Etapa
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoEtapa()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objEtapaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objEtapaEL.PK, Tablas.etapa, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.etapa.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objEtapaEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Etapaes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getEtapa()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objEtapaEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objEtapaEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.objEtapaEL.Etapa != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objEtapaEL.Etapa, Tablas.catalogo, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_etapasproyecto.ToString();
|
||||||
|
|
||||||
|
DataSet dsEtapa = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY FKETAPA ASC ");
|
||||||
|
|
||||||
|
return dsEtapa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getEtapa2()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objEtapaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objEtapaEL.PK, Tablas.etapa, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.objEtapaEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objEtapaEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_etapasproyecto.ToString();
|
||||||
|
|
||||||
|
DataSet dsEtapa = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY FKETAPA ASC ");
|
||||||
|
|
||||||
|
return dsEtapa;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
110
AYA.FROPI/AyABL/CVP/RespuestaEtapaBL.cs
Normal file
110
AYA.FROPI/AyABL/CVP/RespuestaEtapaBL.cs
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.CVP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AyABL.CVP
|
||||||
|
{
|
||||||
|
public class RespuestaEtapaBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public RespuestaEtapaBL()
|
||||||
|
{
|
||||||
|
objRespuestaEtapaEL = new RespuestaEtapaEL();
|
||||||
|
this.NombreTabla = Modulos.t_cvp_.ToString() + Tablas.respuestaetapa.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public RespuestaEtapaEL objRespuestaEtapaEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del RespuestaEtapa
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarRespuestaEtapa()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = Constraints.PK.ToString() + Tablas.ciclovida.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.PK.ToString() + Tablas.catalogo.ToString().ToUpper() + ", " +
|
||||||
|
t_cvp_respuestaetapa.OTRO.ToString() + Tablas.respuestaetapa.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objRespuestaEtapaEL.CicloVida,
|
||||||
|
objRespuestaEtapaEL.Catalogo,
|
||||||
|
objRespuestaEtapaEL.Otro
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del RespuestaEtapa
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool borrarRespuestaEtapa()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objRespuestaEtapaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objRespuestaEtapaEL.PK, Tablas.respuestaetapa, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los RespuestaEtapaes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getRespuestaEtapa()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objRespuestaEtapaEL.CicloVida != 0)
|
||||||
|
arlCondiciones.Add(buscarPorFK(objRespuestaEtapaEL.CicloVida, Tablas.ciclovida, operadorLogico.AND));
|
||||||
|
|
||||||
|
if (this.objRespuestaEtapaEL.Catalogo != 0)
|
||||||
|
arlCondiciones.Add(buscarPorFK(objRespuestaEtapaEL.CicloVida, Tablas.ciclovida, operadorLogico.NONE));
|
||||||
|
|
||||||
|
DataSet dsRespuestaEtapa = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKRespuestaEtapa ASC ");
|
||||||
|
|
||||||
|
return dsRespuestaEtapa;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
152
AYA.FROPI/AyABL/EVP/AnalisisAmbientalBL.cs
Normal file
152
AYA.FROPI/AyABL/EVP/AnalisisAmbientalBL.cs
Normal file
|
|
@ -0,0 +1,152 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.EVP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.EVP
|
||||||
|
{
|
||||||
|
public class AnalisisAmbientalBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public AnalisisAmbientalBL()
|
||||||
|
{
|
||||||
|
objAnalisisAmbientalEL = new AnalisisAmbientalEL();
|
||||||
|
this.NombreTabla = Modulos.t_evp_.ToString() + Tablas.analisisambiental.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public AnalisisAmbientalEL objAnalisisAmbientalEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del AnalisisAmbiental
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarAnalisisAmbiental()
|
||||||
|
{
|
||||||
|
this.CamposTabla = t_evp_analisisambiental.VIABILIDAD.ToString() + Tablas.analisisambiental.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisambiental.FECHAAPROBACION.ToString() + Tablas.analisisambiental.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisambiental.VAPINICIO.ToString() + Tablas.analisisambiental.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisambiental.VAPFINAL.ToString() + Tablas.analisisambiental.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisambiental.PORCENTAJEMITIGACION.ToString() + Tablas.analisisambiental.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objAnalisisAmbientalEL.Viabilidad,
|
||||||
|
objAnalisisAmbientalEL.FechaAprobacion,
|
||||||
|
objAnalisisAmbientalEL.VAPInicio,
|
||||||
|
objAnalisisAmbientalEL.VAPFin,
|
||||||
|
objAnalisisAmbientalEL.PorcentajeMitigacion,
|
||||||
|
objAnalisisAmbientalEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
return baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del AnalisisAmbiental
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarAnalisisAmbiental()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objAnalisisAmbientalEL.Proyecto > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objAnalisisAmbientalEL.Proyecto, Tablas.proyecto, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_evp_analisisambiental.VIABILIDAD.ToString() + Tablas.analisisambiental.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisambiental.FECHAAPROBACION.ToString() + Tablas.analisisambiental.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisambiental.VAPINICIO.ToString() + Tablas.analisisambiental.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisambiental.VAPFINAL.ToString() + Tablas.analisisambiental.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisambiental.PORCENTAJEMITIGACION.ToString() + Tablas.analisisambiental.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objAnalisisAmbientalEL.Viabilidad,
|
||||||
|
objAnalisisAmbientalEL.FechaAprobacion,
|
||||||
|
objAnalisisAmbientalEL.VAPInicio,
|
||||||
|
objAnalisisAmbientalEL.VAPFin,
|
||||||
|
objAnalisisAmbientalEL.PorcentajeMitigacion,
|
||||||
|
objAnalisisAmbientalEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del AnalisisAmbiental
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoAnalisisAmbiental()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objAnalisisAmbientalEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objAnalisisAmbientalEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(this.buscarPorAstate(true, Tablas.analisisambiental, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.analisisambiental.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objAnalisisAmbientalEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los AnalisisAmbientales
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getAnalisisAmbiental()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objAnalisisAmbientalEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objAnalisisAmbientalEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_evaluacion.ToString();
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsAnalisisAmbiental = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsAnalisisAmbiental;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
151
AYA.FROPI/AyABL/EVP/AnalisisRiesgoBL.cs
Normal file
151
AYA.FROPI/AyABL/EVP/AnalisisRiesgoBL.cs
Normal file
|
|
@ -0,0 +1,151 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.EVP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.EVP
|
||||||
|
{
|
||||||
|
public class AnalisisRiesgoBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public AnalisisRiesgoBL()
|
||||||
|
{
|
||||||
|
objAnalisisRiesgoEL = new AnalisisRiesgoEL();
|
||||||
|
this.NombreTabla = Modulos.t_evp_.ToString() + Tablas.analisisriesgo.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public AnalisisRiesgoEL objAnalisisRiesgoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del AnalisisRiesgo
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarAnalisisRiesgo()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = Tablas.analisisriesgo.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisriesgo.PORCENTAJEREDUCCION.ToString() + Tablas.analisisriesgo.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisriesgo.NUMEROPLANO.ToString() + Tablas.analisisriesgo.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objAnalisisRiesgoEL.AnalisisRiesgo,
|
||||||
|
objAnalisisRiesgoEL.PorcentajeReduccion,
|
||||||
|
objAnalisisRiesgoEL.NumeroPlano,
|
||||||
|
objAnalisisRiesgoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del AnalisisRiesgo
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarAnalisisRiesgo()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objAnalisisRiesgoEL.Proyecto > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objAnalisisRiesgoEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(this.buscarPorAstate(true, Tablas.analisisriesgo, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Tablas.analisisriesgo.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisriesgo.PORCENTAJEREDUCCION.ToString() + Tablas.analisisriesgo.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_analisisriesgo.NUMEROPLANO.ToString() + Tablas.analisisriesgo.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objAnalisisRiesgoEL.AnalisisRiesgo,
|
||||||
|
objAnalisisRiesgoEL.PorcentajeReduccion,
|
||||||
|
objAnalisisRiesgoEL.NumeroPlano,
|
||||||
|
objAnalisisRiesgoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del AnalisisRiesgo
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoAnalisisRiesgo()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objAnalisisRiesgoEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objAnalisisRiesgoEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(this.buscarPorAstate(true, Tablas.analisisriesgo, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.analisisriesgo.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objAnalisisRiesgoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los AnalisisRiesgoes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getAnalisisRiesgo()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objAnalisisRiesgoEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objAnalisisRiesgoEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.analisisriesgo, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsAnalisisRiesgo = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKANALISISRIESGO ASC ");
|
||||||
|
|
||||||
|
return dsAnalisisRiesgo;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
151
AYA.FROPI/AyABL/EVP/EvaluacionCostosBL.cs
Normal file
151
AYA.FROPI/AyABL/EVP/EvaluacionCostosBL.cs
Normal file
|
|
@ -0,0 +1,151 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.EVP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.EVP
|
||||||
|
{
|
||||||
|
public class EvaluacionCostosBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public EvaluacionCostosBL()
|
||||||
|
{
|
||||||
|
objEvaluacionCostosEL = new EvaluacionCostosEL();
|
||||||
|
this.NombreTabla = Modulos.t_evp_.ToString() + Tablas.evaluacioncostos.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public EvaluacionCostosEL objEvaluacionCostosEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del EvaluacionCostos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarEvaluacionCostos()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = t_evp_evaluacioncostos.TSD.ToString() + Tablas.evaluacioncostos.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacioncostos.VAC.ToString() + Tablas.evaluacioncostos.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacioncostos.CAE.ToString() + Tablas.evaluacioncostos.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objEvaluacionCostosEL.TSD,
|
||||||
|
objEvaluacionCostosEL.VAC,
|
||||||
|
objEvaluacionCostosEL.CAE,
|
||||||
|
objEvaluacionCostosEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del EvaluacionCostos
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarEvaluacionCostos()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objEvaluacionCostosEL.Proyecto > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objEvaluacionCostosEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(this.buscarPorAstate(true, Tablas.evaluacioncostos, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_evp_evaluacioncostos.TSD.ToString() + Tablas.evaluacioncostos.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacioncostos.VAC.ToString() + Tablas.evaluacioncostos.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacioncostos.CAE.ToString() + Tablas.evaluacioncostos.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objEvaluacionCostosEL.TSD,
|
||||||
|
objEvaluacionCostosEL.VAC,
|
||||||
|
objEvaluacionCostosEL.CAE,
|
||||||
|
objEvaluacionCostosEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del EvaluacionCostos
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoEvaluacionCostos()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objEvaluacionCostosEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objEvaluacionCostosEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(this.buscarPorAstate(true, Tablas.evaluacioncostos, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.evaluacioncostos.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objEvaluacionCostosEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los EvaluacionCostoses
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getEvaluacionCostos()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objEvaluacionCostosEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objEvaluacionCostosEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.evaluacioncostos, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsEvaluacionCostos = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKEvaluacionCostos ASC ");
|
||||||
|
|
||||||
|
return dsEvaluacionCostos;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
155
AYA.FROPI/AyABL/EVP/EvaluacionFinancieraBL.cs
Normal file
155
AYA.FROPI/AyABL/EVP/EvaluacionFinancieraBL.cs
Normal file
|
|
@ -0,0 +1,155 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.EVP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.EVP
|
||||||
|
{
|
||||||
|
public class EvaluacionFinancieraBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public EvaluacionFinancieraBL()
|
||||||
|
{
|
||||||
|
objEvaluacionFinancieraEL = new EvaluacionFinancieraEL();
|
||||||
|
this.NombreTabla = Modulos.t_evp_.ToString() + Tablas.evaluacionfinanciera.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public EvaluacionFinancieraEL objEvaluacionFinancieraEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del EvaluacionFinanciera
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarEvaluacionFinanciera()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = t_evp_evaluacionfinanciera.TREMA.ToString() + Tablas.evaluacionfinanciera.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionfinanciera.VANE.ToString() + Tablas.evaluacionfinanciera.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionfinanciera.TIRE.ToString() + Tablas.evaluacionfinanciera.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionfinanciera.RBC.ToString() + Tablas.evaluacionfinanciera.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objEvaluacionFinancieraEL.TREMA,
|
||||||
|
objEvaluacionFinancieraEL.VANE,
|
||||||
|
objEvaluacionFinancieraEL.TIRE,
|
||||||
|
objEvaluacionFinancieraEL.RBC,
|
||||||
|
objEvaluacionFinancieraEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del EvaluacionFinanciera
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarEvaluacionFinanciera()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objEvaluacionFinancieraEL.Proyecto > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objEvaluacionFinancieraEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(this.buscarPorAstate(true, Tablas.evaluacionfinanciera, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_evp_evaluacionfinanciera.TREMA.ToString() + Tablas.evaluacionfinanciera.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionfinanciera.VANE.ToString() + Tablas.evaluacionfinanciera.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionfinanciera.TIRE.ToString() + Tablas.evaluacionfinanciera.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionfinanciera.RBC.ToString() + Tablas.evaluacionfinanciera.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objEvaluacionFinancieraEL.TREMA,
|
||||||
|
objEvaluacionFinancieraEL.VANE,
|
||||||
|
objEvaluacionFinancieraEL.TIRE,
|
||||||
|
objEvaluacionFinancieraEL.RBC,
|
||||||
|
objEvaluacionFinancieraEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del EvaluacionFinanciera
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoEvaluacionFinanciera()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objEvaluacionFinancieraEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objEvaluacionFinancieraEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(this.buscarPorAstate(true, Tablas.evaluacionfinanciera, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.evaluacionfinanciera.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objEvaluacionFinancieraEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los EvaluacionFinancieraes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getEvaluacionFinanciera()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objEvaluacionFinancieraEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objEvaluacionFinancieraEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.evaluacionfinanciera, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsEvaluacionFinanciera = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKEvaluacionFinanciera ASC ");
|
||||||
|
|
||||||
|
return dsEvaluacionFinanciera;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
159
AYA.FROPI/AyABL/EVP/EvaluacionSocialBL.cs
Normal file
159
AYA.FROPI/AyABL/EVP/EvaluacionSocialBL.cs
Normal file
|
|
@ -0,0 +1,159 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.EVP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.EVP
|
||||||
|
{
|
||||||
|
public class EvaluacionSocialBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public EvaluacionSocialBL()
|
||||||
|
{
|
||||||
|
objEvaluacionSocialEL = new EvaluacionSocialEL();
|
||||||
|
this.NombreTabla = Modulos.t_evp_.ToString() + Tablas.evaluacionsocial.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public EvaluacionSocialEL objEvaluacionSocialEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del EvaluacionSocial
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarEvaluacionSocial()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = t_evp_evaluacionsocial.VANE.ToString() + Tablas.evaluacionsocial.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionsocial.TIRE.ToString() + Tablas.evaluacionsocial.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionsocial.RCE.ToString() + Tablas.evaluacionsocial.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionsocial.TSD.ToString() + Tablas.evaluacionsocial.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionsocial.RBC.ToString() + Tablas.evaluacionsocial.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objEvaluacionSocialEL.VANE,
|
||||||
|
objEvaluacionSocialEL.TIRE,
|
||||||
|
objEvaluacionSocialEL.RCE,
|
||||||
|
objEvaluacionSocialEL.TSD,
|
||||||
|
objEvaluacionSocialEL.RBC,
|
||||||
|
objEvaluacionSocialEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del EvaluacionSocial
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarEvaluacionSocial()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objEvaluacionSocialEL.Proyecto > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objEvaluacionSocialEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(this.buscarPorAstate(true, Tablas.evaluacionsocial, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_evp_evaluacionsocial.TSD.ToString() + Tablas.evaluacionsocial.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionsocial.RBC.ToString() + Tablas.evaluacionsocial.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionsocial.RCE.ToString() + Tablas.evaluacionsocial.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionsocial.TIRE.ToString() + Tablas.evaluacionsocial.ToString().ToUpper() + ", " +
|
||||||
|
t_evp_evaluacionsocial.VANE.ToString() + Tablas.evaluacionsocial.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objEvaluacionSocialEL.TSD,
|
||||||
|
objEvaluacionSocialEL.RBC,
|
||||||
|
objEvaluacionSocialEL.RCE,
|
||||||
|
objEvaluacionSocialEL.TIRE,
|
||||||
|
objEvaluacionSocialEL.VANE,
|
||||||
|
objEvaluacionSocialEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del EvaluacionSocial
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoEvaluacionSocial()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objEvaluacionSocialEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objEvaluacionSocialEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(this.buscarPorAstate(true, Tablas.evaluacionsocial, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.evaluacionsocial.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objEvaluacionSocialEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los EvaluacionSociales
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getEvaluacionSocial()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objEvaluacionSocialEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objEvaluacionSocialEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.evaluacionsocial, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsEvaluacionSocial = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKEvaluacionSocial ASC ");
|
||||||
|
|
||||||
|
return dsEvaluacionSocial;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
181
AYA.FROPI/AyABL/FNP/EndeudamientoBL.cs
Normal file
181
AYA.FROPI/AyABL/FNP/EndeudamientoBL.cs
Normal file
|
|
@ -0,0 +1,181 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.FNP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.FNP
|
||||||
|
{
|
||||||
|
public class EndeudamientoBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public EndeudamientoBL()
|
||||||
|
{
|
||||||
|
objEndeudamientoEL = new EndeudamientoEL();
|
||||||
|
this.NombreTabla = Modulos.t_fnp_.ToString() + Tablas.endeudamiento.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public EndeudamientoEL objEndeudamientoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Endeudamiento
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarEndeudamiento()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = t_fnp_endeudamiento.MONTO.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.PERIODOGRACIA.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.PLAZO.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.DESEMBOLSOINICIO.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.DESEMBOLSOFIN.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.TIPOCAMBIOCONTRATO.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.FECHACONTRATO.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.SITUACIONACTUAL.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.TASA.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.fuentefinanciamiento.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objEndeudamientoEL.Monto,
|
||||||
|
objEndeudamientoEL.PeriodoGracia,
|
||||||
|
objEndeudamientoEL.Plazo,
|
||||||
|
objEndeudamientoEL.DesembolsoInicio,
|
||||||
|
objEndeudamientoEL.DesembolsoFin,
|
||||||
|
objEndeudamientoEL.TipoCambio,
|
||||||
|
objEndeudamientoEL.FechaContrato,
|
||||||
|
objEndeudamientoEL.SituacinActual,
|
||||||
|
objEndeudamientoEL.Tasa,
|
||||||
|
objEndeudamientoEL.FuenteFinanciamiento,
|
||||||
|
objEndeudamientoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Endeudamiento
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarEndeudamiento()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objEndeudamientoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objEndeudamientoEL.PK, Tablas.endeudamiento, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_fnp_endeudamiento.MONTO.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.PERIODOGRACIA.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.PLAZO.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.DESEMBOLSOINICIO.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.DESEMBOLSOFIN.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.TIPOCAMBIOCONTRATO.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.FECHACONTRATO.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.SITUACIONACTUAL.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_endeudamiento.TASA.ToString() + Tablas.endeudamiento.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.fuentefinanciamiento.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objEndeudamientoEL.Monto,
|
||||||
|
objEndeudamientoEL.PeriodoGracia,
|
||||||
|
objEndeudamientoEL.Plazo,
|
||||||
|
objEndeudamientoEL.DesembolsoInicio,
|
||||||
|
objEndeudamientoEL.DesembolsoFin,
|
||||||
|
objEndeudamientoEL.TipoCambio,
|
||||||
|
objEndeudamientoEL.FechaContrato,
|
||||||
|
objEndeudamientoEL.SituacinActual,
|
||||||
|
objEndeudamientoEL.Tasa,
|
||||||
|
objEndeudamientoEL.FuenteFinanciamiento,
|
||||||
|
objEndeudamientoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Endeudamiento
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoEndeudamiento()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objEndeudamientoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objEndeudamientoEL.PK, Tablas.endeudamiento, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.endeudamiento.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objEndeudamientoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Endeudamientoes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getEndeudamiento()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objEndeudamientoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objEndeudamientoEL.PK, Tablas.endeudamiento, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.objEndeudamientoEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objEndeudamientoEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_endeudamiento.ToString();
|
||||||
|
|
||||||
|
DataSet dsEndeudamiento = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKEndeudamiento ASC ");
|
||||||
|
|
||||||
|
return dsEndeudamiento;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
215
AYA.FROPI/AyABL/FNP/FinanciamientoBL.cs
Normal file
215
AYA.FROPI/AyABL/FNP/FinanciamientoBL.cs
Normal file
|
|
@ -0,0 +1,215 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.FNP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.FNP
|
||||||
|
{
|
||||||
|
public class FinanciamientoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public FinanciamientoBL()
|
||||||
|
{
|
||||||
|
objFinanciamientoEL = new FinanciamientoEL();
|
||||||
|
this.NombreTabla = Modulos.t_fnp_.ToString() + Tablas.financiamiento.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public FinanciamientoEL objFinanciamientoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Financiamiento
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarFinanciamiento()
|
||||||
|
{
|
||||||
|
int intPK = 0;
|
||||||
|
|
||||||
|
this.CamposTabla = t_fnp_financiamiento.ANIO.ToString() + Tablas.financiamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_financiamiento.MONTO.ToString() + Tablas.financiamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_financiamiento.TIPO.ToString() + Tablas.financiamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_financiamiento.TIPORECURSO.ToString() + Tablas.financiamiento.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.recurso.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objFinanciamientoEL.Anio,
|
||||||
|
objFinanciamientoEL.Monto,
|
||||||
|
objFinanciamientoEL.TipoFinanciamiento,
|
||||||
|
objFinanciamientoEL.TipoRecurso,
|
||||||
|
objFinanciamientoEL.Recurso,
|
||||||
|
objFinanciamientoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
intPK = baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return intPK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Financiamiento
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarFinanciamiento()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objFinanciamientoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objFinanciamientoEL.PK, Tablas.financiamiento, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_fnp_financiamiento.ANIO.ToString() + Tablas.financiamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_financiamiento.MONTO.ToString() + Tablas.financiamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_financiamiento.TIPO.ToString() + Tablas.financiamiento.ToString().ToUpper() + ", " +
|
||||||
|
t_fnp_financiamiento.TIPORECURSO.ToString() + Tablas.financiamiento.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.recurso.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objFinanciamientoEL.Anio,
|
||||||
|
objFinanciamientoEL.Monto,
|
||||||
|
objFinanciamientoEL.TipoFinanciamiento,
|
||||||
|
objFinanciamientoEL.TipoRecurso,
|
||||||
|
objFinanciamientoEL.Recurso,
|
||||||
|
objFinanciamientoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Financiamiento
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoFinanciamiento()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objFinanciamientoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objFinanciamientoEL.PK, Tablas.financiamiento, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.financiamiento.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objFinanciamientoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Financiamientoes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getFinanciamiento()
|
||||||
|
{
|
||||||
|
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.SqlClient");
|
||||||
|
DbParameter[] dbpParametros = new DbParameter[3];
|
||||||
|
|
||||||
|
for (int i = 0; i < dbpParametros.Length; i++)
|
||||||
|
{
|
||||||
|
dbpParametros[i] = factory.CreateParameter();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Parametros Tipo Financiamiento
|
||||||
|
dbpParametros[0].ParameterName = "@P_TIPOFINANCIAMIENTO";
|
||||||
|
dbpParametros[0].Value = objFinanciamientoEL.TipoFinanciamiento;
|
||||||
|
dbpParametros[0].DbType = DbType.String;
|
||||||
|
|
||||||
|
//Parametros Tipo Recurso
|
||||||
|
dbpParametros[1].ParameterName = "@P_TIPORECURSO";
|
||||||
|
dbpParametros[1].Value = objFinanciamientoEL.TipoRecurso;
|
||||||
|
dbpParametros[1].DbType = DbType.String;
|
||||||
|
|
||||||
|
//Parametros PK Proyecto
|
||||||
|
dbpParametros[2].ParameterName = "@P_PKPROYECTO";
|
||||||
|
dbpParametros[2].Value = objFinanciamientoEL.Proyecto;
|
||||||
|
dbpParametros[2].DbType = DbType.String;
|
||||||
|
|
||||||
|
DataSet dsFinanciamiento = baseDAL.dsProcedimientoAlmacenado(Procedimiento.PA_FINANCIAMIENTOPIVOT.ToString(), dbpParametros, NombreConeccionBD);
|
||||||
|
|
||||||
|
return dsFinanciamiento;
|
||||||
|
}
|
||||||
|
public DataSet getTotalFinanciamiento()
|
||||||
|
{
|
||||||
|
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.SqlClient");
|
||||||
|
DbParameter[] dbpParametros = new DbParameter[1];
|
||||||
|
|
||||||
|
for (int i = 0; i < dbpParametros.Length; i++)
|
||||||
|
{
|
||||||
|
dbpParametros[i] = factory.CreateParameter();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Parametros PK Proyecto
|
||||||
|
dbpParametros[0].ParameterName = "@P_PKPROYECTO";
|
||||||
|
dbpParametros[0].Value = objFinanciamientoEL.Proyecto;
|
||||||
|
dbpParametros[0].DbType = DbType.String;
|
||||||
|
|
||||||
|
DataSet dsFinanciamiento = baseDAL.dsProcedimientoAlmacenado(Procedimiento.PA_TOTALESFINANCIAMIENTO.ToString(), dbpParametros, NombreConeccionBD);
|
||||||
|
|
||||||
|
return dsFinanciamiento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getDetalle()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objFinanciamientoEL.PK > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objFinanciamientoEL.PK, Tablas.financiamiento, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.objFinanciamientoEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objFinanciamientoEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_detallefinanciamiento.ToString();
|
||||||
|
|
||||||
|
DataSet dsFinanciamiento = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY ANIOFINANCIAMIENTO, PKRECURSO ");
|
||||||
|
|
||||||
|
return dsFinanciamiento;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorTipoFinanciamiento(Nullable<int> p_intFK, Tablas p_nombreTabla, operadorLogico logOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Constraints.FK.ToString() + p_nombreTabla.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.valorDerecho = p_intFK;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
149
AYA.FROPI/AyABL/ICP/InformacionBL.cs
Normal file
149
AYA.FROPI/AyABL/ICP/InformacionBL.cs
Normal file
|
|
@ -0,0 +1,149 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.ICP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.ICP
|
||||||
|
{
|
||||||
|
public class InformacionBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public InformacionBL()
|
||||||
|
{
|
||||||
|
objInformacionEL = new InformacionEL();
|
||||||
|
this.NombreTabla = Modulos.t_icp_.ToString() + Tablas.informacion.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public InformacionEL objInformacionEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Informacion
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarInformacion()
|
||||||
|
{
|
||||||
|
this.CamposTabla = t_icp_informacion.IMPORTANCIA.ToString() + Tablas.informacion.ToString().ToUpper() + ", " +
|
||||||
|
t_icp_informacion.PROBLEMA.ToString() + Tablas.informacion.ToString().ToUpper() + ", " +
|
||||||
|
t_icp_informacion.MEDIDA.ToString() + Tablas.informacion.ToString().ToUpper() + ", " +
|
||||||
|
t_icp_informacion.PROYECTOVINCULADO.ToString() + Tablas.informacion.ToString().ToUpper() + ", " +
|
||||||
|
t_icp_informacion.OTRASENTIDADES.ToString() + Tablas.informacion.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objInformacionEL.Importancia,
|
||||||
|
objInformacionEL.Problema,
|
||||||
|
objInformacionEL.Medida,
|
||||||
|
objInformacionEL.ProyectoVinculado,
|
||||||
|
objInformacionEL.OtrasEntidades,
|
||||||
|
objInformacionEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
return baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Informacion
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarInformacion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objInformacionEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objInformacionEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.informacion, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_icp_informacion.IMPORTANCIA.ToString() + Tablas.informacion.ToString().ToUpper() + ", " +
|
||||||
|
t_icp_informacion.PROBLEMA.ToString() + Tablas.informacion.ToString().ToUpper() + ", " +
|
||||||
|
t_icp_informacion.MEDIDA.ToString() + Tablas.informacion.ToString().ToUpper() + ", " +
|
||||||
|
t_icp_informacion.PROYECTOVINCULADO.ToString() + Tablas.informacion.ToString().ToUpper() + ", " +
|
||||||
|
t_icp_informacion.OTRASENTIDADES.ToString() + Tablas.informacion.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objInformacionEL.Importancia,
|
||||||
|
objInformacionEL.Problema,
|
||||||
|
objInformacionEL.Medida,
|
||||||
|
objInformacionEL.ProyectoVinculado,
|
||||||
|
objInformacionEL.OtrasEntidades,
|
||||||
|
objInformacionEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Informacion
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoInformacion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objInformacionEL.Proyecto > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objInformacionEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.informacion, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.informacion.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objInformacionEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Informaciones
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getInformacion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objInformacionEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objInformacionEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.informacion, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
DataSet dsInformacion = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKInformacion ASC ");
|
||||||
|
|
||||||
|
return dsInformacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
164
AYA.FROPI/AyABL/ICP/ObservacionBL.cs
Normal file
164
AYA.FROPI/AyABL/ICP/ObservacionBL.cs
Normal file
|
|
@ -0,0 +1,164 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.ICP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.ICP
|
||||||
|
{
|
||||||
|
public class ObservacionBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public ObservacionBL()
|
||||||
|
{
|
||||||
|
objObservacionEL = new ObservacionEL();
|
||||||
|
this.NombreTabla = Modulos.t_icp_.ToString() + Tablas.observacion.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public ObservacionEL objObservacionEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Observacion
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarObservacion()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = t_icp_observacion.FECHAINGRESO.ToString() + Tablas.observacion.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.observacion.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.informacion.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objObservacionEL.FechaIngreso,
|
||||||
|
objObservacionEL.Descripcion,
|
||||||
|
objObservacionEL.Informacion
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Observacion
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarObservacion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objObservacionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objObservacionEL.PK, Tablas.observacion, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_icp_observacion.FECHAINGRESO.ToString() + Tablas.observacion.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.observacion.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.informacion.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objObservacionEL.FechaIngreso,
|
||||||
|
objObservacionEL.Descripcion,
|
||||||
|
objObservacionEL.Informacion
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Observacion
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoObservacion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objObservacionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objObservacionEL.PK, Tablas.observacion, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objObservacionEL.Informacion != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objObservacionEL.Informacion, Tablas.informacion, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.observacion.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objObservacionEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Observaciones
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getObservacion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
DataSet dsObservacion = new DataSet();
|
||||||
|
|
||||||
|
if (this.objObservacionEL.Informacion != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objObservacionEL.Informacion, Tablas.informacion, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.observacion, operadorLogico.NONE));
|
||||||
|
|
||||||
|
dsObservacion = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY FECHAINGRESOOBSERVACION DESC ");
|
||||||
|
}
|
||||||
|
|
||||||
|
dsObservacion.Tables.Add();
|
||||||
|
|
||||||
|
return dsObservacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getObservacion2()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
DataSet dsObservacion = new DataSet();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorPK(objObservacionEL.PK, Tablas.observacion, operadorLogico.NONE));
|
||||||
|
|
||||||
|
dsObservacion = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
dsObservacion.Tables.Add();
|
||||||
|
|
||||||
|
return dsObservacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
149
AYA.FROPI/AyABL/IGP/CentroGestorBL.cs
Normal file
149
AYA.FROPI/AyABL/IGP/CentroGestorBL.cs
Normal file
|
|
@ -0,0 +1,149 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.IGP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.IGP
|
||||||
|
{
|
||||||
|
public class CentroGestorBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public CentroGestorBL()
|
||||||
|
{
|
||||||
|
objCentroGestorEL = new CentroGestorEL();
|
||||||
|
this.NombreTabla = Modulos.t_igp_.ToString() + Tablas.centrogestor.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public CentroGestorEL objCentroGestorEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del CentroGestor
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarCentroGestor()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_centrogestor.PREINVERSION.ToString() + Tablas.centrogestor.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_centrogestor.EJECUCION.ToString() + Tablas.centrogestor.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.procedenciacentrogestor.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objCentroGestorEL.Preinversion,
|
||||||
|
objCentroGestorEL.Ejecucion,
|
||||||
|
objCentroGestorEL.Procedencia,
|
||||||
|
objCentroGestorEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del CentroGestor
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarCentroGestor()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objCentroGestorEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objCentroGestorEL.PK, Tablas.centrogestor, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_centrogestor.PREINVERSION.ToString() + Tablas.centrogestor.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_centrogestor.EJECUCION.ToString() + Tablas.centrogestor.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.procedenciacentrogestor.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objCentroGestorEL.Preinversion,
|
||||||
|
objCentroGestorEL.Ejecucion,
|
||||||
|
objCentroGestorEL.Procedencia,
|
||||||
|
objCentroGestorEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del CentroGestor
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoCentroGestor()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objCentroGestorEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objCentroGestorEL.PK, Tablas.centrogestor, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.centrogestor.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objCentroGestorEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los CentroGestores
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getCentroGestor()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
|
||||||
|
if (objCentroGestorEL.PK != 0)
|
||||||
|
arlCondiciones.Add(buscarPorPK(objCentroGestorEL.PK, Tablas.centrogestor, operadorLogico.NONE));
|
||||||
|
|
||||||
|
if (objCentroGestorEL.Proyecto != 0)
|
||||||
|
arlCondiciones.Add(buscarPorFK(objCentroGestorEL.Proyecto, Tablas.proyecto, operadorLogico.NONE));
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_centrogestor.ToString();
|
||||||
|
|
||||||
|
DataSet dsCentroGestor = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKPROCEDENCIACENTROGESTOR ASC ");
|
||||||
|
|
||||||
|
return dsCentroGestor;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
140
AYA.FROPI/AyABL/IGP/InformacionGeneralBL.cs
Normal file
140
AYA.FROPI/AyABL/IGP/InformacionGeneralBL.cs
Normal file
|
|
@ -0,0 +1,140 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.IGP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.IGP
|
||||||
|
{
|
||||||
|
public class InformacionGeneralBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public InformacionGeneralBL()
|
||||||
|
{
|
||||||
|
objInformacionGeneralEL = new InformacionGeneralEL();
|
||||||
|
this.NombreTabla = Modulos.t_igp_.ToString() + Tablas.informaciongeneral.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public InformacionGeneralEL objInformacionGeneralEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del InformacionGeneral
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarInformacionGeneral()
|
||||||
|
{
|
||||||
|
int intEjecutado = 0;
|
||||||
|
|
||||||
|
this.CamposTabla = t_igp_informaciongeneral.ENCARGADO.ToString() + Tablas.informaciongeneral.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.region.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objInformacionGeneralEL.Encargado,
|
||||||
|
objInformacionGeneralEL.Region,
|
||||||
|
objInformacionGeneralEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
intEjecutado = baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return intEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del InformacionGeneral
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarInformacionGeneral()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objInformacionGeneralEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objInformacionGeneralEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_igp_informaciongeneral.ENCARGADO.ToString() + Tablas.informaciongeneral.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.region.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objInformacionGeneralEL.Encargado,
|
||||||
|
objInformacionGeneralEL.Region,
|
||||||
|
objInformacionGeneralEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del InformacionGeneral
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoInformacionGeneral()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objInformacionGeneralEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objInformacionGeneralEL.PK, Tablas.informaciongeneral, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.informaciongeneral.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objInformacionGeneralEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los InformacionGenerales
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getInformacionGeneral()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objInformacionGeneralEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objInformacionGeneralEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_informaciongeneral.ToString();
|
||||||
|
|
||||||
|
DataSet dsInformacionGeneral = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKInformacionGeneral ASC ");
|
||||||
|
|
||||||
|
return dsInformacionGeneral;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
143
AYA.FROPI/AyABL/IGP/RelacionPlanEstrategicoBL.cs
Normal file
143
AYA.FROPI/AyABL/IGP/RelacionPlanEstrategicoBL.cs
Normal file
|
|
@ -0,0 +1,143 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.IGP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.IGP
|
||||||
|
{
|
||||||
|
public class RelacionPlanEstrategicoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public RelacionPlanEstrategicoBL()
|
||||||
|
{
|
||||||
|
objRelacionPlanEstrategicoEL = new RelacionPlanEstrategicoEL();
|
||||||
|
this.NombreTabla = Modulos.t_igp_.ToString() + Tablas.relacionplanestrategico.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public RelacionPlanEstrategicoEL objRelacionPlanEstrategicoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del RelacionPlanEstrategico
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarRelacionPlanEstrategico()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = Constraints.FK.ToString() + Tablas.temaestrategico.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.objetivo.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_igp_relacionplanestrategico.CONTRIBUCION.ToString() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.informaciongeneral.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objRelacionPlanEstrategicoEL.TemaEstrategico,
|
||||||
|
objRelacionPlanEstrategicoEL.Objetivo,
|
||||||
|
objRelacionPlanEstrategicoEL.Contribucion,
|
||||||
|
objRelacionPlanEstrategicoEL.InformacionGeneral
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del RelacionPlanEstrategico
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarRelacionPlanEstrategico()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objRelacionPlanEstrategicoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objRelacionPlanEstrategicoEL.PK, Tablas.relacionplanestrategico, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Constraints.FK.ToString() + Tablas.temaestrategico.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.objetivo.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + t_igp_relacionplanestrategico.CONTRIBUCION.ToString() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.informaciongeneral.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objRelacionPlanEstrategicoEL.TemaEstrategico,
|
||||||
|
objRelacionPlanEstrategicoEL.Objetivo,
|
||||||
|
objRelacionPlanEstrategicoEL.Contribucion,
|
||||||
|
objRelacionPlanEstrategicoEL.InformacionGeneral
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del RelacionPlanEstrategico
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoRelacionPlanEstrategico()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objRelacionPlanEstrategicoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objRelacionPlanEstrategicoEL.PK, Tablas.relacionplanestrategico, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.relacionplanestrategico.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objRelacionPlanEstrategicoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los RelacionPlanEstrategicoes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getRelacionPlanEstrategico()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorFK(objRelacionPlanEstrategicoEL.Proyecto, Tablas.proyecto, operadorLogico.NONE));
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_relacionplanestrategico.ToString();
|
||||||
|
|
||||||
|
DataSet dsRelacionPlanEstrategico = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKRELACIONPLANESTRATEGICO ASC ");
|
||||||
|
|
||||||
|
return dsRelacionPlanEstrategico;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
153
AYA.FROPI/AyABL/IGP/TipoCambioBL.cs
Normal file
153
AYA.FROPI/AyABL/IGP/TipoCambioBL.cs
Normal file
|
|
@ -0,0 +1,153 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.IGP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.IGP
|
||||||
|
{
|
||||||
|
public class TipoCambioBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public TipoCambioBL()
|
||||||
|
{
|
||||||
|
objTipoCambioEL = new TipoCambioEL();
|
||||||
|
this.NombreTabla = Modulos.t_igp_.ToString() + Tablas.tipocambio.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public TipoCambioEL objTipoCambioEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del TipoCambio
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarTipoCambio()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_tipocambio.MONEDA.ToString() + Tablas.tipocambio.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_tipocambio.ANIO.ToString() + Tablas.tipocambio.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_tipocambio.MONTO.ToString() + Tablas.tipocambio.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objTipoCambioEL.Moneda,
|
||||||
|
objTipoCambioEL.Anio,
|
||||||
|
objTipoCambioEL.Monto,
|
||||||
|
objTipoCambioEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del TipoCambio
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarTipoCambio()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objTipoCambioEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objTipoCambioEL.PK, Tablas.tipocambio, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_agp_tipocambio.MONEDA.ToString() + Tablas.tipocambio.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_tipocambio.ANIO.ToString() + Tablas.tipocambio.ToString().ToUpper() + ", " +
|
||||||
|
t_agp_tipocambio.MONTO.ToString() + Tablas.tipocambio.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objTipoCambioEL.Moneda,
|
||||||
|
objTipoCambioEL.Anio,
|
||||||
|
objTipoCambioEL.Monto,
|
||||||
|
objTipoCambioEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del TipoCambio
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoTipoCambio()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objTipoCambioEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objTipoCambioEL.PK, Tablas.tipocambio, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.tipocambio.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objTipoCambioEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los TipoCambioS
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getTipoCambio()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objTipoCambioEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objTipoCambioEL.PK, Tablas.tipocambio, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.objTipoCambioEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objTipoCambioEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.tipocambio, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsTipoCambio = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY ANIOTIPOCAMBIO ASC ");
|
||||||
|
|
||||||
|
return dsTipoCambio;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
167
AYA.FROPI/AyABL/PLE/ObjetivoBL.cs
Normal file
167
AYA.FROPI/AyABL/PLE/ObjetivoBL.cs
Normal file
|
|
@ -0,0 +1,167 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.PLE;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.PLE
|
||||||
|
{
|
||||||
|
public class ObjetivoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public ObjetivoBL()
|
||||||
|
{
|
||||||
|
objObjetivoEL = new ObjetivoEL();
|
||||||
|
this.NombreTabla = Modulos.t_ple_.ToString() + Tablas.objetivo.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public ObjetivoEL objObjetivoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Objetivo
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarObjetivo()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = t_ple_objetivo.NUMERO.ToString() + Tablas.objetivo.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.objetivo.ToString().ToUpper() + ", " +
|
||||||
|
t_ple_objetivo.META.ToString() + Tablas.objetivo.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.perspectiva.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objObjetivoEL.Numero,
|
||||||
|
objObjetivoEL.Descripcion,
|
||||||
|
objObjetivoEL.Meta,
|
||||||
|
objObjetivoEL.Perspectiva
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Objetivo
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarObjetivo()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objObjetivoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objObjetivoEL.PK, Tablas.objetivo, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_ple_objetivo.NUMERO.ToString() + Tablas.objetivo.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.objetivo.ToString().ToUpper() + ", " +
|
||||||
|
t_ple_objetivo.META.ToString() + Tablas.objetivo.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.perspectiva.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objObjetivoEL.Numero,
|
||||||
|
objObjetivoEL.Descripcion,
|
||||||
|
objObjetivoEL.Meta,
|
||||||
|
objObjetivoEL.Perspectiva
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Objetivo
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoObjetivo()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objObjetivoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objObjetivoEL.PK, Tablas.objetivo, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.objetivo.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objObjetivoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Objetivoes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getObjetivo()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objObjetivoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objObjetivoEL.PK, Tablas.objetivo, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.objetivo, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsObjetivo = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKObjetivo ASC ");
|
||||||
|
|
||||||
|
return dsObjetivo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public DataSet getListaObjetivos()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.objetivo, operadorLogico.AND));
|
||||||
|
|
||||||
|
this.CamposTabla = Constraints.PK.ToString() + Tablas.objetivo.ToString().ToUpper() + ", CAST(" +
|
||||||
|
t_ple_objetivo.NUMERO.ToString() + Tablas.objetivo.ToString().ToUpper() + " AS VARCHAR) + '. ' + " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.objetivo.ToString().ToUpper() + " AS " +
|
||||||
|
Concepto.DESCRIPCION.ToString() + Tablas.objetivo.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.perspectiva.ToString().ToUpper();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorFK(objObjetivoEL.Perspectiva, Tablas.perspectiva, operadorLogico.NONE));
|
||||||
|
|
||||||
|
DataSet dsObjetivo = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKObjetivo ASC ");
|
||||||
|
|
||||||
|
return dsObjetivo;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
142
AYA.FROPI/AyABL/PLE/PerspectivaBL.cs
Normal file
142
AYA.FROPI/AyABL/PLE/PerspectivaBL.cs
Normal file
|
|
@ -0,0 +1,142 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.PLE;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.PLE
|
||||||
|
{
|
||||||
|
public class PerspectivaBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public PerspectivaBL()
|
||||||
|
{
|
||||||
|
objPerspectivaEL = new PerspectivaEL();
|
||||||
|
this.NombreTabla = Modulos.t_ple_.ToString() + Tablas.perspectiva.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public PerspectivaEL objPerspectivaEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Perspectiva
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarPerspectiva()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.perspectiva.ToString().ToUpper() + ", " +
|
||||||
|
t_ple_perspectiva.CODIGO.ToString() + Tablas.perspectiva.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objPerspectivaEL.Nombre,
|
||||||
|
objPerspectivaEL.Codigo
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Perspectiva
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarPerspectiva()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objPerspectivaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objPerspectivaEL.PK, Tablas.perspectiva, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.perspectiva.ToString().ToUpper() + ", " +
|
||||||
|
t_ple_perspectiva.CODIGO.ToString() + Tablas.perspectiva.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objPerspectivaEL.Nombre,
|
||||||
|
objPerspectivaEL.Codigo
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Perspectiva
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoPerspectiva()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objPerspectivaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objPerspectivaEL.PK, Tablas.perspectiva, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.perspectiva.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objPerspectivaEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Perspectivaes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getPerspectiva()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objPerspectivaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objPerspectivaEL.PK, Tablas.perspectiva, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.perspectiva, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsPerspectiva = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKPerspectiva ASC ");
|
||||||
|
|
||||||
|
return dsPerspectiva;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
145
AYA.FROPI/AyABL/PLE/PlanEstrategicoBL.cs
Normal file
145
AYA.FROPI/AyABL/PLE/PlanEstrategicoBL.cs
Normal file
|
|
@ -0,0 +1,145 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.PLE;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.PLE
|
||||||
|
{
|
||||||
|
public class PlanEstrategicoBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public PlanEstrategicoBL()
|
||||||
|
{
|
||||||
|
objPlanEstrategicoEL = new PlanEstrategicoEL();
|
||||||
|
this.NombreTabla = Modulos.t_ple_.ToString() + Tablas.planestrategico.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public PlanEstrategicoEL objPlanEstrategicoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del PlanEstrategico
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarPlanEstrategico()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.DESCRIPCION.ToString() + Tablas.planestrategico.ToString().ToUpper() + ", " +
|
||||||
|
t_ple_planestrategico.ANIOINICIO.ToString() + Tablas.planestrategico.ToString().ToUpper() + ", " +
|
||||||
|
t_ple_planestrategico.ANIOFIN.ToString() + Tablas.planestrategico.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objPlanEstrategicoEL.Descripcion,
|
||||||
|
objPlanEstrategicoEL.AnioInicio,
|
||||||
|
objPlanEstrategicoEL.AnioFin
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del PlanEstrategico
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarPlanEstrategico()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objPlanEstrategicoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objPlanEstrategicoEL.PK, Tablas.planestrategico, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.DESCRIPCION.ToString() + Tablas.planestrategico.ToString().ToUpper() + ", " +
|
||||||
|
t_ple_planestrategico.ANIOINICIO.ToString() + Tablas.planestrategico.ToString().ToUpper() + ", " +
|
||||||
|
t_ple_planestrategico.ANIOFIN.ToString() + Tablas.planestrategico.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objPlanEstrategicoEL.Descripcion,
|
||||||
|
objPlanEstrategicoEL.AnioInicio,
|
||||||
|
objPlanEstrategicoEL.AnioFin
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del PlanEstrategico
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoPlanEstrategico()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objPlanEstrategicoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objPlanEstrategicoEL.PK, Tablas.planestrategico, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.planestrategico.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objPlanEstrategicoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los PlanEstrategicoes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getPlanEstrategico()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objPlanEstrategicoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objPlanEstrategicoEL.PK, Tablas.planestrategico, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.planestrategico, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsPlanEstrategico = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKPlanEstrategico ASC ");
|
||||||
|
|
||||||
|
return dsPlanEstrategico;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
142
AYA.FROPI/AyABL/PLE/TemaEstrategicoBL.cs
Normal file
142
AYA.FROPI/AyABL/PLE/TemaEstrategicoBL.cs
Normal file
|
|
@ -0,0 +1,142 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.PLE;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.PLE
|
||||||
|
{
|
||||||
|
public class TemaEstrategicoBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public TemaEstrategicoBL()
|
||||||
|
{
|
||||||
|
objTemaEstrategicoEL = new TemaEstrategicoEL();
|
||||||
|
this.NombreTabla = Modulos.t_ple_.ToString() + Tablas.temaestrategico.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public TemaEstrategicoEL objTemaEstrategicoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del TemaEstrategico
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarTemaEstrategico()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.temaestrategico.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.planestrategico.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objTemaEstrategicoEL.Nombre,
|
||||||
|
objTemaEstrategicoEL.PlanEstrategico
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del TemaEstrategico
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarTemaEstrategico()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objTemaEstrategicoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objTemaEstrategicoEL.PK, Tablas.temaestrategico, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.temaestrategico.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.planestrategico.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objTemaEstrategicoEL.Nombre,
|
||||||
|
objTemaEstrategicoEL.PlanEstrategico
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del TemaEstrategico
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoTemaEstrategico()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objTemaEstrategicoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objTemaEstrategicoEL.PK, Tablas.temaestrategico, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.temaestrategico.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objTemaEstrategicoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los TemaEstrategicoes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getTemaEstrategico()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objTemaEstrategicoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objTemaEstrategicoEL.PK, Tablas.temaestrategico, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.temaestrategico, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsTemaEstrategico = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKTemaEstrategico ASC ");
|
||||||
|
|
||||||
|
return dsTemaEstrategico;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
197
AYA.FROPI/AyABL/PPP/DistribucionPartidaBL.cs
Normal file
197
AYA.FROPI/AyABL/PPP/DistribucionPartidaBL.cs
Normal file
|
|
@ -0,0 +1,197 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.PPP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.PPP
|
||||||
|
{
|
||||||
|
public class DistribucionPartidaBL : AyABL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public DistribucionPartidaBL()
|
||||||
|
{
|
||||||
|
objDistribucionPartidaEL = new DistribucionPartidaEL();
|
||||||
|
this.NombreTabla = Modulos.t_ppp_.ToString() + Tablas.distribucionpartida.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public DistribucionPartidaEL objDistribucionPartidaEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del DistribucionPartida
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarDistribucionPartida()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ANIO.ToString() + Tablas.distribucionpartida.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.MONTO.ToString() + Tablas.distribucionpartida.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.partidapresupuestaria.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objDistribucionPartidaEL.Anio,
|
||||||
|
objDistribucionPartidaEL.Monto,
|
||||||
|
objDistribucionPartidaEL.PartidaPresupuestaria,
|
||||||
|
objDistribucionPartidaEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del DistribucionPartida
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarDistribucionPartida()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objDistribucionPartidaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objDistribucionPartidaEL.PK, Tablas.distribucionpartida, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ANIO.ToString() + Tablas.distribucionpartida.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.MONTO.ToString() + Tablas.distribucionpartida.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.partidapresupuestaria.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objDistribucionPartidaEL.Anio,
|
||||||
|
objDistribucionPartidaEL.Monto,
|
||||||
|
objDistribucionPartidaEL.PartidaPresupuestaria,
|
||||||
|
objDistribucionPartidaEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del DistribucionPartida
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoDistribucionPartida()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objDistribucionPartidaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objDistribucionPartidaEL.PK, Tablas.distribucionpartida, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.distribucionpartida.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objDistribucionPartidaEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista la distribucion de partidas en forma tabular
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getDistribucionPartida()
|
||||||
|
{
|
||||||
|
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.SqlClient");
|
||||||
|
DbParameter[] dbpParametros = new DbParameter[1];
|
||||||
|
|
||||||
|
for (int i = 0; i < dbpParametros.Length; i++)
|
||||||
|
{
|
||||||
|
dbpParametros[i] = factory.CreateParameter();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Parametros PK Proyecto
|
||||||
|
dbpParametros[0].ParameterName = "@P_PKPROYECTO";
|
||||||
|
dbpParametros[0].Value = objDistribucionPartidaEL.Proyecto;
|
||||||
|
dbpParametros[0].DbType = DbType.String;
|
||||||
|
|
||||||
|
DataSet dsPartidas = baseDAL.dsProcedimientoAlmacenado(Procedimiento.PA_PARTIDASPIVOT.ToString(), dbpParametros, NombreConeccionBD);
|
||||||
|
|
||||||
|
return dsPartidas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSet getTotalPartida()
|
||||||
|
{
|
||||||
|
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.SqlClient");
|
||||||
|
DbParameter[] dbpParametros = new DbParameter[1];
|
||||||
|
|
||||||
|
for (int i = 0; i < dbpParametros.Length; i++)
|
||||||
|
{
|
||||||
|
dbpParametros[i] = factory.CreateParameter();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Parametros PK Proyecto
|
||||||
|
dbpParametros[0].ParameterName = "@P_PKPROYECTO";
|
||||||
|
dbpParametros[0].Value = objDistribucionPartidaEL.Proyecto;
|
||||||
|
dbpParametros[0].DbType = DbType.String;
|
||||||
|
|
||||||
|
DataSet dsPartidas = baseDAL.dsProcedimientoAlmacenado(Procedimiento.PA_TOTALESPARTIDAS.ToString(), dbpParametros, NombreConeccionBD);
|
||||||
|
|
||||||
|
return dsPartidas;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista la distribucion de partidas en detalladamente
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getDetalle()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objDistribucionPartidaEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objDistribucionPartidaEL.PK, Tablas.distribucionpartida, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.objDistribucionPartidaEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objDistribucionPartidaEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_detalledistribucionpartida.ToString();
|
||||||
|
|
||||||
|
DataSet dsPartidas = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY INDICEPARTIDAPRESUPUESTARIA, ANIODISTRIBUCIONPARTIDA");
|
||||||
|
|
||||||
|
return dsPartidas;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
36
AYA.FROPI/AyABL/Properties/AssemblyInfo.cs
Normal file
36
AYA.FROPI/AyABL/Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// La información general sobre un ensamblado se controla mediante el siguiente
|
||||||
|
// conjunto de atributos. Cambie estos atributos para modificar la información
|
||||||
|
// asociada con un ensamblado.
|
||||||
|
[assembly: AssemblyTitle("AyABL")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("AyABL")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Si establece ComVisible como false, los tipos de este ensamblado no estarán visibles
|
||||||
|
// para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
|
||||||
|
// COM, establezca el atributo ComVisible como true en este tipo.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// El siguiente GUID sirve como identificador de typelib si este proyecto se expone a COM
|
||||||
|
[assembly: Guid("e33884f9-71a5-4c5b-99e3-7d871504407b")]
|
||||||
|
|
||||||
|
// La información de versión de un ensamblado consta de los cuatro valores siguientes:
|
||||||
|
//
|
||||||
|
// Versión principal
|
||||||
|
// Versión secundaria
|
||||||
|
// Número de compilación
|
||||||
|
// Revisión
|
||||||
|
//
|
||||||
|
// Puede especificar todos los valores o establecer como predeterminados los números de compilación y de revisión
|
||||||
|
// mediante el carácter '*', como se muestra a continuación:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
127
AYA.FROPI/AyABL/RCS/AccionBitacora.Designer.cs
generated
Normal file
127
AYA.FROPI/AyABL/RCS/AccionBitacora.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Este código fue generado por una herramienta.
|
||||||
|
// Versión de runtime:4.0.30319.34014
|
||||||
|
//
|
||||||
|
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
|
||||||
|
// se vuelve a generar el código.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace AyABL.RCS
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc.
|
||||||
|
/// </summary>
|
||||||
|
// StronglyTypedResourceBuilder generó automáticamente esta clase
|
||||||
|
// a través de una herramienta como ResGen o Visual Studio.
|
||||||
|
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
|
||||||
|
// con la opción /str o recompile su proyecto de VS.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class AccionBitacora {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal AccionBitacora() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AyABL.RCS.AccionBitacora", typeof(AccionBitacora).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
|
||||||
|
/// búsquedas de recursos mediante esta clase de recurso fuertemente tipado.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una cadena traducida similar a DELETE.
|
||||||
|
/// </summary>
|
||||||
|
public static string DELETE {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("DELETE", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una cadena traducida similar a Ingreso Sistema.
|
||||||
|
/// </summary>
|
||||||
|
public static string INGRESO {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("INGRESO", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una cadena traducida similar a Ingreso ADS.
|
||||||
|
/// </summary>
|
||||||
|
public static string INGRESOADS {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("INGRESOADS", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una cadena traducida similar a INSERT.
|
||||||
|
/// </summary>
|
||||||
|
public static string INSERT {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("INSERT", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una cadena traducida similar a Salida Sistema.
|
||||||
|
/// </summary>
|
||||||
|
public static string SALIDA {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SALIDA", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una cadena traducida similar a Salida ADS.
|
||||||
|
/// </summary>
|
||||||
|
public static string SALIDAADS {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SALIDAADS", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una cadena traducida similar a UPDATE.
|
||||||
|
/// </summary>
|
||||||
|
public static string UPDATE {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UPDATE", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
141
AYA.FROPI/AyABL/RCS/AccionBitacora.resx
Normal file
141
AYA.FROPI/AyABL/RCS/AccionBitacora.resx
Normal file
|
|
@ -0,0 +1,141 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="DELETE" xml:space="preserve">
|
||||||
|
<value>DELETE</value>
|
||||||
|
</data>
|
||||||
|
<data name="INGRESO" xml:space="preserve">
|
||||||
|
<value>Ingreso Sistema</value>
|
||||||
|
</data>
|
||||||
|
<data name="INGRESOADS" xml:space="preserve">
|
||||||
|
<value>Ingreso ADS</value>
|
||||||
|
</data>
|
||||||
|
<data name="INSERT" xml:space="preserve">
|
||||||
|
<value>INSERT</value>
|
||||||
|
</data>
|
||||||
|
<data name="SALIDA" xml:space="preserve">
|
||||||
|
<value>Salida Sistema</value>
|
||||||
|
</data>
|
||||||
|
<data name="SALIDAADS" xml:space="preserve">
|
||||||
|
<value>Salida ADS</value>
|
||||||
|
</data>
|
||||||
|
<data name="UPDATE" xml:space="preserve">
|
||||||
|
<value>UPDATE</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
183
AYA.FROPI/AyABL/RCS/MensajesAplicacion.Designer.cs
generated
Normal file
183
AYA.FROPI/AyABL/RCS/MensajesAplicacion.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:2.0.50727.5448
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace AyABL.RCS
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class MensajesAplicacion {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal MensajesAplicacion() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AyABL.RCS.MensajesAplicacion", typeof(MensajesAplicacion).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Se borro la información exitosamente.
|
||||||
|
/// </summary>
|
||||||
|
public static string BorradoExitoso {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("BorradoExitoso", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Se presento un problema al tratar de eliminar la información.
|
||||||
|
/// </summary>
|
||||||
|
public static string BorradoFallido {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("BorradoFallido", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Algunos datos seleccionados no pudieron ser eliminados, contienen información asociada a ellos.
|
||||||
|
/// </summary>
|
||||||
|
public static string BorradoInterrumpido {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("BorradoInterrumpido", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Error de conexión, inténtelo de nuevo.
|
||||||
|
/// </summary>
|
||||||
|
public static string ErrorConexion {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorConexion", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to No cuenta con los permisos necesarios para realizar la acción.
|
||||||
|
/// </summary>
|
||||||
|
public static string FaltanPermisos {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("FaltanPermisos", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to La fecha ingresada no es valida.
|
||||||
|
/// </summary>
|
||||||
|
public static string FechaErronea {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("FechaErronea", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Se guardaron los datos satisfactoriamente.
|
||||||
|
/// </summary>
|
||||||
|
public static string GuardadoExitoso {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GuardadoExitoso", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Se presento un problema al tratar de guardar la información.
|
||||||
|
/// </summary>
|
||||||
|
public static string GuardadoFallido {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("GuardadoFallido", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to La fecha inicial debe ser menor o igual a la fecha final.
|
||||||
|
/// </summary>
|
||||||
|
public static string RangoFechaErroneo {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("RangoFechaErroneo", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Su usuario se encuentra desactivado en el sistema.
|
||||||
|
/// </summary>
|
||||||
|
public static string UsuarioDeshabilitado {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UsuarioDeshabilitado", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Usted no tiene permisos para ingresar a este sistema.
|
||||||
|
/// </summary>
|
||||||
|
public static string UsuarioInexistente {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UsuarioInexistente", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una cadena traducida similar a Se dio un problema al refrescar los datos.
|
||||||
|
/// </summary>
|
||||||
|
public static string RefrescarFallido
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ResourceManager.GetString("RefrescarFallido", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una cadena traducida similar a Se dio un problema mientras se realizaba la busqueda.
|
||||||
|
/// </summary>
|
||||||
|
public static string BusquedaFallido
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ResourceManager.GetString("BusquedaFallido", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
159
AYA.FROPI/AyABL/RCS/MensajesAplicacion.resx
Normal file
159
AYA.FROPI/AyABL/RCS/MensajesAplicacion.resx
Normal file
|
|
@ -0,0 +1,159 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="BorradoExitoso" xml:space="preserve">
|
||||||
|
<value>Se borro la información exitosamente</value>
|
||||||
|
</data>
|
||||||
|
<data name="BorradoFallido" xml:space="preserve">
|
||||||
|
<value>Se presento un problema al tratar de eliminar la información</value>
|
||||||
|
</data>
|
||||||
|
<data name="BorradoInterrumpido" xml:space="preserve">
|
||||||
|
<value>Algunos datos seleccionados no pudieron ser eliminados, contienen información asociada a ellos</value>
|
||||||
|
</data>
|
||||||
|
<data name="BusquedaFallido" xml:space="preserve">
|
||||||
|
<value>Se dio un problema mientras se realizaba la busqueda</value>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorConexion" xml:space="preserve">
|
||||||
|
<value>Error de conexión, inténtelo de nuevo</value>
|
||||||
|
</data>
|
||||||
|
<data name="FaltanPermisos" xml:space="preserve">
|
||||||
|
<value>No cuenta con los permisos necesarios para realizar la acción</value>
|
||||||
|
</data>
|
||||||
|
<data name="FechaErronea" xml:space="preserve">
|
||||||
|
<value>La fecha ingresada no es valida</value>
|
||||||
|
</data>
|
||||||
|
<data name="GuardadoExitoso" xml:space="preserve">
|
||||||
|
<value>Se guardaron los datos satisfactoriamente</value>
|
||||||
|
</data>
|
||||||
|
<data name="GuardadoFallido" xml:space="preserve">
|
||||||
|
<value>Se presento un problema al tratar de guardar la información</value>
|
||||||
|
</data>
|
||||||
|
<data name="RangoFechaErroneo" xml:space="preserve">
|
||||||
|
<value>La fecha inicial debe ser menor o igual a la fecha final</value>
|
||||||
|
</data>
|
||||||
|
<data name="RefrescarFallido" xml:space="preserve">
|
||||||
|
<value>Se dio un problema al refrescar los datos</value>
|
||||||
|
</data>
|
||||||
|
<data name="UsuarioDeshabilitado" xml:space="preserve">
|
||||||
|
<value>Su usuario se encuentra desactivado en el sistema</value>
|
||||||
|
</data>
|
||||||
|
<data name="UsuarioInexistente" xml:space="preserve">
|
||||||
|
<value>Usted no tiene permisos para ingresar a este sistema</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
109
AYA.FROPI/AyABL/RCS/MensajesBitacora.Designer.cs
generated
Normal file
109
AYA.FROPI/AyABL/RCS/MensajesBitacora.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:2.0.50727.5448
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace AyABL.RCS
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class MensajesBitacora {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal MensajesBitacora() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AyABL.RCS.MensajesBitacora", typeof(MensajesBitacora).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to finaliza sesión en el sistema.
|
||||||
|
/// </summary>
|
||||||
|
public static string CerrarSession {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CerrarSession", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Se ha eliminado un registro del sistema. Información del registro: .
|
||||||
|
/// </summary>
|
||||||
|
public static string EliminarRegistro {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("EliminarRegistro", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Se ha ingresado un nuevo registro en el sistema..
|
||||||
|
/// </summary>
|
||||||
|
public static string IngresarRegistro {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("IngresarRegistro", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to inicia sesión en el sistema.
|
||||||
|
/// </summary>
|
||||||
|
public static string IniciarSession {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("IniciarSession", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Se ha modificado un registro en el sistema. Información de registro modificado: .
|
||||||
|
/// </summary>
|
||||||
|
public static string ModificarRegistro {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ModificarRegistro", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
135
AYA.FROPI/AyABL/RCS/MensajesBitacora.resx
Normal file
135
AYA.FROPI/AyABL/RCS/MensajesBitacora.resx
Normal file
|
|
@ -0,0 +1,135 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="CerrarSession" xml:space="preserve">
|
||||||
|
<value> finaliza sesión en el sistema</value>
|
||||||
|
</data>
|
||||||
|
<data name="EliminarRegistro" xml:space="preserve">
|
||||||
|
<value>Se ha eliminado un registro del sistema. Información del registro: </value>
|
||||||
|
</data>
|
||||||
|
<data name="IngresarRegistro" xml:space="preserve">
|
||||||
|
<value>Se ha ingresado un nuevo registro en el sistema.</value>
|
||||||
|
</data>
|
||||||
|
<data name="IniciarSession" xml:space="preserve">
|
||||||
|
<value> inicia sesión en el sistema</value>
|
||||||
|
</data>
|
||||||
|
<data name="ModificarRegistro" xml:space="preserve">
|
||||||
|
<value>Se ha modificado un registro en el sistema. Información de registro modificado: </value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
150
AYA.FROPI/AyABL/RHP/RequerimientoRecursoBL.cs
Normal file
150
AYA.FROPI/AyABL/RHP/RequerimientoRecursoBL.cs
Normal file
|
|
@ -0,0 +1,150 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.RHP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.RHP
|
||||||
|
{
|
||||||
|
public class RequerimientoRecursoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public RequerimientoRecursoBL()
|
||||||
|
{
|
||||||
|
objRequerimientoRecursoEL = new RequerimientoRecursoEL();
|
||||||
|
this.NombreTabla = Modulos.t_rhp_.ToString() + Tablas.requerimientorecurso.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public RequerimientoRecursoEL objRequerimientoRecursoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del RequerimientoRecursoBL
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarRequerimientoRecursoBL()
|
||||||
|
{
|
||||||
|
int intPkRetornada = 0;
|
||||||
|
|
||||||
|
this.CamposTabla = t_rhp_requerimientorecurso.CANTIDADAP.ToString() + Tablas.requerimientorecurso.ToString().ToUpper() + ", " +
|
||||||
|
t_rhp_requerimientorecurso.CANTIDADECP.ToString() + Tablas.requerimientorecurso.ToString().ToUpper() + ", " +
|
||||||
|
t_rhp_requerimientorecurso.CANTIDADPPP.ToString() + Tablas.requerimientorecurso.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.tiporecursohumano.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objRequerimientoRecursoEL.CantidadAP,
|
||||||
|
objRequerimientoRecursoEL.CantidadECP,
|
||||||
|
objRequerimientoRecursoEL.CantidadPPP,
|
||||||
|
objRequerimientoRecursoEL.TipoRecurso,
|
||||||
|
objRequerimientoRecursoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
|
||||||
|
intPkRetornada = baseDAL.SiguientePK(NombreTabla, NombreConeccionBD);
|
||||||
|
|
||||||
|
return intPkRetornada;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del RequerimientoRecursoBL
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarRequerimientoRecursoBL()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objRequerimientoRecursoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objRequerimientoRecursoEL.PK, Tablas.requerimientorecurso, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_rhp_requerimientorecurso.CANTIDADAP.ToString() + Tablas.requerimientorecurso.ToString().ToUpper() + ", " +
|
||||||
|
t_rhp_requerimientorecurso.CANTIDADECP.ToString() + Tablas.requerimientorecurso.ToString().ToUpper() + ", " +
|
||||||
|
t_rhp_requerimientorecurso.CANTIDADPPP.ToString() + Tablas.requerimientorecurso.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.tiporecursohumano.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objRequerimientoRecursoEL.CantidadAP,
|
||||||
|
objRequerimientoRecursoEL.CantidadECP,
|
||||||
|
objRequerimientoRecursoEL.CantidadPPP,
|
||||||
|
objRequerimientoRecursoEL.TipoRecurso,
|
||||||
|
objRequerimientoRecursoEL.Proyecto
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del RequerimientoRecursoBL
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoRequerimientoRecursoBL()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objRequerimientoRecursoEL.FK > 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorFK(objRequerimientoRecursoEL.FK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.requerimientorecurso.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objRequerimientoRecursoEL.ASTATE };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los RequerimientoRecursoBLes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getRequerimientoRecursoBL()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
DataSet dsRequerimientoRecursoBL = new DataSet();
|
||||||
|
|
||||||
|
if (this.objRequerimientoRecursoEL.Proyecto != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorFK(objRequerimientoRecursoEL.Proyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.requerimientorecurso, operadorLogico.NONE));
|
||||||
|
dsRequerimientoRecursoBL = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKREQUERIMIENTORECURSO ASC ");
|
||||||
|
}
|
||||||
|
|
||||||
|
return dsRequerimientoRecursoBL;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
134
AYA.FROPI/AyABL/SEG/BitacoraBL.cs
Normal file
134
AYA.FROPI/AyABL/SEG/BitacoraBL.cs
Normal file
|
|
@ -0,0 +1,134 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.SEG;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.SEG
|
||||||
|
{
|
||||||
|
public class BitacoraBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public BitacoraBL()
|
||||||
|
{
|
||||||
|
objBitacoraEL = new BitacoraEL();
|
||||||
|
this.NombreTabla = Modulos.t_seg_.ToString() + Tablas.bitacora.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public BitacoraEL objBitacoraEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye el registro en la bitacora del sistema
|
||||||
|
/// </summary>
|
||||||
|
public void insertarBitacora()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
this.CamposTabla = t_seg_bitacora.LOGIN.ToString() + Tablas.bitacora.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.FECHA.ToString() + Tablas.bitacora.ToString().ToUpper() + ", " +
|
||||||
|
t_seg_bitacora.ACCION.ToString() + Tablas.bitacora.ToString().ToUpper() + ", " +
|
||||||
|
t_seg_bitacora.REGISTRO.ToString() + Tablas.bitacora.ToString().ToUpper() + ", " +
|
||||||
|
t_seg_bitacora.PAGINA.ToString() + Tablas.bitacora.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objBitacoraEL.Login,
|
||||||
|
objBitacoraEL.Fecha,
|
||||||
|
objBitacoraEL.Accion,
|
||||||
|
objBitacoraEL.Registro,
|
||||||
|
objBitacoraEL.Pagina
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Devuelve los datos de un usuario
|
||||||
|
/// </summary>
|
||||||
|
public DataSet getDatosBitacora(ArrayList p_arlCondicionesBuscador)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
cargarCondicionBusqueda(arlCondiciones, p_arlCondicionesBuscador);
|
||||||
|
|
||||||
|
DataSet dsBitacora = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, null);;
|
||||||
|
|
||||||
|
return dsBitacora;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Crea la condición con el campo Login
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_strLogin"></param>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
private CondicionDAL buscarPorLogin(string p_strLogin, operadorLogico operador)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = t_seg_bitacora.LOGIN.ToString() + Tablas.bitacora.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = p_strLogin;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Crea la condicion con el campo Pagina
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_strLogin"></param>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
private CondicionDAL buscarPorPagina(string p_strPagina, operadorLogico operador)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = t_seg_bitacora.PAGINA.ToString() + Tablas.bitacora.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = p_strPagina;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Crea la condicion con el campo Accion
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_strLogin"></param>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
private CondicionDAL buscarPorAccion(string p_strAccion, operadorLogico operador)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = t_seg_bitacora.ACCION.ToString() + Tablas.bitacora.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = p_strAccion;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
44
AYA.FROPI/AyABL/SEG/ComandoBL.cs
Normal file
44
AYA.FROPI/AyABL/SEG/ComandoBL.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyABL.AUT;
|
||||||
|
using AyAEL.SEG;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AyABL.APL
|
||||||
|
{
|
||||||
|
public class ComandoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public ComandoBL()
|
||||||
|
{
|
||||||
|
objComandoEL = new ComandoEL();
|
||||||
|
this.NombreTabla = Modulos.t_seg_.ToString() + Tablas.comando.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public ComandoEL objComandoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
61
AYA.FROPI/AyABL/SEG/MenuBL.cs
Normal file
61
AYA.FROPI/AyABL/SEG/MenuBL.cs
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.SEG;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AyABL.SEG
|
||||||
|
{
|
||||||
|
public class MenuBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public MenuBL()
|
||||||
|
{
|
||||||
|
objMenuEL = new MenuEL();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public MenuEL objMenuEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Carga todas las opciones del menu para un role especifico (para que la cargue necesita tener el comando Consultar)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_intPKRole"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public DataSet cargarMenu(int p_intPKRol)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
this.NombreTabla = Vistas.v_menuconsulta.ToString();
|
||||||
|
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorPK(p_intPKRol, Tablas.rol, operadorLogico.NONE));
|
||||||
|
|
||||||
|
return baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, "order by PADREMENU, ORDENMENU");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
41
AYA.FROPI/AyABL/SEG/MenuComandoBL.cs
Normal file
41
AYA.FROPI/AyABL/SEG/MenuComandoBL.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyABL.AUT;
|
||||||
|
using AyAEL.SEG;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.APL
|
||||||
|
{
|
||||||
|
public class ItemMenuComandoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public ItemMenuComandoBL()
|
||||||
|
{
|
||||||
|
objMenuComandoEL = new MenuComandoEL();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public MenuComandoEL objMenuComandoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
139
AYA.FROPI/AyABL/SEG/RolBL.cs
Normal file
139
AYA.FROPI/AyABL/SEG/RolBL.cs
Normal file
|
|
@ -0,0 +1,139 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyABL.AUT;
|
||||||
|
using AyAEL.SEG;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AyABL.SEG
|
||||||
|
{
|
||||||
|
public class RolBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public RolBL()
|
||||||
|
{
|
||||||
|
objRolEL = new RolEL();
|
||||||
|
this.NombreTabla = Modulos.t_seg_.ToString() + Tablas.rol.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public RolEL objRolEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Rol
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool insertarRol()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.rol.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objRolEL.Nombre };
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Rol
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public void actualizarRole()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (objRolEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objRolEL.PK, Tablas.rol, operadorLogico.AND));
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.NOMBRE.ToString() + Tablas.rol.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objRolEL.Nombre };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Rol
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public void actualizaEstadoRol()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (objRolEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objRolEL.PK, Tablas.rol, operadorLogico.AND));
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ACTIVO.ToString() + Tablas.rol.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objRolEL.Activo };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los roles
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet listarRoles()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objRolEL.PK != 0)
|
||||||
|
arlCondiciones.Add(buscarPorPK(objRolEL.PK, Tablas.rol, operadorLogico.AND));
|
||||||
|
|
||||||
|
if (objRolEL.Padre == 4 || objRolEL.Padre == 9)
|
||||||
|
arlCondiciones.Add(buscarPorPadre(objRolEL.Padre, Tablas.rol, operadorLogico.AND, operadorGeneral.EQUAL));
|
||||||
|
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorActivo(objRolEL.ASTATE, Tablas.rol, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsRole = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKROL ASC ");
|
||||||
|
|
||||||
|
return dsRole;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
110
AYA.FROPI/AyABL/SEG/RolMenuComandoBL.cs
Normal file
110
AYA.FROPI/AyABL/SEG/RolMenuComandoBL.cs
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyABL.AUT;
|
||||||
|
using AyAEL.SEG;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.SEG
|
||||||
|
{
|
||||||
|
public class RolMenuComandoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public RolMenuComandoBL()
|
||||||
|
{
|
||||||
|
objRolMenuComandoEL = new RolMenuComandoEL();
|
||||||
|
objMenuEL = new MenuEL();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public RolMenuComandoEL objRolMenuComandoEL { get; set; }
|
||||||
|
|
||||||
|
public MenuEL objMenuEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Carga todas los comando opciones del menuitem para un role especifico (para que la cargue necesita tener el comando Consultar)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_intPKRole"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet cargarComandosxRol(int p_intPKRol, string p_strURL)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorRol(p_intPKRol, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorURL(p_strURL, operadorLogico.NONE));
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_comandosxmenuxrol.ToString();
|
||||||
|
|
||||||
|
return baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Devuelve la condicion de busqueda por el nombre del comando
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_strDescripcionComando"></param>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
private CondicionDAL buscarPorComando(string p_strComando, operadorLogico operador)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Concepto.NOMBRE.ToString() + Tablas.comando.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = p_strComando;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Devuelve la condicion de busqueda por descripcion del comando
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
private CondicionDAL buscarPorRol(int p_intRol, operadorLogico operador)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Constraints.PK.ToString() + Tablas.rol.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = p_intRol;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Devuelve la condicion de busqueda por el campo URL
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operador"></param>
|
||||||
|
private CondicionDAL buscarPorURL(string p_strURL, operadorLogico operador)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = t_seg_menu.URL.ToString() + Tablas.menu.ToString().ToUpper();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = operador;
|
||||||
|
cdlCondicion.valorDerecho = p_strURL;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
258
AYA.FROPI/AyABL/SEG/UsuarioBL.cs
Normal file
258
AYA.FROPI/AyABL/SEG/UsuarioBL.cs
Normal file
|
|
@ -0,0 +1,258 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyABL.AUT.Autenticacion;
|
||||||
|
using AyAEL.SEG;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.SEG
|
||||||
|
{
|
||||||
|
public class UsuarioBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public UsuarioBL()
|
||||||
|
{
|
||||||
|
objUsuarioEL = new UsuarioEL();
|
||||||
|
this.NombreTabla = Modulos.t_seg_.ToString() + Tablas.usuario.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public UsuarioEL objUsuarioEL { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Metodo para loguearse contra active directory
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_strLogin"></param>
|
||||||
|
/// <param name="p_strContrasena"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
public bool validarActiveDirectory(string p_strLogin, string p_strContrasena)
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
AutenticacionBL objAutenticacionBL = new AutenticacionBL();
|
||||||
|
string servidorActiveDirectory = "aya-srv-0111/DC=intranet, DC=aya, DC=go, DC=cr";
|
||||||
|
|
||||||
|
if (objAutenticacionBL.Autenticar(p_strLogin, p_strContrasena, servidorActiveDirectory))
|
||||||
|
{
|
||||||
|
blnEjecutado = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string servidorActiveDirectory2 = "aya-vsrv-0112/DC=intranet,DC=aya,DC=go,DC=cr";
|
||||||
|
|
||||||
|
if (objAutenticacionBL.Autenticar(p_strLogin, p_strContrasena, servidorActiveDirectory2))
|
||||||
|
{
|
||||||
|
blnEjecutado = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
blnEjecutado = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para loguearse al sistema
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_objUsuarioEL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
|
||||||
|
public DataSet dsLogueo()
|
||||||
|
{
|
||||||
|
DataSet dsLogueo = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorLogin(objUsuarioEL.Login, Tablas.usuario, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorActivo(true, Tablas.usuario, operadorLogico.NONE));
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_informacionusuario.ToString();
|
||||||
|
|
||||||
|
dsLogueo = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsLogueo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Se utiliza para listar los registros de la tabla
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="p_objUsuarioEL"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// wfrLogin.aspx
|
||||||
|
|
||||||
|
public DataSet getListaUsuarios(ArrayList p_arlCondicionesBuscador)
|
||||||
|
{
|
||||||
|
DataSet dsLogueo = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
cargarCondicionBusqueda(arlCondiciones, p_arlCondicionesBuscador);
|
||||||
|
|
||||||
|
if (objUsuarioEL.PK != 0)
|
||||||
|
arlCondiciones.Add(buscarPorPK(objUsuarioEL.PK, Tablas.usuario, operadorLogico.AND));
|
||||||
|
|
||||||
|
if (objUsuarioEL.Activo != null)
|
||||||
|
arlCondiciones.Add(buscarPorActivo(objUsuarioEL.Activo, Tablas.usuario, operadorLogico.NONE));
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_informacionusuario.ToString();
|
||||||
|
|
||||||
|
dsLogueo = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
return dsLogueo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool getUsuario()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
int intUsuario = 0;
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorLogin(objUsuarioEL.Login, Tablas.usuario, operadorLogico.NONE));
|
||||||
|
|
||||||
|
intUsuario = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null).Tables[0].Rows.Count;
|
||||||
|
|
||||||
|
if (intUsuario == 0)
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Incluye los datos del usuario en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// Usado en:
|
||||||
|
/// SEG/usuario/frwUsuario.aspx
|
||||||
|
|
||||||
|
public bool insertarUsuario()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.CamposTabla = t_seg_usuario.LOGIN.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
t_seg_usuario.CEDULA.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
t_seg_usuario.CORREO.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.rol.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.dependencia.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objUsuarioEL.Login,
|
||||||
|
objUsuarioEL.Nombre,
|
||||||
|
objUsuarioEL.Cedula,
|
||||||
|
objUsuarioEL.Correo,
|
||||||
|
objUsuarioEL.Rol,
|
||||||
|
objUsuarioEL.Dependencia
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, null);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza los datos del usuario en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarUsuario()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objUsuarioEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objUsuarioEL.PK, Tablas.usuario, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_seg_usuario.LOGIN.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.NOMBRE.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
t_seg_usuario.CEDULA.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
t_seg_usuario.CORREO.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
Concepto.ACTIVO.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.rol.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.dependencia.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objUsuarioEL.Login,
|
||||||
|
objUsuarioEL.Nombre,
|
||||||
|
objUsuarioEL.Cedula,
|
||||||
|
objUsuarioEL.Correo,
|
||||||
|
objUsuarioEL.Activo,
|
||||||
|
objUsuarioEL.Rol,
|
||||||
|
objUsuarioEL.Dependencia
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del usuario en base de datos
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public bool actualizarEstadoUsuario()
|
||||||
|
{
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objUsuarioEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objUsuarioEL.PK, Tablas.usuario, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ACTIVO.ToString() + Tablas.usuario.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ objUsuarioEL.Activo };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones
|
||||||
|
protected CondicionDAL buscarPorLogin(string p_strLogin, Tablas p_nombreTabla, operadorLogico logOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = t_seg_usuario.LOGIN.ToString() + p_nombreTabla.ToString();
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.valorDerecho = p_strLogin;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
178
AYA.FROPI/AyABL/SEP/IndicadorProyectoBL.cs
Normal file
178
AYA.FROPI/AyABL/SEP/IndicadorProyectoBL.cs
Normal file
|
|
@ -0,0 +1,178 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
using AyAEL.SEP;
|
||||||
|
using AyADAL;
|
||||||
|
|
||||||
|
namespace AyABL.SEP
|
||||||
|
{
|
||||||
|
public class IndicadorProyectoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public IndicadorProyectoBL()
|
||||||
|
{
|
||||||
|
objIndicadorProyectoEL = new IndicadorProyectoEL();
|
||||||
|
this.NombreTabla = Modulos.t_sep_.ToString() + Tablas.indicadorproyecto.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public IndicadorProyectoEL objIndicadorProyectoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Proyecto
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarIndicadorProyecto()
|
||||||
|
{
|
||||||
|
int intEjecutado = 0;
|
||||||
|
|
||||||
|
this.CamposTabla = t_sep_indicadorproyecto.AP.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.CPTP.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.CPTR.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.CRTR.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.VC.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.VP.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.IRC.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.IRP.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.IC.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.FECHACIERRE.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.USUARIOCREA.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.periodopublicacion.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objIndicadorProyectoEL.AvanceProyecto,
|
||||||
|
objIndicadorProyectoEL.CostoPlaneado,
|
||||||
|
objIndicadorProyectoEL.ValorGanado,
|
||||||
|
objIndicadorProyectoEL.CostoReal,
|
||||||
|
objIndicadorProyectoEL.VariacionCosto,
|
||||||
|
objIndicadorProyectoEL.VariacionProgramacion,
|
||||||
|
objIndicadorProyectoEL.IndiceRendimientoCosto,
|
||||||
|
objIndicadorProyectoEL.IndiceRendimientoPanificado,
|
||||||
|
objIndicadorProyectoEL.IndiceCritico,
|
||||||
|
objIndicadorProyectoEL.FechaCierre,
|
||||||
|
objIndicadorProyectoEL.UsuarioCrea,
|
||||||
|
objIndicadorProyectoEL.Proyecto,
|
||||||
|
objIndicadorProyectoEL.PeriodoPublicacion
|
||||||
|
};
|
||||||
|
|
||||||
|
intEjecutado = baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return intEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Proyecto
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarIndicadorProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objIndicadorProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objIndicadorProyectoEL.PK, Tablas.indicadorproyecto, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_sep_indicadorproyecto.AP.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.CPTP.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.CPTR.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.CRTR.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.VC.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.VP.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.IRC.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.IRP.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.IC.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_indicadorproyecto.FECHACIERRE.ToString() + Tablas.indicadorproyecto.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.periodopublicacion.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objIndicadorProyectoEL.AvanceProyecto,
|
||||||
|
objIndicadorProyectoEL.CostoPlaneado,
|
||||||
|
objIndicadorProyectoEL.ValorGanado,
|
||||||
|
objIndicadorProyectoEL.CostoReal,
|
||||||
|
objIndicadorProyectoEL.VariacionCosto,
|
||||||
|
objIndicadorProyectoEL.VariacionProgramacion,
|
||||||
|
objIndicadorProyectoEL.IndiceRendimientoCosto,
|
||||||
|
objIndicadorProyectoEL.IndiceRendimientoPanificado,
|
||||||
|
objIndicadorProyectoEL.IndiceCritico,
|
||||||
|
objIndicadorProyectoEL.FechaCierre,
|
||||||
|
objIndicadorProyectoEL.Proyecto,
|
||||||
|
objIndicadorProyectoEL.PeriodoPublicacion
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Proyecto
|
||||||
|
/// </summary>
|
||||||
|
public bool actualizaEstadoProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objIndicadorProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objIndicadorProyectoEL.PK, Tablas.indicadorproyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.indicadorproyecto.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objIndicadorProyectoEL.ASTATE = false };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los Proyectoes
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getIndicadoresProyectos(int fkProyecto)
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objIndicadorProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objIndicadorProyectoEL.PK, Tablas.indicadorproyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorFK(fkProyecto, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.indicadorproyecto, operadorLogico.NONE));
|
||||||
|
|
||||||
|
DataSet dsProyecto = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY FKPERIODOPUBLICACION DESC ");
|
||||||
|
|
||||||
|
return dsProyecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
195
AYA.FROPI/AyABL/SEP/LiderProyectoBL.cs
Normal file
195
AYA.FROPI/AyABL/SEP/LiderProyectoBL.cs
Normal file
|
|
@ -0,0 +1,195 @@
|
||||||
|
using AyADAL;
|
||||||
|
using AyAEL.SEP;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyABL.SEP
|
||||||
|
{
|
||||||
|
public class LiderProyectoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public LiderProyectoBL()
|
||||||
|
{
|
||||||
|
objLiderProyectoEL = new LiderProyectoEL();
|
||||||
|
this.NombreTabla = Modulos.t_sep_.ToString() + Tablas.liderproyecto.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public LiderProyectoEL objLiderProyectoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Proyecto
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarLiderProyecto()
|
||||||
|
{
|
||||||
|
int intEjecutado = 0;
|
||||||
|
|
||||||
|
this.CamposTabla = Constraints.FK.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objLiderProyectoEL.Usuario,
|
||||||
|
objLiderProyectoEL.Proyecto};
|
||||||
|
|
||||||
|
intEjecutado = baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return intEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Proyecto
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objLiderProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objLiderProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Constraints.FK.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Lider a Proyecto
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoLiderProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objLiderProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objLiderProyectoEL.PK, Tablas.liderproyecto, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.liderproyecto.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objLiderProyectoEL.ASTATE = false };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los todos los Proyectos asignados a un usuario
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getLiderProyectos()
|
||||||
|
{
|
||||||
|
DataSet dsLider = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objLiderProyectoEL.Usuario != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorUsuario(objLiderProyectoEL.Usuario, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objLiderProyectoEL.Region != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorRegion(objLiderProyectoEL.Region, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_liderproyecto.ToString();
|
||||||
|
|
||||||
|
dsLider = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
//string query;
|
||||||
|
|
||||||
|
//if (fkRegion == 0)
|
||||||
|
//{
|
||||||
|
// query = "SELECT l.PKLIDERPROYECTO, p.PKPROYECTO, p.NOMBREPROYECTO, i.ENCARGADOINFORMACIONGENERAL FROM t_agp_proyecto p JOIN t_sep_liderproyecto l ON p.PKPROYECTO = l.FKPROYECTO " +
|
||||||
|
// "JOIN dbo.t_igp_informaciongeneral i ON i.FKPROYECTO = p.PKPROYECTO WHERE l.FKUSUARIO = " + fkUser + "AND ASTATELIDERPROYECTO = 1";
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// query = "SELECT l.PKLIDERPROYECTO, p.PKPROYECTO, p.NOMBREPROYECTO, i.ENCARGADOINFORMACIONGENERAL FROM t_agp_proyecto p JOIN t_sep_liderproyecto l ON p.PKPROYECTO = l.FKPROYECTO " +
|
||||||
|
// "JOIN dbo.t_igp_informaciongeneral i ON i.FKPROYECTO = p.PKPROYECTO WHERE l.FKUSUARIO = " + fkUser + "AND ASTATELIDERPROYECTO = 1 AND i.FKREGION = " + fkRegion;
|
||||||
|
//}
|
||||||
|
//DataSet dsProyecto = baseDAL.ejecutarConsulta(query, arlCondiciones, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return dsLider;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista todos los proyectos disponibles para asignar
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
//public DataSet getLiderProyectos()
|
||||||
|
//{
|
||||||
|
// ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
// //if (this.objLiderProyectoEL.PK != 0)
|
||||||
|
// //{
|
||||||
|
// // arlCondiciones.Add(buscarPorPK(objLiderProyectoEL.PK, Tablas.liderproyecto, operadorLogico.AND));
|
||||||
|
// //}
|
||||||
|
// //arlCondiciones.Add(buscarPorAstate(true, Tablas.liderproyecto, operadorLogico.NONE));
|
||||||
|
// //DataSet dsProyecto = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKLIDERPROYECTO ASC ");
|
||||||
|
|
||||||
|
// string query = "SELECT p.PKPROYECTO, p.NOMBREPROYECTO, i.ENCARGADOINFORMACIONGENERAL FROM t_agp_proyecto p JOIN t_sep_liderproyecto l ON p.PKPROYECTO = l.FKPROYECTO " +
|
||||||
|
// "JOIN dbo.t_igp_informaciongeneral i ON i.FKPROYECTO = p.PKPROYECTO WHERE ASTATELIDERPROYECTO = 1";
|
||||||
|
// DataSet dsProyecto = baseDAL.ejecutarConsulta(query, arlCondiciones, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
// return dsProyecto;
|
||||||
|
//}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorUsuario(int p_intUsuario, operadorLogico logOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Constraints.FK.ToString() + Tablas.usuario.ToString();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.valorDerecho = p_intUsuario;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorRegion(int p_intRegion, operadorLogico logOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Constraints.FK.ToString() + Tablas.region.ToString();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.valorDerecho = p_intRegion;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
139
AYA.FROPI/AyABL/SEP/PeriodoPublicacionBL.cs
Normal file
139
AYA.FROPI/AyABL/SEP/PeriodoPublicacionBL.cs
Normal file
|
|
@ -0,0 +1,139 @@
|
||||||
|
using AyADAL;
|
||||||
|
using AyAEL.SEP;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyABL.SEP
|
||||||
|
{
|
||||||
|
public class PeriodoPublicacionBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public PeriodoPublicacionBL()
|
||||||
|
{
|
||||||
|
objPeriodoPublicacionEL = new PeriodoPublicacionEL();
|
||||||
|
this.NombreTabla = Modulos.t_sep_.ToString() + Tablas.periodopublicacion.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public PeriodoPublicacionEL objPeriodoPublicacionEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del PeriodoPublicacion
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarPeriodoPublicacion()
|
||||||
|
{
|
||||||
|
int intEjecutado = 0;
|
||||||
|
|
||||||
|
this.CamposTabla = t_sep_periodopublicacion.FECHAINICIO.ToString() + Tablas.periodopublicacion.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_periodopublicacion.FECHACIERRE.ToString() + Tablas.periodopublicacion.ToString().ToUpper() + ", ";
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objPeriodoPublicacionEL.FechaInicio,
|
||||||
|
objPeriodoPublicacionEL.FechaCierre,
|
||||||
|
};
|
||||||
|
|
||||||
|
intEjecutado = baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return intEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del PeriodoPublicacion
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarPeriodo()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objPeriodoPublicacionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objPeriodoPublicacionEL.PK, Tablas.periodopublicacion, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = t_sep_periodopublicacion.FECHAINICIO.ToString() + Tablas.periodopublicacion.ToString().ToUpper() + ", " +
|
||||||
|
t_sep_periodopublicacion.FECHACIERRE.ToString() + Tablas.periodopublicacion.ToString().ToUpper() + ", ";
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objPeriodoPublicacionEL.FechaInicio,
|
||||||
|
objPeriodoPublicacionEL.FechaCierre
|
||||||
|
};
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del PeriodoPublicacion
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoPeriodoPublicacion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objPeriodoPublicacionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objPeriodoPublicacionEL.PK, Tablas.periodopublicacion, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.periodopublicacion.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objPeriodoPublicacionEL.ASTATE = false };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista los PeriodoPublicaciones
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getPeriodoPublicacion()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (this.objPeriodoPublicacionEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorPK(objPeriodoPublicacionEL.PK, Tablas.periodopublicacion, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
arlCondiciones.Add(buscarPorAstate(true, Tablas.periodopublicacion, operadorLogico.NONE));
|
||||||
|
|
||||||
|
|
||||||
|
DataSet dsPeriodoPublicacion = baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arlCondiciones, null, " ORDER BY PKPERIODOPUBLICACION DESC ");
|
||||||
|
|
||||||
|
return dsPeriodoPublicacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
174
AYA.FROPI/AyABL/SEP/VisitanteProyectoBL.cs
Normal file
174
AYA.FROPI/AyABL/SEP/VisitanteProyectoBL.cs
Normal file
|
|
@ -0,0 +1,174 @@
|
||||||
|
using AyADAL;
|
||||||
|
using AyAEL.SEP;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyABL.SEP
|
||||||
|
{
|
||||||
|
public class VisitanteProyectoBL : AyABL
|
||||||
|
{
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
public VisitanteProyectoBL()
|
||||||
|
{
|
||||||
|
objVisitanteProyectoEL = new VisitanteProyectoEL();
|
||||||
|
this.NombreTabla = Modulos.t_sep_.ToString() + Tablas.visitanteproyecto.ToString();
|
||||||
|
this.NombreConeccionBD = BASESDEDATOS.FOPI.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public VisitanteProyectoEL objVisitanteProyectoEL { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Metodos
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inluye los datos del Proyecto
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public int insertarVisitanteProyecto()
|
||||||
|
{
|
||||||
|
int intEjecutado = 0;
|
||||||
|
|
||||||
|
this.CamposTabla = Constraints.FK.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{objVisitanteProyectoEL.Usuario,
|
||||||
|
objVisitanteProyectoEL.Proyecto};
|
||||||
|
|
||||||
|
intEjecutado = baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return intEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el dato del Visitante de Proyecto
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizarVisitanteProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objVisitanteProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objVisitanteProyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Constraints.FK.ToString() + Tablas.usuario.ToString().ToUpper() + ", " +
|
||||||
|
Constraints.FK.ToString() + Tablas.proyecto.ToString().ToUpper();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[]{ };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Actualiza el estado del Visitante a Proyecto
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public bool actualizaEstadoVisitanteProyecto()
|
||||||
|
{
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
bool blnEjecutado = false;
|
||||||
|
|
||||||
|
if (objVisitanteProyectoEL.PK != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(this.buscarPorPK(objVisitanteProyectoEL.PK, Tablas.visitanteproyecto, operadorLogico.NONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CamposTabla = Concepto.ASTATE.ToString() + Tablas.visitanteproyecto.ToString();
|
||||||
|
|
||||||
|
this.ValoresCampos = new object[] { objVisitanteProyectoEL.ASTATE = false };
|
||||||
|
|
||||||
|
baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, arlCondiciones);
|
||||||
|
|
||||||
|
blnEjecutado = true;
|
||||||
|
|
||||||
|
return blnEjecutado;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lista todos los Proyectos asignados a un usuario visitante
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public DataSet getVisitanteProyectos(int fkUser, int fkRegion)
|
||||||
|
{
|
||||||
|
DataSet dsVisitante = new DataSet();
|
||||||
|
ArrayList arlCondiciones = new ArrayList();
|
||||||
|
|
||||||
|
if (objVisitanteProyectoEL.Usuario != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorUsuario(objVisitanteProyectoEL.Usuario, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (objVisitanteProyectoEL.Region != 0)
|
||||||
|
{
|
||||||
|
arlCondiciones.Add(buscarPorRegion(objVisitanteProyectoEL.Region, operadorLogico.AND));
|
||||||
|
}
|
||||||
|
|
||||||
|
NombreTabla = Vistas.v_visitanteproyecto.ToString();
|
||||||
|
|
||||||
|
dsVisitante = baseDAL.EjecutarConsulta(NombreTabla, CamposTabla, NombreConeccionBD, arlCondiciones, null, null);
|
||||||
|
|
||||||
|
//string query;
|
||||||
|
|
||||||
|
//if (fkRegion == 0)
|
||||||
|
//{
|
||||||
|
// query = "SELECT l.PKVISITANTEPROYECTO, p.PKPROYECTO, p.NOMBREPROYECTO, i.ENCARGADOINFORMACIONGENERAL FROM t_agp_proyecto p JOIN t_sep_visitanteproyecto l ON p.PKPROYECTO = l.FKPROYECTO " +
|
||||||
|
// "JOIN dbo.t_igp_informaciongeneral i ON i.FKPROYECTO = p.PKPROYECTO WHERE l.FKUSUARIO = " + fkUser + "AND ASTATEVISITANTEPROYECTO = 1";
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// query = "SELECT l.PKVISITANTEPROYECTO, p.PKPROYECTO, p.NOMBREPROYECTO, i.ENCARGADOINFORMACIONGENERAL FROM t_agp_proyecto p " +
|
||||||
|
// "JOIN t_sep_visitanteproyecto l ON p.PKPROYECTO = l.FKPROYECTO JOIN dbo.t_igp_informaciongeneral i ON i.FKPROYECTO = p.PKPROYECTO " +
|
||||||
|
// "WHERE l.FKUSUARIO = " + fkUser + " AND ASTATEVISITANTEPROYECTO = 1 AND i.FKREGION = " + fkRegion;
|
||||||
|
//}
|
||||||
|
//DataSet dsProyecto = baseDAL.ejecutarConsulta(query, arlCondiciones, this.NombreConeccionBD);
|
||||||
|
|
||||||
|
return dsVisitante;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Condiciones de Busqueda
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorUsuario(int p_intUsuario, operadorLogico logOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Constraints.FK.ToString() + Tablas.usuario.ToString();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.valorDerecho = p_intUsuario;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected CondicionDAL buscarPorRegion(int p_intRegion, operadorLogico logOp)
|
||||||
|
{
|
||||||
|
CondicionDAL cdlCondicion = new CondicionDAL();
|
||||||
|
cdlCondicion.valorIzquierdo = Constraints.FK.ToString() + Tablas.region.ToString();
|
||||||
|
cdlCondicion.operadorGeneral = operadorGeneral.EQUAL;
|
||||||
|
cdlCondicion.operadorLogico = logOp;
|
||||||
|
cdlCondicion.valorDerecho = p_intRegion;
|
||||||
|
return cdlCondicion;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
2014
AYA.FROPI/AyABL/Scripts/bootstrap.js
vendored
Normal file
2014
AYA.FROPI/AyABL/Scripts/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
635
AYA.FROPI/AyABL/enumsBL.cs
Normal file
635
AYA.FROPI/AyABL/enumsBL.cs
Normal file
|
|
@ -0,0 +1,635 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyABL
|
||||||
|
{
|
||||||
|
// Bases de datos usadas en el sistema
|
||||||
|
#region Bases de Datos
|
||||||
|
|
||||||
|
// Esta base de datos debe estar agregada en el webconfig
|
||||||
|
public enum BASESDEDATOS
|
||||||
|
{
|
||||||
|
FOPI
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Módulos del sistema
|
||||||
|
#region Módulos
|
||||||
|
|
||||||
|
public enum Modulos
|
||||||
|
{
|
||||||
|
t_seg_,
|
||||||
|
t_adm_,
|
||||||
|
t_agp_,
|
||||||
|
t_cvp_,
|
||||||
|
t_fnp_,
|
||||||
|
t_ple_,
|
||||||
|
t_ppp_,
|
||||||
|
t_rhp_,
|
||||||
|
t_evp_,
|
||||||
|
t_icp_,
|
||||||
|
t_igp_,
|
||||||
|
t_sep_,
|
||||||
|
t_cip_
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Tablas de la base de datos
|
||||||
|
#region Tablas
|
||||||
|
|
||||||
|
public enum Tablas
|
||||||
|
{
|
||||||
|
//Modulo Administración
|
||||||
|
catalogo,
|
||||||
|
dependencia,
|
||||||
|
estado,
|
||||||
|
complejidad,
|
||||||
|
programa,
|
||||||
|
fuentefinanciamiento,
|
||||||
|
partidapresupuestaria,
|
||||||
|
procedenciacentrogestor,
|
||||||
|
recurso,
|
||||||
|
region,
|
||||||
|
tiporecursohumano,
|
||||||
|
ubicacion,
|
||||||
|
|
||||||
|
//Modulo Aspectos Generales
|
||||||
|
objetivoespecifico,
|
||||||
|
proyecto,
|
||||||
|
resultado,
|
||||||
|
|
||||||
|
//Modulo Ciclo de Vida
|
||||||
|
ciclovida,
|
||||||
|
etapa,
|
||||||
|
respuestaetapa,
|
||||||
|
|
||||||
|
//Modulo Evaluacion
|
||||||
|
analisisambiental,
|
||||||
|
analisisriesgo,
|
||||||
|
aprobacionvap,
|
||||||
|
evaluacionfinanciera,
|
||||||
|
evaluacionsocial,
|
||||||
|
evaluacioncostos,
|
||||||
|
|
||||||
|
//Modulo Financiamiento
|
||||||
|
endeudamiento,
|
||||||
|
financiamiento,
|
||||||
|
|
||||||
|
//Modulo Informacion
|
||||||
|
informacion,
|
||||||
|
observacion,
|
||||||
|
|
||||||
|
//Modulo Informacion General
|
||||||
|
centrogestor,
|
||||||
|
informaciongeneral,
|
||||||
|
relacionplanestrategico,
|
||||||
|
tipocambio,
|
||||||
|
|
||||||
|
//Modulo Plan Estrategico
|
||||||
|
objetivo,
|
||||||
|
perspectiva,
|
||||||
|
planestrategico,
|
||||||
|
temaestrategico,
|
||||||
|
|
||||||
|
//Modulo Partidas Presupuestarias
|
||||||
|
distribucionpartida,
|
||||||
|
|
||||||
|
//Modulo Recurso Humano
|
||||||
|
requerimientorecurso,
|
||||||
|
|
||||||
|
//Modulo Seguridad
|
||||||
|
bitacora,
|
||||||
|
comando,
|
||||||
|
menu,
|
||||||
|
menucomando,
|
||||||
|
rol,
|
||||||
|
rolmenucomando,
|
||||||
|
usuario,
|
||||||
|
|
||||||
|
//Modulo Seguimiento Ejecución Proyecto
|
||||||
|
indicadorproyecto,
|
||||||
|
liderproyecto,
|
||||||
|
periodopublicacion,
|
||||||
|
visitanteproyecto,
|
||||||
|
|
||||||
|
//Modulo Cierre Proyecto
|
||||||
|
cierre,
|
||||||
|
leccion,
|
||||||
|
comentario
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Reflejo de los campos que tiene cada tabla en la base de datos (salvo los definidos en la región de Campos Standart)
|
||||||
|
#region Diseño Tablas
|
||||||
|
|
||||||
|
//******************************** INICIO DE MODULO ADMINISTRACION **********************************************
|
||||||
|
|
||||||
|
public enum t_adm_catalogo
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_adm_dependencia
|
||||||
|
{
|
||||||
|
CODIGOACCESO
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_adm_fuentefinanciamiento
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_adm_partidapresupuestaria
|
||||||
|
{
|
||||||
|
INDICE
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_adm_procedenciacentrogestor
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public enum t_adm_recurso
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_adm_region
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_adm_tiporecursohumano
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//******************************** FIN DE MODULO ADMINISTRACION *************************************************
|
||||||
|
|
||||||
|
//****************************** INICIO DE MODULO ASPECTOS GENERALES ********************************************
|
||||||
|
public enum t_agp_objetivoespecifico
|
||||||
|
{
|
||||||
|
NUMERO,
|
||||||
|
CUMPLIDO
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_agp_proyecto
|
||||||
|
{
|
||||||
|
NUMEROBPIP,
|
||||||
|
ENCARGADO,
|
||||||
|
PATROCINADOR,
|
||||||
|
LIDER,
|
||||||
|
INICIO,
|
||||||
|
FIN,
|
||||||
|
NUMEROACCIONESTRATEGICA,
|
||||||
|
METAACCIONESTRATEGICA,
|
||||||
|
BENEFICIARIODIRECTO,
|
||||||
|
BENEFICIARIOINDIRECTO,
|
||||||
|
METAINSTITUCIONAL,
|
||||||
|
MONEDATIPOCAMBIO,
|
||||||
|
OBJETIVOGENERAL,
|
||||||
|
CODIGOACCESO,
|
||||||
|
VISTOBUENOOFICINA,
|
||||||
|
VISTOBUENOSUBGERENCIA,
|
||||||
|
VISTOBUENOPLANIFICACION,
|
||||||
|
PUBLICARWEB,
|
||||||
|
SECTOR,
|
||||||
|
AREATEMATICA,
|
||||||
|
AREAINFLUENCIA,
|
||||||
|
CATEGORIA,
|
||||||
|
PROVINCIA,
|
||||||
|
CANTON,
|
||||||
|
DISTRITO,
|
||||||
|
REGIONAYA,
|
||||||
|
REGION,
|
||||||
|
PRIORIDAD,
|
||||||
|
COSTOTOTAL,
|
||||||
|
COSTOESTIMADO
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_agp_resultado
|
||||||
|
{
|
||||||
|
NUMERO
|
||||||
|
}
|
||||||
|
|
||||||
|
//******************************** FIN DE MODULO ASPECTOS GENERALES *********************************************
|
||||||
|
|
||||||
|
//********************************** INICIO DE MODULO CICLO VIDA ************************************************
|
||||||
|
|
||||||
|
public enum t_cvp_ciclovida
|
||||||
|
{
|
||||||
|
PORCENTAJE,//CAMBIO REALIZADO POR ALEJANDRO ALVARADO
|
||||||
|
MONTO,
|
||||||
|
FECHAETAPAANTERIOR,
|
||||||
|
FECHAAPROBACION,
|
||||||
|
ETAPAACTUAL,
|
||||||
|
ETAPAANTERIOR,
|
||||||
|
FASEEJECUCION,
|
||||||
|
ESTUDIOFACTIBILIDAD,
|
||||||
|
EJECUTAPROYECTO
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_cvp_etapa
|
||||||
|
{
|
||||||
|
FECHAINICIO,
|
||||||
|
FECHAFIN,
|
||||||
|
ETAPA,//CAMBIO REALIZADO POR ALEJANDRO ALVARADO
|
||||||
|
SITUACIONACTUAL,
|
||||||
|
CICLOVIDA//CAMBIO REALIZADO POR ALEJANDRO ALVARADO
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_cvp_respuestaetapa
|
||||||
|
{
|
||||||
|
OTRO
|
||||||
|
}
|
||||||
|
|
||||||
|
//*********************************** FIN DE MODULO CICLO VIDA **************************************************
|
||||||
|
|
||||||
|
//********************************* INICIO DE MODULO EVALUACION *************************************************
|
||||||
|
|
||||||
|
public enum t_evp_analisisambiental
|
||||||
|
{
|
||||||
|
VIABILIDAD,
|
||||||
|
FECHAAPROBACION,
|
||||||
|
VAPINICIO,
|
||||||
|
VAPFINAL,
|
||||||
|
PORCENTAJEMITIGACION
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_evp_analisisriesgo
|
||||||
|
{
|
||||||
|
NUMEROPLANO,
|
||||||
|
PORCENTAJEREDUCCION
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_evp_aprobacionvap
|
||||||
|
{
|
||||||
|
FECHAVAP
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_evp_evaluacion
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_evp_evaluacionfinanciera
|
||||||
|
{
|
||||||
|
TREMA,
|
||||||
|
VANE,
|
||||||
|
TIRE,
|
||||||
|
RBC
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_evp_evaluacionsocial
|
||||||
|
{
|
||||||
|
VANE,
|
||||||
|
TIRE,
|
||||||
|
RCE,
|
||||||
|
TSD,
|
||||||
|
RBC
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_evp_evaluacioncostos
|
||||||
|
{
|
||||||
|
TSD,
|
||||||
|
VAC,
|
||||||
|
CAE
|
||||||
|
}
|
||||||
|
|
||||||
|
//************************************ FIN DE MODULO EVALUACION *************************************************
|
||||||
|
|
||||||
|
//******************************** INICIO DE MODULO FINANCIAMIENTO **********************************************
|
||||||
|
|
||||||
|
public enum t_fnp_endeudamiento
|
||||||
|
{
|
||||||
|
MONTO,
|
||||||
|
PERIODOGRACIA,
|
||||||
|
PLAZO,
|
||||||
|
DESEMBOLSOINICIO,
|
||||||
|
DESEMBOLSOFIN,
|
||||||
|
TIPOCAMBIOCONTRATO,
|
||||||
|
FECHACONTRATO,
|
||||||
|
SITUACIONACTUAL,
|
||||||
|
TASA
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_fnp_financiamiento
|
||||||
|
{
|
||||||
|
ANIO,
|
||||||
|
MONTO,
|
||||||
|
TIPO,
|
||||||
|
TIPORECURSO
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//******************************** FIN DE MODULO FINANCIAMIENTO *************************************************
|
||||||
|
|
||||||
|
//******************************** INICIO DE MODULO INFORMACION COMPLEMENTARIA*************************************************
|
||||||
|
|
||||||
|
public enum t_icp_informacion
|
||||||
|
{
|
||||||
|
IMPORTANCIA,
|
||||||
|
PROBLEMA,
|
||||||
|
MEDIDA,
|
||||||
|
PROYECTOVINCULADO,
|
||||||
|
OTRASENTIDADES
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_icp_observacion
|
||||||
|
{
|
||||||
|
FECHAINGRESO
|
||||||
|
}
|
||||||
|
|
||||||
|
//*********************************** FIN DE MODULO INFORMACION COMPLEMENTARIA*************************************************
|
||||||
|
|
||||||
|
//******************************** INICIO DE MODULO INFORMACION GENERAL*************************************************
|
||||||
|
|
||||||
|
public enum t_agp_centrogestor
|
||||||
|
{
|
||||||
|
PREINVERSION,
|
||||||
|
EJECUCION
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_igp_informaciongeneral
|
||||||
|
{
|
||||||
|
ENCARGADO,
|
||||||
|
PROVINCIA
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_igp_relacionplanestrategico
|
||||||
|
{
|
||||||
|
CONTRIBUCION
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_agp_tipocambio
|
||||||
|
{
|
||||||
|
MONEDA,
|
||||||
|
ANIO,
|
||||||
|
MONTO
|
||||||
|
}
|
||||||
|
|
||||||
|
//*********************************** FIN DE MODULO INFORMACION GENERAL*************************************************
|
||||||
|
|
||||||
|
//*********************************** INICIO DE MODULO PLAN ESTRATEGICO ************************************************
|
||||||
|
|
||||||
|
public enum t_ple_objetivo
|
||||||
|
{
|
||||||
|
NUMERO,
|
||||||
|
META
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_ple_perspectiva
|
||||||
|
{
|
||||||
|
CODIGO
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_ple_planestrategico
|
||||||
|
{
|
||||||
|
ANIOINICIO,
|
||||||
|
ANIOFIN
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_ple_temaestrategico
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//***************************************** FIN DE MODULO PLAN ESTRATEGICO ********************************************
|
||||||
|
|
||||||
|
//*************************** INICIO DE MODULO PARTIDAS PRESUPUESTARIAS *****************************************
|
||||||
|
|
||||||
|
public enum t_ppp_distribucionpartida
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//******************************** FIN DE MODULO PARTIDAS PRESUPUESTARIAS ***************************************
|
||||||
|
|
||||||
|
//******************************** INICIO DE MODULO RECURSO HUMANO **********************************************
|
||||||
|
public enum t_rhp_requerimientorecurso
|
||||||
|
{
|
||||||
|
CANTIDADAP,
|
||||||
|
CANTIDADECP,
|
||||||
|
CANTIDADPPP
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//******************************** FIN DE MODULO RECURSO HUMANO *************************************************
|
||||||
|
|
||||||
|
//******************************** INICIO DE MODULO SEGURIDAD ***************************************************
|
||||||
|
|
||||||
|
public enum t_seg_bitacora
|
||||||
|
{
|
||||||
|
LOGIN,
|
||||||
|
ACCION,
|
||||||
|
REGISTRO,
|
||||||
|
PAGINA
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_seg_comando
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_seg_menu
|
||||||
|
{
|
||||||
|
ORDEN,
|
||||||
|
ETIQUETA,
|
||||||
|
URL,
|
||||||
|
PAGINA
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_seg_menucomando
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_seg_rol
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_seg_rolmenucomando
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_seg_usuario
|
||||||
|
{
|
||||||
|
LOGIN,
|
||||||
|
CEDULA,
|
||||||
|
CORREO,
|
||||||
|
ACTIVO
|
||||||
|
}
|
||||||
|
|
||||||
|
//*********************************** FIN DE MODULO SEGURIDAD *************************************************
|
||||||
|
|
||||||
|
//************************** INICIO DE MODULO SEGUIMIENTO EJECUCIÓN PROYECTO **********************************
|
||||||
|
|
||||||
|
public enum t_sep_indicadorproyecto
|
||||||
|
{
|
||||||
|
AP,
|
||||||
|
CPTP,
|
||||||
|
CPTR,
|
||||||
|
CRTR,
|
||||||
|
VC,
|
||||||
|
VP,
|
||||||
|
IRC,
|
||||||
|
IRP,
|
||||||
|
IC,
|
||||||
|
FECHACIERRE,
|
||||||
|
USUARIOCREA
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_sep_liderproyecto
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_sep_periodopublicacion
|
||||||
|
{
|
||||||
|
FECHACIERRE,
|
||||||
|
FECHAINICIO
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_sep_visitanteproyecto
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//************************** FIN DE MODULO SEGUIMIENTO EJECUCIÓN PROYECTO **********************************
|
||||||
|
|
||||||
|
|
||||||
|
//************************** INICIO DE MODULO CIERRE PROYECTO **********************************************
|
||||||
|
public enum t_cip_cierre
|
||||||
|
{
|
||||||
|
DOCUMENTOPREINVERSION,
|
||||||
|
DOCUMENTOFINANCIAMIENTO,
|
||||||
|
DOCUMENTOINVERSION,
|
||||||
|
FECHAINICIO,
|
||||||
|
FECHAENTREGA,
|
||||||
|
FECHAFINALIZACION,
|
||||||
|
FECHACAPITALIZACION,
|
||||||
|
MONTOCAPITALIZACION
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_cip_leccion
|
||||||
|
{
|
||||||
|
EVENTO,
|
||||||
|
DESCRIPCION
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum t_cip_comentario
|
||||||
|
{
|
||||||
|
FECHAINGRESO,
|
||||||
|
COMENTARIO
|
||||||
|
}
|
||||||
|
|
||||||
|
//***************************** FIN DE MODULO CIERRE PROYECTO **********************************************
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Vistas de la base de datos
|
||||||
|
#region Vistas
|
||||||
|
|
||||||
|
public enum Vistas
|
||||||
|
{
|
||||||
|
v_informacionusuario, //Se utliza para desplegar la información del usuario
|
||||||
|
v_menuconsulta, //Se utiliza para cargar el menu de la aplicación
|
||||||
|
v_comandosxmenuxrol,
|
||||||
|
v_etapasproyecto,
|
||||||
|
v_detallefinanciamiento,
|
||||||
|
v_endeudamiento,
|
||||||
|
v_detalledistribucionpartida,
|
||||||
|
v_fichaproyecto,
|
||||||
|
v_fichaciclovida,
|
||||||
|
v_informaciongeneral,
|
||||||
|
v_relacionplanestrategico,
|
||||||
|
v_centrogestor,
|
||||||
|
v_liderproyecto,
|
||||||
|
v_visitanteproyecto,
|
||||||
|
v_otrosdatos, //Se utiliza en el cierre para obtener los datos del proyecto
|
||||||
|
v_evaluacion,
|
||||||
|
v_ubicacion
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Funciones programadas en la base de datos
|
||||||
|
#region Funciones
|
||||||
|
|
||||||
|
public enum Funciones
|
||||||
|
{
|
||||||
|
f_config_tema_actual
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Procedimientos almacenados de la base de datos
|
||||||
|
#region Procedimientos Almacenados
|
||||||
|
|
||||||
|
public enum Procedimiento
|
||||||
|
{
|
||||||
|
PA_EJECUTARTRANSACT,
|
||||||
|
PA_FINANCIAMIENTOPIVOT,
|
||||||
|
PA_PARTIDASPIVOT,
|
||||||
|
PA_TOTALESFINANCIAMIENTO,
|
||||||
|
PA_TOTALESPARTIDAS
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Campos para definir tanto el PK, FK o los campos de auditoria
|
||||||
|
#region Campos Standart
|
||||||
|
|
||||||
|
public enum Constraints
|
||||||
|
{
|
||||||
|
PK,
|
||||||
|
FK
|
||||||
|
}
|
||||||
|
|
||||||
|
//Campos que se repiten
|
||||||
|
public enum Concepto
|
||||||
|
{
|
||||||
|
NOMBRE,
|
||||||
|
PADRE,
|
||||||
|
PORCENTAJE,
|
||||||
|
DESCRIPCION,
|
||||||
|
FECHA,
|
||||||
|
ACTIVO,
|
||||||
|
ANIO,
|
||||||
|
MONTO,
|
||||||
|
ASTATE
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Mensajes
|
||||||
|
|
||||||
|
public enum TiposDeMensaje
|
||||||
|
{
|
||||||
|
ERROR,
|
||||||
|
INFORMATIVO,
|
||||||
|
ALERTA
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum TiposDeToolTip
|
||||||
|
{
|
||||||
|
ERROR,
|
||||||
|
INFORMATIVO,
|
||||||
|
ALERTA,
|
||||||
|
DUDA
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
91
AYA.FROPI/AyADAL/AyADAL.csproj
Normal file
91
AYA.FROPI/AyADAL/AyADAL.csproj
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{B93DD461-70F2-4882-B02F-D511739CEA14}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>AyADAL</RootNamespace>
|
||||||
|
<AssemblyName>AyADAL</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<SccProjectName>SAK</SccProjectName>
|
||||||
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
|
<SccAuxPath>SAK</SccAuxPath>
|
||||||
|
<SccProvider>SAK</SccProvider>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="AjaxControlToolkit, Version=16.1.1.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\Base\packages\AjaxControlToolkit.16.1.1.0\lib\net40\AjaxControlToolkit.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=e44a2bc38ed2c13c, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>C:\Users\egutierrez\Desktop\Microsoft.Practices\Microsoft.Practices.EnterpriseLibrary.Common.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Practices.EnterpriseLibrary.Data, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>bin\Debug\Microsoft.Practices.EnterpriseLibrary.Data.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\Base\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.Common.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.ReportViewer.ProcessingObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\Base\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.ProcessingObjectModel.DLL</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\Base\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.WebForms.DLL</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Web" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="BaseDAL.cs" />
|
||||||
|
<Compile Include="CondicionDAL.cs" />
|
||||||
|
<Compile Include="EnumsDAL.cs" />
|
||||||
|
<Compile Include="FuncionesBLAggDAL.cs" />
|
||||||
|
<Compile Include="JoinDAL.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="TransaccionDAL.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
1585
AYA.FROPI/AyADAL/BaseDAL.cs
Normal file
1585
AYA.FROPI/AyADAL/BaseDAL.cs
Normal file
File diff suppressed because it is too large
Load diff
93
AYA.FROPI/AyADAL/CondicionDAL.cs
Normal file
93
AYA.FROPI/AyADAL/CondicionDAL.cs
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyADAL
|
||||||
|
{
|
||||||
|
public class CondicionDAL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
//private string _cmpLeftSideName;
|
||||||
|
//private string _cmpRightSideName;
|
||||||
|
//private string _cmpLeftSideValue;
|
||||||
|
//private object _cmpRightSideValue;
|
||||||
|
//private operadorGeneral _gopOperator;
|
||||||
|
//private operadorLogico _lopOperator;
|
||||||
|
//private bool _blnSetLeftParenthesis;
|
||||||
|
//private bool _blnSetRightParenthesis;
|
||||||
|
//private bool _blnIsNested;
|
||||||
|
//private bool _blnIsToJoin;
|
||||||
|
//private bool _blnRightSideIsDataField;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Propiedades
|
||||||
|
|
||||||
|
public string nombreCampoIzquierdo
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public string nombreCampoDerecho
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public string valorIzquierdo
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object valorDerecho
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public operadorGeneral operadorGeneral
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public operadorLogico operadorLogico
|
||||||
|
{
|
||||||
|
get;// { return _lopOperator; }
|
||||||
|
set;// { _lopOperator = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool parentesisInicio
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public bool parentesisFinal
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public bool valorDerechoEsCampo
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
95
AYA.FROPI/AyADAL/EnumsDAL.cs
Normal file
95
AYA.FROPI/AyADAL/EnumsDAL.cs
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyADAL
|
||||||
|
{
|
||||||
|
#region Enums
|
||||||
|
|
||||||
|
public enum clausulaGeneral
|
||||||
|
{
|
||||||
|
FROM,
|
||||||
|
WHERE
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum operadorGeneral
|
||||||
|
{
|
||||||
|
NONE,
|
||||||
|
EQUAL,
|
||||||
|
UNEQUAL,
|
||||||
|
BIGGERTHAN,
|
||||||
|
SMALLERTHAN,
|
||||||
|
BIGGEREQUALTHAN,
|
||||||
|
SMALLEREQUALTHAN,
|
||||||
|
IS,
|
||||||
|
ISNOT,
|
||||||
|
IN,
|
||||||
|
NOTIN,
|
||||||
|
EXISTS,
|
||||||
|
NOTEXISTS,
|
||||||
|
BETWEEN,
|
||||||
|
LIKE,
|
||||||
|
LIKEALL
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum operadorLogico
|
||||||
|
{
|
||||||
|
NONE,
|
||||||
|
AND,
|
||||||
|
OR
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum clausulasDML
|
||||||
|
{
|
||||||
|
SELECT,
|
||||||
|
INSERT,
|
||||||
|
UPDATE,
|
||||||
|
DELETE
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum funcionesTLAgg
|
||||||
|
{
|
||||||
|
NONE,
|
||||||
|
ASTERISK,
|
||||||
|
DISTINCT,
|
||||||
|
TOP,
|
||||||
|
MAX,
|
||||||
|
COUNT,
|
||||||
|
SUM,
|
||||||
|
IDENT_CURRENT
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum funcionesBLAgg
|
||||||
|
{
|
||||||
|
NONE,
|
||||||
|
ORDERBY,
|
||||||
|
GROUPBY,
|
||||||
|
LIMIT
|
||||||
|
}
|
||||||
|
|
||||||
|
//public enum clausulasJoin
|
||||||
|
//{
|
||||||
|
// NONE,
|
||||||
|
// JOIN,
|
||||||
|
// RIGHTJOIN,
|
||||||
|
// LEFTJOIN,
|
||||||
|
// INNERRIGHTJOIN,
|
||||||
|
// INNERLEFTJOIN,
|
||||||
|
// OUTERRIGHTJOIN,
|
||||||
|
// OUTERLEFTJOIN,
|
||||||
|
// OUTERJOIN,
|
||||||
|
// INNERJOIN,
|
||||||
|
// UNION
|
||||||
|
//}
|
||||||
|
|
||||||
|
public enum operadoresJoin
|
||||||
|
{
|
||||||
|
NONE,
|
||||||
|
ON,
|
||||||
|
USING
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
32
AYA.FROPI/AyADAL/FuncionesBLAggDAL.cs
Normal file
32
AYA.FROPI/AyADAL/FuncionesBLAggDAL.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyADAL
|
||||||
|
{
|
||||||
|
public class FuncionesBLAggDAL
|
||||||
|
{
|
||||||
|
public static string OrderByASC(string p_strCampo)
|
||||||
|
{
|
||||||
|
return " ORDER BY " + p_strCampo + " ASC";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string OrderByDESC(string p_strCampo)
|
||||||
|
{
|
||||||
|
return " ORDER BY " + p_strCampo + " DESC";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string OrderBy(string p_strCampo)
|
||||||
|
{
|
||||||
|
return " ORDER BY " + p_strCampo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Limit(int intInfLimit, int intSupLimit)
|
||||||
|
{
|
||||||
|
return " LIMIT " + intInfLimit + ", " + intSupLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GroupBy(string p_strCampo)
|
||||||
|
{
|
||||||
|
return " GROUP BY " + p_strCampo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
103
AYA.FROPI/AyADAL/JoinDAL.cs
Normal file
103
AYA.FROPI/AyADAL/JoinDAL.cs
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyADAL
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// JoinDL Class.
|
||||||
|
/// Representa una función TL Agregado de una instrucción SQL
|
||||||
|
/// </summary>
|
||||||
|
public class JoinDAL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructores
|
||||||
|
|
||||||
|
//public JoinDL()
|
||||||
|
//{
|
||||||
|
|
||||||
|
|
||||||
|
// tablaIzquierda = "";
|
||||||
|
// clausulaJoin = clausulasJoin.NONE;
|
||||||
|
// operadorJoin = operadoresJoin.NONE;
|
||||||
|
// Campos = "";
|
||||||
|
//}
|
||||||
|
|
||||||
|
//public JoinDL(string p_strTablaIzquierda, clausulasJoin p_cljClausulaJoin, operadoresJoin p_opjOperadorJoin,
|
||||||
|
// bool p_blnEsCrossJoin, string p_strCampos)
|
||||||
|
//{
|
||||||
|
// tablaIzquierda = p_strTablaIzquierda;
|
||||||
|
// clausulaJoin = p_cljClausulaJoin;
|
||||||
|
// operadorJoin = p_opjOperadorJoin;
|
||||||
|
// esCrossJoin = p_blnEsCrossJoin;
|
||||||
|
// Campos = p_strCampos;
|
||||||
|
//}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
|
//public string tablaIzquierda
|
||||||
|
//{
|
||||||
|
// get;
|
||||||
|
// set;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//public string tablaDerecha
|
||||||
|
//{
|
||||||
|
// get;
|
||||||
|
// set;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////public clausulasJoin clausulaJoin
|
||||||
|
////{
|
||||||
|
//// get;
|
||||||
|
//// set;
|
||||||
|
////}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//public operadoresJoin operadorJoin
|
||||||
|
//{
|
||||||
|
// get;
|
||||||
|
// set;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//public bool esCrossJoin
|
||||||
|
//{
|
||||||
|
// get;
|
||||||
|
// set;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//public string Campos
|
||||||
|
//{
|
||||||
|
// get;
|
||||||
|
// set;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//public CondicionDL Condicion
|
||||||
|
//{
|
||||||
|
// get;
|
||||||
|
// set;
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
36
AYA.FROPI/AyADAL/Properties/AssemblyInfo.cs
Normal file
36
AYA.FROPI/AyADAL/Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// La información general sobre un ensamblado se controla mediante el siguiente
|
||||||
|
// conjunto de atributos. Cambie estos atributos para modificar la información
|
||||||
|
// asociada con un ensamblado.
|
||||||
|
[assembly: AssemblyTitle("AyADAL")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("AyADAL")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Si establece ComVisible como false, los tipos de este ensamblado no estarán visibles
|
||||||
|
// para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde
|
||||||
|
// COM, establezca el atributo ComVisible como true en este tipo.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// El siguiente GUID sirve como identificador de typelib si este proyecto se expone a COM
|
||||||
|
[assembly: Guid("e4f74cf4-66e9-4ba7-b83b-9f29d40f0f3d")]
|
||||||
|
|
||||||
|
// La información de versión de un ensamblado consta de los cuatro valores siguientes:
|
||||||
|
//
|
||||||
|
// Versión principal
|
||||||
|
// Versión secundaria
|
||||||
|
// Número de compilación
|
||||||
|
// Revisión
|
||||||
|
//
|
||||||
|
// Puede especificar todos los valores o establecer como predeterminados los números de compilación y de revisión
|
||||||
|
// mediante el carácter '*', como se muestra a continuación:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
95
AYA.FROPI/AyADAL/TransaccionDAL.cs
Normal file
95
AYA.FROPI/AyADAL/TransaccionDAL.cs
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.Practices.EnterpriseLibrary.Common;
|
||||||
|
using Microsoft.Practices.EnterpriseLibrary.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
|
namespace AyADAL
|
||||||
|
{
|
||||||
|
public class TransaccionDAL
|
||||||
|
{
|
||||||
|
#region Attributes
|
||||||
|
|
||||||
|
private DbTransaction dbTransaction;
|
||||||
|
private DbConnection dbConnection;
|
||||||
|
private Database db;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
|
|
||||||
|
public TransaccionDAL(string strConexString)
|
||||||
|
{
|
||||||
|
DatabaseProviderFactory factory = new DatabaseProviderFactory();
|
||||||
|
this.db = factory.Create(strConexString);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
|
public DbTransaction Transaction
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.dbTransaction;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.dbTransaction = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Database DB
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.db;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public DbConnection Connection
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.dbConnection;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Custom Methods
|
||||||
|
|
||||||
|
public void BeginTransaction()
|
||||||
|
{
|
||||||
|
this.dbConnection = db.CreateConnection();
|
||||||
|
this.dbConnection.Open();
|
||||||
|
this.Transaction = dbConnection.BeginTransaction();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RollBackTransaction()
|
||||||
|
{
|
||||||
|
this.dbTransaction.Rollback();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CommitTransaction()
|
||||||
|
{
|
||||||
|
this.dbConnection = dbTransaction.Connection;
|
||||||
|
this.dbTransaction.Commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CloseConnection()
|
||||||
|
{
|
||||||
|
if (this.dbConnection.State == ConnectionState.Open)
|
||||||
|
this.dbConnection.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
7
AYA.FROPI/AyADAL/packages.config
Normal file
7
AYA.FROPI/AyADAL/packages.config
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="AjaxControlToolkit" version="16.1.1.0" targetFramework="net45" />
|
||||||
|
<package id="bootstrap" version="3.3.7" targetFramework="net45" />
|
||||||
|
<package id="jQuery" version="1.9.1" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.Report.Viewer" version="11.0.0.0" targetFramework="net45" />
|
||||||
|
</packages>
|
||||||
12
AYA.FROPI/AyAEL/ADM/CatalogoEL.cs
Normal file
12
AYA.FROPI/AyAEL/ADM/CatalogoEL.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class CatalogoEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
13
AYA.FROPI/AyAEL/ADM/ComplejidadEL.cs
Normal file
13
AYA.FROPI/AyAEL/ADM/ComplejidadEL.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class ComplejidadEL: AyAEL
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
12
AYA.FROPI/AyAEL/ADM/DependenciaEL.cs
Normal file
12
AYA.FROPI/AyAEL/ADM/DependenciaEL.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class DependenciaEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
13
AYA.FROPI/AyAEL/ADM/EstadoEL.cs
Normal file
13
AYA.FROPI/AyAEL/ADM/EstadoEL.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class EstadoEL : AyAEL
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
AYA.FROPI/AyAEL/ADM/FuenteFinanciamientoEL.cs
Normal file
11
AYA.FROPI/AyAEL/ADM/FuenteFinanciamientoEL.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class FuenteFinanciamientoEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
13
AYA.FROPI/AyAEL/ADM/PartidaPresupuestariaEL.cs
Normal file
13
AYA.FROPI/AyAEL/ADM/PartidaPresupuestariaEL.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class PartidaPresupuestariaEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public int Indice { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
11
AYA.FROPI/AyAEL/ADM/ProcedenciaCentrogestorEL.cs
Normal file
11
AYA.FROPI/AyAEL/ADM/ProcedenciaCentrogestorEL.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class ProcedenciaCentrogestorEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
12
AYA.FROPI/AyAEL/ADM/ProgramaEL.cs
Normal file
12
AYA.FROPI/AyAEL/ADM/ProgramaEL.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class ProgramaEL : AyAEL
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
12
AYA.FROPI/AyAEL/ADM/RecursoEL.cs
Normal file
12
AYA.FROPI/AyAEL/ADM/RecursoEL.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class RecursoEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
11
AYA.FROPI/AyAEL/ADM/RegionEL.cs
Normal file
11
AYA.FROPI/AyAEL/ADM/RegionEL.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class RegionEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
11
AYA.FROPI/AyAEL/ADM/TipoRecursoHumanoEL.cs
Normal file
11
AYA.FROPI/AyAEL/ADM/TipoRecursoHumanoEL.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class TipoRecursoHumanoEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
13
AYA.FROPI/AyAEL/ADM/UbicacionEL.cs
Normal file
13
AYA.FROPI/AyAEL/ADM/UbicacionEL.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
namespace AyAEL.ADM
|
||||||
|
{
|
||||||
|
public class UbicacionEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
public int FKUBICACIONBARRIO { get; set; }
|
||||||
|
public int FKUBICACIONDISTRITO { get; set; }
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
17
AYA.FROPI/AyAEL/AGP/ObjetivoEspecificoEL.cs
Normal file
17
AYA.FROPI/AyAEL/AGP/ObjetivoEspecificoEL.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.AGP
|
||||||
|
{
|
||||||
|
public class ObjetivoEspecificoEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public int Numero { get; set; }
|
||||||
|
|
||||||
|
public bool Cumplido { get; set; }
|
||||||
|
|
||||||
|
public int Proyecto { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
62
AYA.FROPI/AyAEL/AGP/ProyectoEL.cs
Normal file
62
AYA.FROPI/AyAEL/AGP/ProyectoEL.cs
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.AGP
|
||||||
|
{
|
||||||
|
public class ProyectoEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public string NumeroBPIP { get; set; }
|
||||||
|
public string NumeroAccionEstrategica { get; set; }
|
||||||
|
|
||||||
|
public string MetaAccionEstrategica { get; set; }
|
||||||
|
|
||||||
|
public string BeneficiarioDirecto { get; set; }
|
||||||
|
|
||||||
|
public string BeneficiarioIndirecto { get; set; }
|
||||||
|
|
||||||
|
public string MetaInstitucional { get; set; }
|
||||||
|
|
||||||
|
public string MonedaTipoCambio { get; set; }
|
||||||
|
|
||||||
|
public string ObjetivoGeneral { get; set; }
|
||||||
|
|
||||||
|
public string CodigoAcceso { get; set; }
|
||||||
|
|
||||||
|
public bool VistoBuenoOficina { get; set; }
|
||||||
|
|
||||||
|
public bool VistoBuenoSubGerencia { get; set; }
|
||||||
|
|
||||||
|
public bool VistoBuenoPlanificacion { get; set; }
|
||||||
|
|
||||||
|
public bool PUblicarWeb { get; set; }
|
||||||
|
|
||||||
|
public Nullable<int> Dependencia { get; set; }
|
||||||
|
|
||||||
|
public Nullable<int> Sector { get; set; }
|
||||||
|
|
||||||
|
public Nullable<int> AreaTematica { get; set; }
|
||||||
|
|
||||||
|
public Nullable<int> AreaInfluencia { get; set; }
|
||||||
|
|
||||||
|
public Nullable<int> Categoria { get; set; }
|
||||||
|
|
||||||
|
public Nullable<int> Provincia { get; set; }
|
||||||
|
|
||||||
|
public string Canton { get; set; }
|
||||||
|
|
||||||
|
public string Distrito { get; set; }
|
||||||
|
|
||||||
|
public Nullable<int> Region { get; set; }
|
||||||
|
|
||||||
|
public Nullable<int> Prioridad { get; set; }
|
||||||
|
public string Patrocinador { get; set; }
|
||||||
|
public string Lider { get; set; }
|
||||||
|
public decimal? TotalEstimado { get; set; }
|
||||||
|
public int? Estado { get; set; }
|
||||||
|
public int? Complejidad { get; set; }
|
||||||
|
public int? Programa { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
15
AYA.FROPI/AyAEL/AGP/ResultadoEL.cs
Normal file
15
AYA.FROPI/AyAEL/AGP/ResultadoEL.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.AGP
|
||||||
|
{
|
||||||
|
public class ResultadoEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public int Numero { get; set; }
|
||||||
|
|
||||||
|
public int Proyecto { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
31
AYA.FROPI/AyAEL/AyAEL.cs
Normal file
31
AYA.FROPI/AyAEL/AyAEL.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL
|
||||||
|
{
|
||||||
|
public class AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public Nullable<int> PK{ get; set; }
|
||||||
|
|
||||||
|
public Nullable<int> FK { get; set; }
|
||||||
|
|
||||||
|
public bool ASTATE { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
//******************************************************************************************
|
||||||
|
|
||||||
|
public string Nombre { get; set; }
|
||||||
|
|
||||||
|
public string Descripcion { get; set; }
|
||||||
|
|
||||||
|
public Nullable<DateTime> Fecha { get; set; }
|
||||||
|
|
||||||
|
public Nullable<int> Padre { get; set; }
|
||||||
|
|
||||||
|
public Nullable<bool> Activo { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
112
AYA.FROPI/AyAEL/AyAEL.csproj
Normal file
112
AYA.FROPI/AyAEL/AyAEL.csproj
Normal file
|
|
@ -0,0 +1,112 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{CE52F597-E6C2-45EC-BCDE-D9280BD14FEF}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>AyAEL</RootNamespace>
|
||||||
|
<AssemblyName>AyAEL</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<SccProjectName>SAK</SccProjectName>
|
||||||
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
|
<SccAuxPath>SAK</SccAuxPath>
|
||||||
|
<SccProvider>SAK</SccProvider>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="ADM\CatalogoEL.cs" />
|
||||||
|
<Compile Include="ADM\ComplejidadEL.cs" />
|
||||||
|
<Compile Include="ADM\DependenciaEL.cs" />
|
||||||
|
<Compile Include="ADM\EstadoEL.cs" />
|
||||||
|
<Compile Include="ADM\FuenteFinanciamientoEL.cs" />
|
||||||
|
<Compile Include="ADM\PartidaPresupuestariaEL.cs" />
|
||||||
|
<Compile Include="ADM\ProcedenciaCentrogestorEL.cs" />
|
||||||
|
<Compile Include="ADM\ProgramaEL.cs" />
|
||||||
|
<Compile Include="ADM\RecursoEL.cs" />
|
||||||
|
<Compile Include="ADM\RegionEL.cs" />
|
||||||
|
<Compile Include="ADM\TipoRecursoHumanoEL.cs" />
|
||||||
|
<Compile Include="ADM\UbicacionEL.cs" />
|
||||||
|
<Compile Include="CIP\ComentarioEL.cs" />
|
||||||
|
<Compile Include="CIP\LeccionEL.cs" />
|
||||||
|
<Compile Include="CIP\CierreEL.cs" />
|
||||||
|
<Compile Include="IGP\CentroGestorEL.cs" />
|
||||||
|
<Compile Include="AGP\ObjetivoEspecificoEL.cs" />
|
||||||
|
<Compile Include="AGP\ProyectoEL.cs" />
|
||||||
|
<Compile Include="AGP\ResultadoEL.cs" />
|
||||||
|
<Compile Include="IGP\RelacionPlanEstrategicoEL.cs" />
|
||||||
|
<Compile Include="IGP\TipoCambioEL.cs" />
|
||||||
|
<Compile Include="AyAEL.cs" />
|
||||||
|
<Compile Include="CVP\CicloVidaEL.cs" />
|
||||||
|
<Compile Include="CVP\EtapaEL.cs" />
|
||||||
|
<Compile Include="CVP\RespuestaEtapaEL.cs" />
|
||||||
|
<Compile Include="EVP\AprobacionVAPEL.cs" />
|
||||||
|
<Compile Include="EVP\EvaluacionCostosEL.cs" />
|
||||||
|
<Compile Include="EVP\EvaluacionFinancieraEL.cs" />
|
||||||
|
<Compile Include="EVP\AnalisisAmbientalEL.cs" />
|
||||||
|
<Compile Include="EVP\AnalisisRiesgoEL.cs" />
|
||||||
|
<Compile Include="EVP\EvaluacionSocialEL.cs" />
|
||||||
|
<Compile Include="FNP\EndeudamientoEL.cs" />
|
||||||
|
<Compile Include="FNP\FinanciamientoEL.cs" />
|
||||||
|
<Compile Include="ICP\InformacionEL.cs" />
|
||||||
|
<Compile Include="ICP\ObservacionEL.cs" />
|
||||||
|
<Compile Include="IGP\InformacionGeneralEL.cs" />
|
||||||
|
<Compile Include="PLE\ObjetivoEL.cs" />
|
||||||
|
<Compile Include="PLE\PerspectivaEL.cs" />
|
||||||
|
<Compile Include="PLE\PlanEstrategicoEL.cs" />
|
||||||
|
<Compile Include="PLE\TemaEstrategicoEL.cs" />
|
||||||
|
<Compile Include="PPP\DistribucionPartidaEL.cs" />
|
||||||
|
<Compile Include="RHP\RequerimientoRecursoEL.cs" />
|
||||||
|
<Compile Include="SEG\BitacoraEL.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="SEG\ComandoEL.cs" />
|
||||||
|
<Compile Include="SEG\MenuComandoEL.cs" />
|
||||||
|
<Compile Include="SEG\MenuEL.cs" />
|
||||||
|
<Compile Include="SEG\RolEL.cs" />
|
||||||
|
<Compile Include="SEG\RolMenuComandoEL.cs" />
|
||||||
|
<Compile Include="SEG\UsuarioEL.cs" />
|
||||||
|
<Compile Include="SEP\IndicadorProyectoEL.cs" />
|
||||||
|
<Compile Include="SEP\LiderProyectoEL.cs" />
|
||||||
|
<Compile Include="SEP\PeriodoPublicacionEL.cs" />
|
||||||
|
<Compile Include="SEP\VisitanteProyectoEL.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
30
AYA.FROPI/AyAEL/CIP/CierreEL.cs
Normal file
30
AYA.FROPI/AyAEL/CIP/CierreEL.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.CIP
|
||||||
|
{
|
||||||
|
public class CierreEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public string DocumentoPreInversion { get; set; }
|
||||||
|
|
||||||
|
public string DocumentoFinanciamiento { get; set; }
|
||||||
|
|
||||||
|
public string DocumentoInversion { get; set; }
|
||||||
|
|
||||||
|
public DateTime? FechaInicio { get; set; }
|
||||||
|
|
||||||
|
public DateTime? FechaEntrega { get; set; }
|
||||||
|
|
||||||
|
public DateTime? FechaFinalizacion { get; set; }
|
||||||
|
|
||||||
|
public DateTime? FechaCapitalizacion { get; set; }
|
||||||
|
|
||||||
|
public decimal MontoCapitalizacion { get; set; }
|
||||||
|
|
||||||
|
public int Proyecto { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
18
AYA.FROPI/AyAEL/CIP/ComentarioEL.cs
Normal file
18
AYA.FROPI/AyAEL/CIP/ComentarioEL.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.CIP
|
||||||
|
{
|
||||||
|
public class ComentarioEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public string Comentario { get; set; }
|
||||||
|
|
||||||
|
//Fecha campo heredado
|
||||||
|
|
||||||
|
public int Cierre { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
18
AYA.FROPI/AyAEL/CIP/LeccionEL.cs
Normal file
18
AYA.FROPI/AyAEL/CIP/LeccionEL.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.CIP
|
||||||
|
{
|
||||||
|
public class LeccionEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public string Evento { get; set; }
|
||||||
|
|
||||||
|
//Descripcion campo heredado
|
||||||
|
|
||||||
|
public int Cierre { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
31
AYA.FROPI/AyAEL/CVP/CicloVidaEL.cs
Normal file
31
AYA.FROPI/AyAEL/CVP/CicloVidaEL.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.CVP
|
||||||
|
{
|
||||||
|
public class CicloVidaEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public decimal Porcentaje { get; set; }
|
||||||
|
|
||||||
|
public decimal Monto { get; set; }
|
||||||
|
|
||||||
|
public DateTime FechaEtapaAnterior { get; set; }
|
||||||
|
|
||||||
|
public DateTime FechaAprobacion { get; set; }
|
||||||
|
|
||||||
|
public int EtapaActual { get; set; }
|
||||||
|
|
||||||
|
public int EtapaAnterior { get; set; }
|
||||||
|
|
||||||
|
public int FaseEjecucion { get; set; }
|
||||||
|
|
||||||
|
public int EstudioFactibilidad { get; set; }
|
||||||
|
|
||||||
|
public int EjecutaProyecto { get; set; }
|
||||||
|
|
||||||
|
public int Proyecto { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
21
AYA.FROPI/AyAEL/CVP/EtapaEL.cs
Normal file
21
AYA.FROPI/AyAEL/CVP/EtapaEL.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.CVP
|
||||||
|
{
|
||||||
|
public class EtapaEL : AyAEL
|
||||||
|
{
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public DateTime FechaInicio { get; set; }
|
||||||
|
|
||||||
|
public DateTime FechaFin { get; set; }
|
||||||
|
|
||||||
|
public int Etapa { get; set; }
|
||||||
|
|
||||||
|
public int SituacionActual { get; set; }
|
||||||
|
|
||||||
|
public int Proyecto { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
19
AYA.FROPI/AyAEL/CVP/RespuestaEtapaEL.cs
Normal file
19
AYA.FROPI/AyAEL/CVP/RespuestaEtapaEL.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AyAEL.CVP
|
||||||
|
{
|
||||||
|
public class RespuestaEtapaEL : AyAEL
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Atributos
|
||||||
|
|
||||||
|
public int CicloVida { get; set; }
|
||||||
|
|
||||||
|
public int Catalogo { get; set; }
|
||||||
|
|
||||||
|
public string Otro { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue