// Decompiled with JetBrains decompiler // Type: AyABL.sistemaasociadoBL // 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 { public class sistemaasociadoBL : AyABL { private static NameValueCollection appSettings = ConfigurationManager.AppSettings; public sistemaasociadoBL() { this.objsistemaasociadoEL = new sistemaasociadoEL(); this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.sistemaasociado.ToString(); this.NombreConeccionBD = BASESDEDATOS.SIGDD.ToString(); } public sistemaasociadoEL objsistemaasociadoEL { get; set; } public int insertarSistemaAsociado() { try { this.CamposTabla = t_adm_sistemaasociado.NOMBRE.ToString() + Tablas.sistemaasociado.ToString() + "," + t_adm_sistemaasociado.OBSERVACION.ToString() + Tablas.sistemaasociado.ToString() + "," + t_adm_sistemaasociado.FKDEPENDENCIA.ToString() + "," + t_adm_sistemaasociado.FKZONAPRESION.ToString() + "," + Auditoria.ASTATE.ToString() + Tablas.sistemaasociado.ToString(); this.ValoresCampos = new object[5] { (object) this.objsistemaasociadoEL.NOMBRE, (object) this.objsistemaasociadoEL.OBSERVACIONES, (object) this.objsistemaasociadoEL.FKDEPENDENCIA, (object) this.objsistemaasociadoEL.FKZONAPRESION, (object) Convert.ToInt16(this.objsistemaasociadoEL.ASTATE) }; return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD); } catch (Exception ex) { throw ex; } } public int modificarSistemaAsociado() { try { ArrayList p_arlCondiciones = new ArrayList(); p_arlCondiciones.Add((object) this.buscarPorPK(this.objsistemaasociadoEL.PK, Tablas.sistemaasociado, operadorLogico.NONE)); this.CamposTabla = t_adm_sistemaasociado.NOMBRE.ToString() + Tablas.sistemaasociado.ToString() + "," + t_adm_sistemaasociado.OBSERVACION.ToString() + Tablas.sistemaasociado.ToString() + "," + t_adm_sistemaasociado.FKDEPENDENCIA.ToString() + "," + t_adm_sistemaasociado.FKZONAPRESION.ToString() + "," + Auditoria.ASTATE.ToString() + Tablas.sistemaasociado.ToString(); this.ValoresCampos = new object[5] { (object) this.objsistemaasociadoEL.NOMBRE, (object) this.objsistemaasociadoEL.OBSERVACIONES, (object) this.objsistemaasociadoEL.FKDEPENDENCIA, (object) this.objsistemaasociadoEL.FKZONAPRESION, (object) Convert.ToInt16(this.objsistemaasociadoEL.ASTATE) }; return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones); } catch (Exception ex) { throw ex; } } public DataSet listarSistemaAsociado( ArrayList arlCondicionesFiltroBusqueda, bool buscarPorASTATE) { try { ArrayList arrayList = new ArrayList(); this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda); int? pk = this.objsistemaasociadoEL.PK; if ((pk.GetValueOrDefault() != 0 ? 1 : (!pk.HasValue ? 1 : 0)) != 0 && this.objsistemaasociadoEL.PK.HasValue) arrayList.Add((object) this.buscarPorPK(this.objsistemaasociadoEL.PK, Tablas.sistemaasociado, operadorLogico.AND)); if (this.objsistemaasociadoEL.FKDEPENDENCIA != 0) { int fkdependencia = this.objsistemaasociadoEL.FKDEPENDENCIA; arrayList.Add((object) this.buscarPorFK(this.objsistemaasociadoEL.FKDEPENDENCIA, Tablas.dependencia, operadorLogico.AND)); } if (this.objsistemaasociadoEL.FKZONAPRESION != 0) { int fkzonapresion = this.objsistemaasociadoEL.FKZONAPRESION; arrayList.Add((object) this.buscarPorFK(this.objsistemaasociadoEL.FKZONAPRESION, Tablas.zonapresion, operadorLogico.AND)); } if (buscarPorASTATE) arrayList.Add((object) this.buscarPorActivo(new bool?(this.objsistemaasociadoEL.ASTATE), Tablas.sistemaasociado, operadorLogico.NONE)); this.NombreTabla = Vistas.v_obtener_sistemaasociado.ToString(); return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, "ORDER BY PKSISTEMAASOCIADO ASC"); } catch (Exception ex) { throw ex; } } } }