898 lines
42 KiB
C#
898 lines
42 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: AyABL.Tran.inspeccionapBL
|
|
// 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.TRA;
|
|
using AyAEL.Tran;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Specialized;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using System.Data.Common;
|
|
|
|
namespace AyABL.Tran
|
|
{
|
|
public class inspeccionapBL : AyABL
|
|
{
|
|
private static NameValueCollection appSettings = ConfigurationManager.AppSettings;
|
|
|
|
public inspeccionapBL()
|
|
{
|
|
this.objinspeccionapEL = new inspeccionapEL();
|
|
this.objresponsableActividadEL = new responsableActividadEL();
|
|
this.objprogramacionSolicitudEL = new programacionsolicitudEL();
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.solicitud.ToString();
|
|
this.NombreConeccionBD = BASESDEDATOS.SIGDD.ToString();
|
|
}
|
|
|
|
public inspeccionapEL objinspeccionapEL { get; set; }
|
|
|
|
public responsableActividadEL objresponsableActividadEL { get; set; }
|
|
|
|
public programacionsolicitudEL objprogramacionSolicitudEL { get; set; }
|
|
|
|
public int insertarInspeccionGeneral(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.inspeccion.ToString();
|
|
this.CamposTabla = t_dis_inspeccion.ESTRUCTURAEXISTENTE.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.TIPOESTRUCTURA.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.DISPONIBILIDADASOCIADAEXISTENTE.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.DESCRIPCIONDISPONIBILIDADEXISTENTE.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.CONDOMINIO.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.FECHA.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.FKESTADOINSPECCION.ToString() + ", " + t_dis_inspeccion.FKSOLICITUD.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.inspeccion.ToString() + " ";
|
|
this.ValoresCampos = new object[9]
|
|
{
|
|
(object) this.objinspeccionapEL.ESTRUCTURAEXISTENTEINSPECCION,
|
|
(object) this.objinspeccionapEL.TIPOESTRUCTURA,
|
|
(object) this.objinspeccionapEL.DISPONIBILIDADASOCIADAEXISTENTEINSPECCION,
|
|
(object) this.objinspeccionapEL.DESCRIPCIONDISPONIBILIDADEXISTENTEINSPECCION,
|
|
(object) this.objinspeccionapEL.CONDOMINIO,
|
|
(object) this.objinspeccionapEL.FECHAINSPECCION,
|
|
(object) this.objinspeccionapEL.FKESTADOINSPECCION,
|
|
(object) this.objinspeccionapEL.FKSOLICITUD,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int insertarInspeccionAP(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.inspeccionap.ToString();
|
|
this.CamposTabla = t_dis_inspeccionap.PRESIONMIN.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.PRESIONMAX.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.SISTEMAASOCIADO.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.CAUDALRESERVADO.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.TUBERIA.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.MATERIALTUBERIA.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.DIAMETRO.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.PREVISTA.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.FKINSPECCION.ToString() + ", " + t_dis_inspeccionap.FKTIPOMEDIDOR.ToString() + ", " + t_dis_inspeccionap.EXISTEDISPONIBILIDAD.ToString() + Tablas.inspeccionap.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.inspeccionap.ToString() + " ";
|
|
this.ValoresCampos = new object[12]
|
|
{
|
|
(object) this.objinspeccionapEL.PRESIONMIN,
|
|
(object) this.objinspeccionapEL.PRESIONMAX,
|
|
(object) this.objinspeccionapEL.SISTEMAASOCIADO,
|
|
(object) this.objinspeccionapEL.CAUDALRESERVADO,
|
|
(object) this.objinspeccionapEL.TUBERIA,
|
|
(object) this.objinspeccionapEL.MATERIALTUBERIA,
|
|
(object) this.objinspeccionapEL.DIAMETRO,
|
|
(object) this.objinspeccionapEL.PREVISTA,
|
|
(object) this.objinspeccionapEL.FKINSPECCION,
|
|
(object) this.objinspeccionapEL.FKTIPOMEDIDOR,
|
|
(object) this.objinspeccionapEL.EXISTEDISPONIBILIDAD,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int insertarTipoprevista(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.tipoprevista.ToString();
|
|
this.CamposTabla = t_dis_tipoprevista.FKTIPOPREVISTA.ToString() + ", " + t_dis_tipoprevista.FKINSPECCIONAP.ToString() + ", " + t_dis_tipoprevista.FKTIPOINSPECCION.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.tipoprevista.ToString() + " ";
|
|
this.ValoresCampos = new object[4]
|
|
{
|
|
(object) this.objinspeccionapEL.FKTIPOPREVISTA,
|
|
(object) this.objinspeccionapEL.FKINSPECCIONAPAS,
|
|
(object) this.objinspeccionapEL.FKTIPOINSPECCION,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int insertarNegaciondisponibilidad(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.negaciondisponibilidad.ToString();
|
|
this.CamposTabla = t_dis_negaciondisponibilidad.FKTIPONEGACIONDISPONIBILIDAD.ToString() + ", " + t_dis_negaciondisponibilidad.FKTIPOINSPECCION.ToString() + ", " + t_dis_negaciondisponibilidad.FKINSPECCIONAPAS.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.negaciondisponibilidad.ToString() + " ";
|
|
this.ValoresCampos = new object[4]
|
|
{
|
|
(object) this.objinspeccionapEL.FKTIPONEGACIONDISPONIBILIDAD,
|
|
(object) this.objinspeccionapEL.FKTIPOINSPECCION,
|
|
(object) this.objinspeccionapEL.FKINSPECCIONAPAS,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int insertarObservacionCritec(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.observacionescritec.ToString();
|
|
this.CamposTabla = t_dis_observacionescritec.DESCRIPCION.ToString() + Tablas.observacionescritec.ToString() + ", " + t_dis_observacionescritec.FKTIPOINSPECCION.ToString() + ", " + t_dis_observacionescritec.FKINSPECCIONAPAS.ToString() + ", " + t_dis_observacionescritec.DESCRIPCIONOTROMOTIVONEGACIONDISPONIBILIDAD + ", " + Auditoria.ASTATE.ToString() + Tablas.observacionescritec.ToString() + " ";
|
|
this.ValoresCampos = new object[5]
|
|
{
|
|
(object) this.objinspeccionapEL.OBSERVACION,
|
|
(object) this.objinspeccionapEL.FKTIPOINSPECCION,
|
|
(object) this.objinspeccionapEL.FKINSPECCIONAPAS,
|
|
(object) this.objinspeccionapEL.DESCRIPCIONOTROMOTIVONEGACIONDISPONIBILIDAD,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int insertarOtroprevista(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.otroprevista.ToString();
|
|
this.CamposTabla = t_dis_otroprevista.DESCRIPCIONOTROPREVISTA.ToString() + ", " + t_dis_otroprevista.FKINSPECCIONAP.ToString() + ", " + t_dis_otroprevista.FKTIPOINSPECCION.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.otroprevista.ToString() + " ";
|
|
this.ValoresCampos = new object[4]
|
|
{
|
|
(object) this.objinspeccionapEL.DESCRIPCIONOTROPREVISTA,
|
|
(object) this.objinspeccionapEL.FKINSPECCIONAPAS,
|
|
(object) this.objinspeccionapEL.FKTIPOINSPECCION,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int insertarOtrotuberiaap(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.otrotuberiaap.ToString();
|
|
this.CamposTabla = t_dis_otrotuberiaap.DESCRIPCIONOTROTUBERIAAP.ToString() + ", " + t_dis_otrotuberiaap.FKINSPECCIONAP.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.otrotuberiaap.ToString() + " ";
|
|
this.ValoresCampos = new object[3]
|
|
{
|
|
(object) this.objinspeccionapEL.DESCRIPCIONOTROTUBERIAAP,
|
|
(object) this.objinspeccionapEL.FKINSPECCIONAPAS,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int insertarDiametromedidor(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.diametromedidor.ToString();
|
|
this.CamposTabla = t_dis_diametromedidor.VALOR.ToString() + Tablas.diametromedidor.ToString() + ", " + t_dis_diametromedidor.FKINSPECCIONAP.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.diametromedidor.ToString() + " ";
|
|
this.ValoresCampos = new object[3]
|
|
{
|
|
(object) this.objinspeccionapEL.VALORDIAMETROMEDIDOR,
|
|
(object) this.objinspeccionapEL.FKINSPECCIONAPAS,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int insertarExistedisponibilidad(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.existedisponibilidadap.ToString();
|
|
this.CamposTabla = t_dis_existedisponibilidadap.EXISTECAPACIDADHIDRICA.ToString() + Tablas.existedisponibilidadap.ToString() + ", " + t_dis_existedisponibilidadap.OBSERVACIONEXTENSIONRAMAL.ToString() + Tablas.existedisponibilidadap.ToString() + ", " + t_dis_existedisponibilidadap.FKINSPECCIONAP.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.existedisponibilidadap.ToString() + " ";
|
|
this.ValoresCampos = new object[4]
|
|
{
|
|
(object) this.objinspeccionapEL.EXISTECAPACIDADHIDRICA,
|
|
(object) this.objinspeccionapEL.OBSERVACIONEXTENSIONRAMAL,
|
|
(object) this.objinspeccionapEL.FKINSPECCIONAPAS,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int insertarCroquis(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.croquis.ToString();
|
|
this.CamposTabla = t_dis_croquis.LONGUITUD.ToString() + Tablas.croquis.ToString() + ", " + t_dis_croquis.LATITUD.ToString() + Tablas.croquis.ToString() + ", " + t_dis_croquis.FKINSPECCION.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.croquis.ToString() + " ";
|
|
this.ValoresCampos = new object[4]
|
|
{
|
|
(object) this.objinspeccionapEL.LONGITUD,
|
|
(object) this.objinspeccionapEL.LATITUD,
|
|
(object) this.objinspeccionapEL.FKINSPECCION,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int insertarInspeccionubicamedidor(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.inspeccionubicamedidor.ToString();
|
|
this.CamposTabla = t_dis_inspeccionubicamedidor.LINDERO.ToString() + Tablas.inspeccionubicamedidor.ToString() + ", " + t_dis_inspeccionubicamedidor.FKINSPECCION.ToString() + ", " + t_dis_inspeccionubicamedidor.FKUBICAMEDIDOR.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.inspeccionubicamedidor.ToString() + " ";
|
|
this.ValoresCampos = new object[4]
|
|
{
|
|
(object) this.objinspeccionapEL.LINDEROINSPECCIONUBICAMEDIDOR,
|
|
(object) this.objinspeccionapEL.FKINSPECCION,
|
|
(object) this.objinspeccionapEL.FKUBICAMEDIDOR,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int insertarRevision(TransaccionDAL p_tdlTransaccion)
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.revisionformulario.ToString();
|
|
this.CamposTabla = t_dis_revisionformulario.REVISION.ToString() + Tablas.revisionformulario.ToString() + ", " + t_dis_revisionformulario.FECHARECIBIDO.ToString() + Tablas.revisionformulario.ToString() + ", " + t_dis_revisionformulario.FECHAREVISION.ToString() + Tablas.revisionformulario.ToString() + ", " + t_dis_revisionformulario.FKUSUARIOXDEPENDENCIA.ToString() + ", " + t_dis_revisionformulario.FKINSPECCION.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.revisionformulario.ToString() + " ";
|
|
this.ValoresCampos = new object[6]
|
|
{
|
|
(object) this.objinspeccionapEL.REVISIONREVISIONFORMULARIO,
|
|
(object) this.objinspeccionapEL.FECHARECIBIDOREVISIONFORMULARIO,
|
|
(object) this.objinspeccionapEL.FECHAREVISIONREVISIONFORMULARIO,
|
|
(object) this.objinspeccionapEL.FKUSUARIOXDEPENDENCIA,
|
|
(object) this.objinspeccionapEL.FKINSPECCION,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_tdlTransaccion);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarInspecciongeneral()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.inspeccion.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKINSPECCION), Tablas.inspeccionap, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_inspeccion.ESTRUCTURAEXISTENTE.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.TIPOESTRUCTURA.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.DISPONIBILIDADASOCIADAEXISTENTE.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.DESCRIPCIONDISPONIBILIDADEXISTENTE.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.CONDOMINIO.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.FECHA.ToString() + Tablas.inspeccion.ToString() + ", " + t_dis_inspeccion.FKESTADOINSPECCION.ToString() + ", " + t_dis_inspeccion.FKSOLICITUD.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.inspeccion.ToString() + " ";
|
|
this.ValoresCampos = new object[9]
|
|
{
|
|
(object) this.objinspeccionapEL.ESTRUCTURAEXISTENTEINSPECCION,
|
|
(object) this.objinspeccionapEL.TIPOESTRUCTURA,
|
|
(object) this.objinspeccionapEL.DISPONIBILIDADASOCIADAEXISTENTEINSPECCION,
|
|
(object) this.objinspeccionapEL.DESCRIPCIONDISPONIBILIDADEXISTENTEINSPECCION,
|
|
(object) this.objinspeccionapEL.CONDOMINIO,
|
|
(object) this.objinspeccionapEL.FECHAINSPECCION,
|
|
(object) this.objinspeccionapEL.FKESTADOINSPECCION,
|
|
(object) this.objinspeccionapEL.FKSOLICITUD,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.PKINSPECCION;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarEstadoInspecciongeneral()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.inspeccion.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
if (this.objinspeccionapEL.PKINSPECCION != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKINSPECCION), Tablas.inspeccion, operadorLogico.AND));
|
|
if (this.objinspeccionapEL.FKSOLICITUD != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorFK(this.objinspeccionapEL.FKSOLICITUD, Tablas.solicitud, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_inspeccion.FKESTADOINSPECCION.ToString();
|
|
this.ValoresCampos = new object[1]
|
|
{
|
|
(object) this.objinspeccionapEL.FKESTADOINSPECCION
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return 1;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarInspeccionap()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.inspeccionap.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.FKINSPECCIONAPAS), Tablas.inspeccionap, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_inspeccionap.PRESIONMIN.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.PRESIONMAX.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.SISTEMAASOCIADO.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.CAUDALRESERVADO.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.TUBERIA.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.MATERIALTUBERIA.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.DIAMETRO.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.PREVISTA.ToString() + Tablas.inspeccionap.ToString() + ", " + t_dis_inspeccionap.FKTIPOMEDIDOR.ToString() + ", " + t_dis_inspeccionap.EXISTEDISPONIBILIDAD.ToString() + Tablas.inspeccionap.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.inspeccionap.ToString() + " ";
|
|
this.ValoresCampos = new object[11]
|
|
{
|
|
(object) this.objinspeccionapEL.PRESIONMIN,
|
|
(object) this.objinspeccionapEL.PRESIONMAX,
|
|
(object) this.objinspeccionapEL.SISTEMAASOCIADO,
|
|
(object) this.objinspeccionapEL.CAUDALRESERVADO,
|
|
(object) this.objinspeccionapEL.TUBERIA,
|
|
(object) this.objinspeccionapEL.MATERIALTUBERIA,
|
|
(object) this.objinspeccionapEL.DIAMETRO,
|
|
(object) this.objinspeccionapEL.PREVISTA,
|
|
(object) this.objinspeccionapEL.FKTIPOMEDIDOR,
|
|
(object) this.objinspeccionapEL.EXISTEDISPONIBILIDAD,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.FKINSPECCIONAPAS;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarTipoprevista()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.tipoprevista.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKTIPOPREVISTA), Tablas.tipoprevista, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_tipoprevista.FKTIPOPREVISTA.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.tipoprevista.ToString() + " ";
|
|
this.ValoresCampos = new object[2]
|
|
{
|
|
(object) this.objinspeccionapEL.FKTIPOPREVISTA,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.PKTIPOPREVISTA;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarNegaciondisponibilidad()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.negaciondisponibilidad.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKNEGACIONDISPONIBILIDAD), Tablas.negaciondisponibilidad, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_negaciondisponibilidad.FKTIPONEGACIONDISPONIBILIDAD.ToString() + ", " + t_dis_negaciondisponibilidad.FKINSPECCIONAPAS.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.observacionescritec.ToString() + " ";
|
|
this.ValoresCampos = new object[3]
|
|
{
|
|
(object) this.objinspeccionapEL.FKTIPONEGACIONDISPONIBILIDAD,
|
|
(object) this.objinspeccionapEL.FKINSPECCIONAPAS,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.PKNEGACIONDISPONIBILIDAD;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarObservacionCritec()
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.observacionescritec.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKOBSERVACIONESCRITEC), Tablas.observacionescritec, operadorLogico.NONE));
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.observacionescritec.ToString();
|
|
this.CamposTabla = t_dis_observacionescritec.DESCRIPCION.ToString() + Tablas.observacionescritec.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.observacionescritec.ToString() + " ";
|
|
this.ValoresCampos = new object[2]
|
|
{
|
|
(object) this.objinspeccionapEL.OBSERVACION,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarOtroprevista()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.otroprevista.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKOTROPREVISTA), Tablas.otroprevista, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_otroprevista.DESCRIPCIONOTROPREVISTA.ToString() + Tablas.otroprevista.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.otroprevista.ToString() + " ";
|
|
this.ValoresCampos = new object[2]
|
|
{
|
|
(object) this.objinspeccionapEL.DESCRIPCIONOTROPREVISTA,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.PKOTROPREVISTA;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarOtrotuberiaap()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.otrotuberiaap.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKOTROTUBERIAAP), Tablas.otrotuberiaap, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_otrotuberiaap.DESCRIPCIONOTROTUBERIAAP.ToString() + Tablas.otrotuberiaap.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.otrotuberiaap.ToString() + " ";
|
|
this.ValoresCampos = new object[2]
|
|
{
|
|
(object) this.objinspeccionapEL.DESCRIPCIONOTROTUBERIAAP,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.PKOTROTUBERIAAP;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarDiametromedidor()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.diametromedidor.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKDIAMETROMEDIDOR), Tablas.diametromedidor, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_diametromedidor.VALOR.ToString() + Tablas.diametromedidor.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.diametromedidor.ToString() + " ";
|
|
this.ValoresCampos = new object[2]
|
|
{
|
|
(object) this.objinspeccionapEL.VALORDIAMETROMEDIDOR,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.PKDIAMETROMEDIDOR;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarExistedisponibilidad()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.existedisponibilidadap.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKEXISTEDISPONIBILIDAD), Tablas.existedisponibilidadap, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_existedisponibilidadap.EXISTECAPACIDADHIDRICA.ToString() + Tablas.existedisponibilidadap.ToString() + ", " + t_dis_existedisponibilidadap.OBSERVACIONEXTENSIONRAMAL.ToString() + Tablas.existedisponibilidadap.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.existedisponibilidadap.ToString() + " ";
|
|
this.ValoresCampos = new object[3]
|
|
{
|
|
(object) this.objinspeccionapEL.EXISTECAPACIDADHIDRICA,
|
|
(object) this.objinspeccionapEL.OBSERVACIONEXTENSIONRAMAL,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.PKEXISTEDISPONIBILIDAD;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarCroquis()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.croquis.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKCROQUIS), Tablas.croquis, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_croquis.LONGUITUD.ToString() + Tablas.croquis.ToString() + ", " + t_dis_croquis.LATITUD.ToString() + Tablas.croquis.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.croquis.ToString() + " ";
|
|
this.ValoresCampos = new object[3]
|
|
{
|
|
(object) this.objinspeccionapEL.LONGITUD,
|
|
(object) this.objinspeccionapEL.LATITUD,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.PKCROQUIS;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarInspeccionubicamedidor()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.inspeccionubicamedidor.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKINSPECCIONUBICAMEDIDOR), Tablas.inspeccionubicamedidor, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_inspeccionubicamedidor.LINDERO.ToString() + Tablas.inspeccionubicamedidor.ToString() + ", " + t_dis_inspeccionubicamedidor.FKINSPECCION.ToString() + ", " + t_dis_inspeccionubicamedidor.FKUBICAMEDIDOR.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.inspeccionubicamedidor.ToString() + " ";
|
|
this.ValoresCampos = new object[4]
|
|
{
|
|
(object) this.objinspeccionapEL.LINDEROINSPECCIONUBICAMEDIDOR,
|
|
(object) this.objinspeccionapEL.FKINSPECCION,
|
|
(object) this.objinspeccionapEL.FKUBICAMEDIDOR,
|
|
(object) this.objinspeccionapEL.ASTATE
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.PKINSPECCIONUBICAMEDIDOR;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarRevisionFormulario()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.revisionformulario.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
if (this.objinspeccionapEL.PKREVISIONFORMULARIO != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKREVISIONFORMULARIO), Tablas.revisionformulario, operadorLogico.NONE));
|
|
if (this.objinspeccionapEL.PKINSPECCION != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorFK(this.objinspeccionapEL.PKINSPECCION, Tablas.inspeccion, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_revisionformulario.REVISION.ToString() + Tablas.revisionformulario.ToString() + ", " + t_dis_revisionformulario.FECHAREVISION.ToString() + Tablas.revisionformulario.ToString();
|
|
this.ValoresCampos = new object[2]
|
|
{
|
|
(object) this.objinspeccionapEL.REVISIONREVISIONFORMULARIO,
|
|
(object) this.objinspeccionapEL.FECHAREVISIONREVISIONFORMULARIO
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.PKREVISIONFORMULARIO;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int cancelarRevisionFormulario()
|
|
{
|
|
int num = 0;
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.revisionformulario.ToString();
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
if (this.objinspeccionapEL.PKREVISIONFORMULARIO != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKREVISIONFORMULARIO), Tablas.revisionformulario, operadorLogico.NONE));
|
|
if (this.objinspeccionapEL.PKINSPECCION != 0)
|
|
p_arlCondiciones.Add((object) this.buscarPorFK(this.objinspeccionapEL.PKINSPECCION, Tablas.inspeccion, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_revisionformulario.REVISION.ToString() + Tablas.revisionformulario.ToString() + ", " + t_dis_revisionformulario.FECHAREVISION.ToString() + Tablas.revisionformulario.ToString() + ", " + Auditoria.ASTATE.ToString() + Tablas.revisionformulario.ToString();
|
|
this.ValoresCampos = new object[3]
|
|
{
|
|
(object) this.objinspeccionapEL.REVISIONREVISIONFORMULARIO,
|
|
(object) this.objinspeccionapEL.FECHAREVISIONREVISIONFORMULARIO,
|
|
(object) false
|
|
};
|
|
num = this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
return this.objinspeccionapEL.PKREVISIONFORMULARIO;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int eliminarInspecciongeneral()
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.inspeccion.ToString();
|
|
return this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, new ArrayList()
|
|
{
|
|
(object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKINSPECCION), Tablas.inspeccionap, operadorLogico.NONE)
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int eliminarInspeccionap()
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.inspeccionap.ToString();
|
|
return this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, new ArrayList()
|
|
{
|
|
(object) this.buscarPorPK(new int?(this.objinspeccionapEL.FKINSPECCIONAPAS), Tablas.inspeccionap, operadorLogico.NONE)
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int eliminarTipoprevista()
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.tipoprevista.ToString();
|
|
return this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, new ArrayList()
|
|
{
|
|
(object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKTIPOPREVISTA), Tablas.tipoprevista, operadorLogico.NONE)
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int eliminarNegaciondisponibilidad()
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.negaciondisponibilidad.ToString();
|
|
return this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, new ArrayList()
|
|
{
|
|
(object) this.buscarPorFK(this.objinspeccionapEL.FKINSPECCIONAPAS, Tablas.inspeccionap, operadorLogico.AND),
|
|
(object) this.buscarPorFK(this.objinspeccionapEL.FKTIPONEGACIONDISPONIBILIDAD, Tablas.tiponegaciondisponibilidad, operadorLogico.NONE)
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int eliminarOtroprevista()
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.otroprevista.ToString();
|
|
return this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, new ArrayList()
|
|
{
|
|
(object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKOTROPREVISTA), Tablas.otroprevista, operadorLogico.NONE)
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int eliminarDiametromedidor()
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.otroprevista.ToString();
|
|
return this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, new ArrayList()
|
|
{
|
|
(object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKDIAMETROMEDIDOR), Tablas.diametromedidor, operadorLogico.NONE)
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int eliminarExistedisponibilidad()
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.existedisponibilidadap.ToString();
|
|
return this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, new ArrayList()
|
|
{
|
|
(object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKEXISTEDISPONIBILIDAD), Tablas.existedisponibilidadap, operadorLogico.NONE)
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int eliminarCroquis()
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.croquis.ToString();
|
|
return this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, new ArrayList()
|
|
{
|
|
(object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKCROQUIS), Tablas.croquis, operadorLogico.NONE)
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int eliminarInspeccionubicamedidor()
|
|
{
|
|
try
|
|
{
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.inspeccionubicamedidor.ToString();
|
|
return this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, new ArrayList()
|
|
{
|
|
(object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKINSPECCIONUBICAMEDIDOR), Tablas.inspeccionubicamedidor, operadorLogico.NONE)
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public Decimal obtenerCaudal()
|
|
{
|
|
Decimal num = new Decimal(0);
|
|
DbParameter[] p_dbpParametros = new DbParameter[3];
|
|
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.SqlClient");
|
|
for (int index = 0; index < p_dbpParametros.Length; ++index)
|
|
p_dbpParametros[index] = factory.CreateParameter();
|
|
p_dbpParametros[0].ParameterName = "@FKSOLICITUD";
|
|
p_dbpParametros[0].Value = (object) this.objinspeccionapEL.FKSOLICITUD;
|
|
p_dbpParametros[0].DbType = DbType.Int32;
|
|
p_dbpParametros[1].ParameterName = "@P_STATUS";
|
|
p_dbpParametros[1].DbType = DbType.String;
|
|
p_dbpParametros[1].Size = 2;
|
|
p_dbpParametros[1].Direction = ParameterDirection.InputOutput;
|
|
p_dbpParametros[2].ParameterName = "@P_MENSAJE";
|
|
p_dbpParametros[2].DbType = DbType.String;
|
|
p_dbpParametros[2].Size = 500;
|
|
p_dbpParametros[2].Direction = ParameterDirection.InputOutput;
|
|
DataSet dataSet = this.baseDAL.dsProcedimientoAlmacenado("PA_OBTENER_CALCULOCAUDAL", p_dbpParametros, this.NombreConeccionBD);
|
|
if (dataSet.Tables[0].Rows.Count > 0)
|
|
num = Decimal.Parse(dataSet.Tables[0].Rows[0]["CAUDALASIGNADO"].ToString());
|
|
return num;
|
|
}
|
|
|
|
public DataSet listarInspecciones(ArrayList arlCondicionesFiltroBusqueda)
|
|
{
|
|
try
|
|
{
|
|
ArrayList arrayList = new ArrayList();
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
this.NombreTabla = Vistas.v_criterio_aguapotable.ToString();
|
|
if (this.objinspeccionapEL.PKINSPECCION != 0)
|
|
arrayList.Add((object) this.buscarPorPK(new int?(this.objinspeccionapEL.PKINSPECCION), Tablas.inspeccion, operadorLogico.AND));
|
|
if (this.objinspeccionapEL.FKESTADOINSPECCION != 0)
|
|
arrayList.Add((object) this.buscarPorFK(this.objinspeccionapEL.FKESTADOINSPECCION, Tablas.estadoinspeccion, operadorLogico.AND));
|
|
if (this.objinspeccionapEL.FKSOLICITUD != 0)
|
|
arrayList.Add((object) this.buscarPorFK(this.objinspeccionapEL.FKSOLICITUD, Tablas.solicitud, operadorLogico.OR));
|
|
if (this.objinspeccionapEL.FKREUTILIZA != 0)
|
|
{
|
|
arrayList.Add((object) this.buscarPorFK(this.objinspeccionapEL.FKREUTILIZA, Tablas.solicitud, operadorLogico.OR));
|
|
if (this.objinspeccionapEL.NUMEROSOLICITUD != string.Empty && this.objinspeccionapEL.NUMEROSOLICITUD != null)
|
|
arrayList.Add((object) this.buscarPorFKReutiiliza(this.objinspeccionapEL.NUMEROSOLICITUD, operadorLogico.NONE));
|
|
}
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, "ORDER BY FECHAINSPECCION DESC");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public DataSet listarNegacionInspeccion(ArrayList arlCondicionesFiltroBusqueda)
|
|
{
|
|
try
|
|
{
|
|
ArrayList arrayList = new ArrayList();
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
this.NombreTabla = Vistas.v_criterioap_negacion.ToString();
|
|
if (this.objinspeccionapEL.FKTIPOINSPECCION != 0)
|
|
arrayList.Add((object) this.buscarPorFK(this.objinspeccionapEL.FKTIPOINSPECCION, Tablas.tipoinspeccion, operadorLogico.AND));
|
|
if (this.objinspeccionapEL.FKINSPECCIONAPAS != 0)
|
|
arrayList.Add((object) this.buscarPorFK(this.objinspeccionapEL.FKINSPECCIONAPAS, Tablas.inspeccionapas, operadorLogico.AND));
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, "ORDER BY FKINSPECCIONAPAS DESC");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public DataSet dsListaTipoEstructuraExistente(ArrayList arlCondicionesFiltroBusqueda)
|
|
{
|
|
try
|
|
{
|
|
ArrayList arrayList = new ArrayList();
|
|
this.cargarCondicionBusqueda(arrayList, arlCondicionesFiltroBusqueda);
|
|
this.NombreTabla = Modulos.t_adm_.ToString() + Tablas.tipoestructura.ToString();
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, arrayList, (string) null, (string) null);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
private CondicionDAL buscarPorFKReutiiliza(
|
|
string p_strNUMEROSOLICITUD,
|
|
operadorLogico operador)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = t_dis_solicitud.NUMEROSOLICITUD.ToString() + Tablas.solicitud.ToString(),
|
|
operadorGeneral = operadorGeneral.LIKE,
|
|
operadorLogico = operador,
|
|
valorDerecho = (object) ("-" + p_strNUMEROSOLICITUD + "-")
|
|
};
|
|
}
|
|
}
|
|
}
|