TFS_ANTIGUO/SIGPC/AyABL/Usuario/proyectoBL.cs
kledezma 7fdadc4709 KLB
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C519
2021-01-22 15:05:35 +00:00

152 lines
6.3 KiB
C#

// Decompiled with JetBrains decompiler
// Type: AyABL.Usuario.proyectoBL
// Assembly: AyABL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 0F2FF6EC-B53C-44DB-9E00-2F932BF80762
// Assembly location: C:\Users\EQUIPO\Downloads\Raiz\Raiz\bin\AyABL.dll
using AyADAL;
using AyAEL.MANT;
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Configuration;
using System.Data;
namespace AyABL.Usuario
{
public class proyectoBL : AyABL
{
private static NameValueCollection appSettings = ConfigurationManager.AppSettings;
public proyectoBL()
{
this.objproyectoEL = new proyectoEL();
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.proyecto.ToString();
this.NombreConeccionBD = BASESDEDATOS.SIGDD.ToString();
}
public proyectoEL objproyectoEL { get; set; }
public int insertarProyecto()
{
try
{
this.CamposTabla = t_adm_proyecto.DESCRIPCION.ToString() + Tablas.proyecto.ToString() + ", " + t_adm_proyecto.UNIDADMEDIDA.ToString() + Tablas.proyecto.ToString() + ", " + t_adm_proyecto.CANTIDADLIMITE.ToString() + Tablas.proyecto.ToString() + ", " + t_adm_proyecto.FACTOREQUIVALENCIA.ToString() + Tablas.proyecto.ToString() + "," + t_adm_proyecto.ASTATE.ToString() + Tablas.proyecto.ToString();
this.ValoresCampos = new object[5]
{
(object) this.objproyectoEL.DESCRIPCION,
(object) this.objproyectoEL.UNIDADMEDIDA,
(object) this.objproyectoEL.CANTIDADLIMITE,
(object) this.objproyectoEL.FACTOREQUIVALENCIA,
(object) Convert.ToInt16((object) this.objproyectoEL.Activo)
};
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
}
catch (Exception ex)
{
throw ex;
}
}
public int modificarProyecto()
{
try
{
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.proyecto.ToString();
ArrayList p_arlCondiciones = new ArrayList();
p_arlCondiciones.Add((object) this.buscarPorPK(this.objproyectoEL.PK, Tablas.proyecto, operadorLogico.NONE));
this.CamposTabla = t_adm_proyecto.DESCRIPCION.ToString() + Tablas.proyecto.ToString() + ", " + t_adm_proyecto.UNIDADMEDIDA.ToString() + Tablas.proyecto.ToString() + ", " + t_adm_proyecto.CANTIDADLIMITE.ToString() + Tablas.proyecto.ToString() + ", " + t_adm_proyecto.FACTOREQUIVALENCIA.ToString() + Tablas.proyecto.ToString() + "," + t_adm_proyecto.ASTATE.ToString() + Tablas.proyecto.ToString();
this.ValoresCampos = new object[5]
{
(object) this.objproyectoEL.DESCRIPCION,
(object) this.objproyectoEL.UNIDADMEDIDA,
(object) this.objproyectoEL.CANTIDADLIMITE,
(object) this.objproyectoEL.FACTOREQUIVALENCIA,
(object) Convert.ToInt16((object) this.objproyectoEL.Activo)
};
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
}
catch (Exception ex)
{
throw ex;
}
}
public int activarDesactivarProyecto()
{
try
{
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.proyecto.ToString();
ArrayList p_arlCondiciones = new ArrayList();
p_arlCondiciones.Add((object) this.buscarPorPK(this.objproyectoEL.PK, Tablas.proyecto, operadorLogico.NONE));
this.CamposTabla = t_adm_proyecto.ASTATE.ToString() + Tablas.proyecto.ToString();
this.ValoresCampos = new object[1]
{
(object) Convert.ToInt16((object) this.objproyectoEL.Activo)
};
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
}
catch (Exception ex)
{
throw ex;
}
}
public DataSet listarProyectos(
ArrayList arlCondicionesFiltroBusqueda,
bool buscarPorASTATE,
string p_strPrefijoDependencia)
{
try
{
ArrayList arrayList = new ArrayList();
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
this.NombreTabla = Vistas.v_proyectos.ToString();
int? pk = this.objproyectoEL.PK;
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0)
arrayList.Add((object) this.buscarPorPK(this.objproyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
if (buscarPorASTATE)
arrayList.Add((object) this.buscarPorEstado(this.objproyectoEL.ASTATE, Tablas.proyecto, operadorLogico.NONE));
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, "ORDER BY PKPROYECTO DESC");
}
catch (Exception ex)
{
throw ex;
}
}
public DataSet dsListaProyectos(ArrayList arlCondicionesFiltroBusqueda)
{
try
{
ArrayList arrayList = new ArrayList();
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
this.NombreTabla = Vistas.v_proyectos.ToString();
int? pk = this.objproyectoEL.PK;
if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objproyectoEL.PK.HasValue)
arrayList.Add((object) this.buscarPorPK(this.objproyectoEL.PK, Tablas.proyecto, operadorLogico.AND));
arrayList.Add((object) this.buscarPorActivo(new bool?(true), Tablas.proyecto, operadorLogico.NONE));
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, "ORDER BY DESCRIPCIONPROYECTO ASC");
}
catch (Exception ex)
{
throw ex;
}
}
public DataSet dsListaDiasPlazo(ArrayList arlCondicionesFiltroBusqueda)
{
try
{
ArrayList arrayList = new ArrayList();
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.diasplazoresolucion.ToString();
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
}
catch (Exception ex)
{
throw ex;
}
}
}
}