public static bool ValidaEliminacionNotificacionAccion(DTO.Notificaciones.NotificacionAccionDTO theNotificacionAccionDTO, ref DataTable pobjDatatable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@pIdNotificacionAccion", SqlDbType.Decimal, -1, theNotificacionAccionDTO.IdNotificacionAccion); try { //==================================================================================== if (wobjSQLHelper.Ejecutar("validaEliminacionNotificacionAccion", "YouCom", pobjDatatable) <= 0) { retorno = false; } else { retorno = true; } } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ActivaLocalidad(LocalidadDTO theLocalidadDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@PidLocalidad", SqlDbType.VarChar, 20, theLocalidadDTO.IdLocalidad); wobjSQLHelper.SetParametro("@PusuarioIngreso", SqlDbType.VarChar, 20, theLocalidadDTO.UsuarioModificacion); try { //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("Activa_localidad", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool InsertLocalidad(LocalidadDTO theLocalidadDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@Region", SqlDbType.VarChar, 20, theLocalidadDTO.IdRegion); wobjSQLHelper.SetParametro("@descripcionLocalidad", SqlDbType.VarChar, 100, theLocalidadDTO.Descripcion); wobjSQLHelper.SetParametro("@PUsuarioIngreso", SqlDbType.VarChar, 20, theLocalidadDTO.UsuarioIngreso); try { //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("INS_localidad", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ValidaEliminacionTipoVisita(DTO.AccesoHogar.TipoVisitaDTO theTipoVisitaDTO, ref DataTable pobjDatatable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@idTipoVisita", SqlDbType.VarChar, 20, theTipoVisitaDTO.IdTipoVisita); try { //==================================================================================== if (wobjSQLHelper.Ejecutar("validaEliminacionTipoVisita", "YouCom", pobjDatatable) <= 0) { retorno = false; } else { retorno = true; } } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ListaFunciones(int FuncionGrupo, ref DataTable pobjDataTable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { wobjSQLHelper.SetParametro("@FuncionGrupoCod", SqlDbType.VarChar, 20, FuncionGrupo); //Ejecuto SP. //==================================================================================== if (wobjSQLHelper.Ejecutar("QRY_listaFuncionesGrupo", "YouCom", pobjDataTable) <= 0) { retorno = false; } else { retorno = true; } //==================================================================================== } #region Catch catch (Exception eobjException) { throw eobjException; } return(retorno); #endregion }
public static bool DeleteFuncionGrupo(FuncionGrupoDTO theFuncionGrupoDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@usuarioIngreso", SqlDbType.VarChar, 20, theFuncionGrupoDTO.UsuarioIngreso); wobjSQLHelper.SetParametro("@FuncionGrpCod", SqlDbType.VarChar, 20, theFuncionGrupoDTO.FuncionGrupoCod); try { //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("Delete_FuncionGrupo", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ValidaEliminacionMensajePropietario(DTO.Mensajeria.MensajePropietarioDTO theMensajePropietarioDTO, ref DataTable pobjDatatable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@pIdMensajePropietario", SqlDbType.Decimal, -1, theMensajePropietarioDTO.IdMensajePropietario); try { //==================================================================================== if (wobjSQLHelper.Ejecutar("validaEliminacionMensajePropietario", "YouCom", pobjDatatable) <= 0) { retorno = false; } else { retorno = true; } } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ActivaMensajePropietario(YouCom.DTO.Mensajeria.MensajePropietarioDTO theMensajePropietarioDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@usuarioIngreso", SqlDbType.VarChar, 50, theMensajePropietarioDTO.UsuarioModificacion); wobjSQLHelper.SetParametro("@pIdMensajePropietario", SqlDbType.Decimal, -1, theMensajePropietarioDTO.IdMensajePropietario); try { //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("Activa_MensajePropietario", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ActivaVotacionPropuestaRespuesta(YouCom.DTO.Propuesta.VotacionPropuestaRespuestaDTO theVotacionPropuestaRespuestaDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@pIdVotacionPropuestaRespuesta", SqlDbType.VarChar, 20, theVotacionPropuestaRespuestaDTO.TheVotacionPropuestaDTO.IdVotacionPropuesta); try { //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("Activa_VotacionPropuestaRespuesta", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ActivaGastoComunEstado(YouCom.DTO.GastosComunes.GastoComunEstadoDTO theGastoComunEstadoDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@usuarioIngreso", SqlDbType.VarChar, 50, theGastoComunEstadoDTO.UsuarioModificacion); wobjSQLHelper.SetParametro("@pIdGastoComunEstado", SqlDbType.VarChar, 20, theGastoComunEstadoDTO.IdGastoComunEstado); try { //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("Activa_GastoComunEstado", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ListadoLocalidad(ref DataTable pobjDataTable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Ejecuto SP. //==================================================================================== if (wobjSQLHelper.Ejecutar("QRY_ListadoLocalidad", "YouCom", pobjDataTable) <= 0) { retorno = false; } else { retorno = true; } //==================================================================================== } #region Catch catch (Exception eobjException) { throw eobjException; } return(retorno); #endregion }
public static bool ValidaEliminacionPropuestaEstado(DTO.PropuestaEstadoDTO thePropuestaEstadoDTO, ref DataTable pobjDatatable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@idPropuestaEstado", SqlDbType.VarChar, 20, thePropuestaEstadoDTO.IdPropuestaEstado); try { //==================================================================================== if (wobjSQLHelper.Ejecutar("validaEliminacionPropuestaEstado", "YouCom", pobjDatatable) <= 0) { retorno = false; } else { retorno = true; } } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ListadoFuncionGrupo(ref DataTable pobjDataTable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Ejecuto SP. //==================================================================================== if (wobjSQLHelper.Ejecutar("Qry_ListaFuncionGrupo", "YouCom", pobjDataTable) <= 0) { retorno = false; } else { retorno = true; } //==================================================================================== } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ValidaEliminacionGastoComun(YouCom.DTO.GastosComunes.GastoComunDTO theGastosComunesDTO, ref DataTable pobjDatatable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@idGastoComun", SqlDbType.VarChar, 20, theGastosComunesDTO.IdGastoComun); try { //==================================================================================== if (wobjSQLHelper.Ejecutar("validaEliminacionGastoComun", "YouCom", pobjDatatable) <= 0) { retorno = false; } else { retorno = true; } } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ListadoLocalidadByRegion(int idRegion, ref DataTable pobjDataTable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { wobjSQLHelper.SetParametro("@id_reg", SqlDbType.Int, 12, idRegion); //Ejecuto SP. //==================================================================================== if (wobjSQLHelper.Ejecutar("QRY_ListadoLocalidadByRegion", "YouCom", pobjDataTable) <= 0) { retorno = false; } else { retorno = true; } //==================================================================================== } #region Catch catch (Exception eobjException) { throw eobjException; } return(retorno); #endregion }
public static bool ValidaEliminacionFuncionGrupo(FuncionGrupoDTO theFuncionGrupoDTO, ref DataTable pobjDatable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@FuncionGrpCod", SqlDbType.VarChar, 20, theFuncionGrupoDTO.FuncionGrupoCod); try { //==================================================================================== if (wobjSQLHelper.Ejecutar("validaEliminacionFuncionGrupo", "YouCom", pobjDatable) <= 0) { retorno = true; } else { retorno = false; } //==================================================================================== } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool ValidaEliminacionUsuario(YouCom.DTO.Seguridad.OperadorDTO theUsuarioDTO, ref DataTable pobjDatatable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@pRut", SqlDbType.VarChar, 20, theUsuarioDTO.Rut); try { //==================================================================================== if (wobjSQLHelper.Ejecutar("validaEliminacionUsuario", "YouCom", pobjDatatable) <= 0) { retorno = false; } else { retorno = true; } } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public static bool Update(YouCom.DTO.AccesoHogar.AccesoHogarDTO myAccesoHogarDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdAccesoHogar", SqlDbType.Decimal, -1, myAccesoHogarDTO.IdAccesoHogar); wobjSQLHelper.SetParametro("@pIdCasa", SqlDbType.Decimal, -1, myAccesoHogarDTO.TheCasaDTO.IdCasa); wobjSQLHelper.SetParametro("@pIdTipoVisita", SqlDbType.Decimal, -1, myAccesoHogarDTO.TheTipoVisitaDTO.IdTipoVisita); wobjSQLHelper.SetParametro("@pIdFrecuencia", SqlDbType.Decimal, -1, myAccesoHogarDTO.TheFrecuenciaDTO.IdFrecuencia); wobjSQLHelper.SetParametro("@pIdFamilia", SqlDbType.Decimal, -1, myAccesoHogarDTO.TheFamiliaDTO.IdFamilia); wobjSQLHelper.SetParametro("@pFechaInicio", SqlDbType.DateTime, -1, myAccesoHogarDTO.FechaInicio); wobjSQLHelper.SetParametro("@pFechaTermino", SqlDbType.DateTime, -1, myAccesoHogarDTO.FechaTermino); wobjSQLHelper.SetParametro("@pHoraInicio", SqlDbType.VarChar, -1, myAccesoHogarDTO.HoraInicio); wobjSQLHelper.SetParametro("@pHoraTermino", SqlDbType.VarChar, -1, myAccesoHogarDTO.HoraTermino); wobjSQLHelper.SetParametro("@pNombreVisita", SqlDbType.VarChar, 200, myAccesoHogarDTO.NombreVisita); wobjSQLHelper.SetParametro("@pApellidoPaternoVisita", SqlDbType.VarChar, 200, myAccesoHogarDTO.ApellidoPaternoVisita); wobjSQLHelper.SetParametro("@pApellidoMaternoVisita", SqlDbType.VarChar, 200, myAccesoHogarDTO.ApellidoMaternoVisita); wobjSQLHelper.SetParametro("@pEmailVisita", SqlDbType.VarChar, 200, myAccesoHogarDTO.EmailVisita); wobjSQLHelper.SetParametro("@pRutVisita", SqlDbType.VarChar, 20, myAccesoHogarDTO.RutVisita); wobjSQLHelper.SetParametro("@pAvisar", SqlDbType.Char, 2, myAccesoHogarDTO.Avisar); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myAccesoHogarDTO.UsuarioModificacion); wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myAccesoHogarDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pIdComunidad", SqlDbType.Decimal, -1, myAccesoHogarDTO.TheComunidadDTO.IdComunidad); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_AccesoHogar", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Update(YouCom.DTO.Servicio.EmpresaServicioDTO myEmpresaServicioDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdEmpresaServicio", SqlDbType.Decimal, -1, myEmpresaServicioDTO.IdEmpresaServicio); wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myEmpresaServicioDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pIdComunidad", SqlDbType.Decimal, -1, myEmpresaServicioDTO.TheComunidadDTO.IdComunidad); wobjSQLHelper.SetParametro("@pIdServicio", SqlDbType.Decimal, -1, myEmpresaServicioDTO.TheServiciosDTO.IdServicio); wobjSQLHelper.SetParametro("@pIdGiro", SqlDbType.Decimal, -1, myEmpresaServicioDTO.TheGiroDTO.IdGiro); wobjSQLHelper.SetParametro("@pRazonSocialEmpresaServicio", SqlDbType.VarChar, 300, myEmpresaServicioDTO.RazonSocialEmpresaServicio); wobjSQLHelper.SetParametro("@pRutEmpresaServicio", SqlDbType.VarChar, 20, myEmpresaServicioDTO.RutEmpresaServicio); wobjSQLHelper.SetParametro("@pDireccionEmpresaServicio", SqlDbType.VarChar, 500, myEmpresaServicioDTO.DireccionEmpresaServicio); wobjSQLHelper.SetParametro("@pIdPais", SqlDbType.Decimal, -1, myEmpresaServicioDTO.TheComunaDTO.TheCiudadDTO.TheRegionDTO.ThePaisDTO.IdPais); wobjSQLHelper.SetParametro("@pIdRegion", SqlDbType.Decimal, -1, myEmpresaServicioDTO.TheComunaDTO.TheCiudadDTO.TheRegionDTO.IdRegion); wobjSQLHelper.SetParametro("@pIdCiudad", SqlDbType.Decimal, -1, myEmpresaServicioDTO.TheComunaDTO.TheCiudadDTO.IdCiudad); wobjSQLHelper.SetParametro("@pIdComuna", SqlDbType.Decimal, -1, myEmpresaServicioDTO.TheComunaDTO.IdComuna); wobjSQLHelper.SetParametro("@pTelefonoEmpresaServicio", SqlDbType.VarChar, 20, myEmpresaServicioDTO.TelefonoEmpresaServicio); wobjSQLHelper.SetParametro("@pCelularEmpresaServicio", SqlDbType.VarChar, 20, myEmpresaServicioDTO.CelularEmpresaServicio); wobjSQLHelper.SetParametro("@pEmailEmpresaServicio", SqlDbType.VarChar, 300, myEmpresaServicioDTO.EmailEmpresaServicio); wobjSQLHelper.SetParametro("@pUrlEmpresaServicio", SqlDbType.VarChar, 200, myEmpresaServicioDTO.UrlEmpresaServicio); wobjSQLHelper.SetParametro("@pLogoEmpresaServicio", SqlDbType.VarChar, 200, !string.IsNullOrEmpty(myEmpresaServicioDTO.LogoEmpresaServicio) ? myEmpresaServicioDTO.LogoEmpresaServicio : System.Data.SqlTypes.SqlString.Null); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myEmpresaServicioDTO.UsuarioModificacion); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_EmpresaServicio", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Update(YouCom.DTO.Avisos.AvisoDTO myAvisosDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdAvisos", SqlDbType.Decimal, -1, myAvisosDTO.IdAviso); wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myAvisosDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pIdComunidad", SqlDbType.Decimal, -1, myAvisosDTO.TheComunidadDTO.IdComunidad); wobjSQLHelper.SetParametro("@pIdFamilia", SqlDbType.Decimal, -1, myAvisosDTO.TheFamiliaDTO.IdFamilia); wobjSQLHelper.SetParametro("@pTituloAviso", SqlDbType.VarChar, 200, myAvisosDTO.TituloAviso); wobjSQLHelper.SetParametro("@pDescripcionAviso", SqlDbType.Text, -1, myAvisosDTO.DescripcionAviso); wobjSQLHelper.SetParametro("@pIdTipoAviso", SqlDbType.Decimal, -1, myAvisosDTO.TheTipoAvisoDTO.IdTipoAviso); wobjSQLHelper.SetParametro("@pIdCategoria", SqlDbType.Decimal, -1, myAvisosDTO.TheCategoriaDTO.IdCategoria); wobjSQLHelper.SetParametro("@pPrecio", SqlDbType.Decimal, -1, myAvisosDTO.PrecioAviso); wobjSQLHelper.SetParametro("@pIdMoneda", SqlDbType.Decimal, -1, myAvisosDTO.TheMonedaDTO.IdMoneda); wobjSQLHelper.SetParametro("@pImagenAviso", SqlDbType.VarChar, 200, !string.IsNullOrEmpty(myAvisosDTO.ImagenAviso) ? myAvisosDTO.ImagenAviso : System.Data.SqlTypes.SqlString.Null); wobjSQLHelper.SetParametro("@pFechaPublicacion", SqlDbType.DateTime, -1, myAvisosDTO.FechaPublicacion != DateTime.MinValue ? myAvisosDTO.FechaPublicacion : System.Data.SqlTypes.SqlDateTime.Null); wobjSQLHelper.SetParametro("@pFechaTermino", SqlDbType.DateTime, -1, myAvisosDTO.FechaTermino != DateTime.MinValue ? myAvisosDTO.FechaTermino : System.Data.SqlTypes.SqlDateTime.Null); wobjSQLHelper.SetParametro("@pFechaCompra", SqlDbType.DateTime, -1, myAvisosDTO.FechaCompra != DateTime.MinValue ? myAvisosDTO.FechaCompra : System.Data.SqlTypes.SqlDateTime.Null); wobjSQLHelper.SetParametro("@pIdAvisoEstado", SqlDbType.Decimal, -1, myAvisosDTO.TheAvisosEstadoDTO.IdAvisoEstado); wobjSQLHelper.SetParametro("@pRutComprador", SqlDbType.VarChar, 20, !string.IsNullOrEmpty(myAvisosDTO.RutComprador) ? myAvisosDTO.RutComprador : System.Data.SqlTypes.SqlString.Null); wobjSQLHelper.SetParametro("@pMotivoAvisoEstado", SqlDbType.Text, -1, !string.IsNullOrEmpty(myAvisosDTO.MotivoAvisoEstado) ? myAvisosDTO.MotivoAvisoEstado : System.Data.SqlTypes.SqlString.Null); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myAvisosDTO.UsuarioModificacion); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_Avisos", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Update(YouCom.DTO.Foro.ForoComunidadDTO myForoComunidadDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdForoComunidad", SqlDbType.Decimal, -1, myForoComunidadDTO.IdForoComunidad); wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myForoComunidadDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pIdComunidad", SqlDbType.Decimal, -1, myForoComunidadDTO.TheComunidadDTO.IdComunidad); wobjSQLHelper.SetParametro("@pIdPadre", SqlDbType.Decimal, -1, myForoComunidadDTO.IdPadre); wobjSQLHelper.SetParametro("@pIdFamilia", SqlDbType.Decimal, -1, myForoComunidadDTO.TheFamiliaDTO.IdFamilia); wobjSQLHelper.SetParametro("@pIdTipoForo", SqlDbType.Decimal, -1, myForoComunidadDTO.TheTipoForoDTO.IdTipoForo); wobjSQLHelper.SetParametro("@pIdCategoria", SqlDbType.Decimal, -1, myForoComunidadDTO.TheCategoriaDTO.IdCategoria); wobjSQLHelper.SetParametro("@pIdForoEstado", SqlDbType.Decimal, -1, myForoComunidadDTO.TheForoComunidadEstadoDTO.IdForoComunidadEstado); wobjSQLHelper.SetParametro("@pMotivoForoEstado", SqlDbType.DateTime, -1, myForoComunidadDTO.MotivoEstadoForoComunidad); wobjSQLHelper.SetParametro("@pFechaForo", SqlDbType.DateTime, -1, myForoComunidadDTO.FechaForoComunidad); wobjSQLHelper.SetParametro("@pFechaPublicidadForo", SqlDbType.DateTime, -1, myForoComunidadDTO.FechaPublicacion); wobjSQLHelper.SetParametro("@pFechaTerminoForo", SqlDbType.DateTime, -1, myForoComunidadDTO.FechaTermino); wobjSQLHelper.SetParametro("@pTituloForo", SqlDbType.VarChar, 500, myForoComunidadDTO.TituloForoComunidad); wobjSQLHelper.SetParametro("@pResumenForo", SqlDbType.VarChar, 500, myForoComunidadDTO.ResumenForoComunidad); wobjSQLHelper.SetParametro("@pDescripcionForo", SqlDbType.Text, -1, myForoComunidadDTO.DescripcionForoComunidad); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myForoComunidadDTO.UsuarioModificacion); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_ForoComunidad", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Update(YouCom.DTO.Propietario.FamiliaDTO myFamiliaDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdFamilia", SqlDbType.Decimal, -1, myFamiliaDTO.IdFamilia); wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myFamiliaDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pIdComunidad", SqlDbType.Decimal, -1, myFamiliaDTO.TheComunidadDTO.IdComunidad); wobjSQLHelper.SetParametro("@pIdCasa", SqlDbType.Decimal, -1, myFamiliaDTO.TheParentescoDTO.IdParentesco); wobjSQLHelper.SetParametro("@pIdOcupacion", SqlDbType.Decimal, -1, myFamiliaDTO.TheOcupacionDTO.IdOcupacion); wobjSQLHelper.SetParametro("@pRutFamilia", SqlDbType.VarChar, 12, myFamiliaDTO.RutFamilia); wobjSQLHelper.SetParametro("@pNombreFamilia", SqlDbType.VarChar, 200, myFamiliaDTO.NombreFamilia); wobjSQLHelper.SetParametro("@pApellidoPaternoFamilia", SqlDbType.VarChar, 200, myFamiliaDTO.ApellidoPaternoFamilia); wobjSQLHelper.SetParametro("@pApellidoMaternoFamilia", SqlDbType.VarChar, 200, myFamiliaDTO.ApellidoMaternoFamilia); wobjSQLHelper.SetParametro("@pFechaNacimientoFamilia", SqlDbType.DateTime, -1, myFamiliaDTO.FechaNacimientoFamilia); wobjSQLHelper.SetParametro("@pIdParentesco", SqlDbType.Decimal, -1, myFamiliaDTO.TheParentescoDTO.IdParentesco); wobjSQLHelper.SetParametro("@pCelularFamilia", SqlDbType.VarChar, 20, myFamiliaDTO.CelularFamilia); wobjSQLHelper.SetParametro("@pTelefonoFamilia", SqlDbType.VarChar, 20, myFamiliaDTO.TelefonoFamilia); wobjSQLHelper.SetParametro("@pEmailFamilia", SqlDbType.VarChar, 20, myFamiliaDTO.EmailFamilia); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myFamiliaDTO.UsuarioModificacion); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_Familia", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Update(YouCom.DTO.NoticiaDTO myNoticiaDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pNoticiaId", SqlDbType.Decimal, -1, myNoticiaDTO.NoticiaId); wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myNoticiaDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pIdComunidad", SqlDbType.Decimal, -1, myNoticiaDTO.TheComunidadDTO.IdComunidad); wobjSQLHelper.SetParametro("@pIdCategoria", SqlDbType.Decimal, -1, myNoticiaDTO.TheCategoriaDTO.IdCategoria); wobjSQLHelper.SetParametro("@pNoticiaTitulo", SqlDbType.VarChar, 200, myNoticiaDTO.NotiTitulo); wobjSQLHelper.SetParametro("@pNoticiaResumen", SqlDbType.VarChar, 500, myNoticiaDTO.NotiResumen); wobjSQLHelper.SetParametro("@pNoticiaDetalle", SqlDbType.Text, -1, myNoticiaDTO.NotiDetalle); wobjSQLHelper.SetParametro("@pNoticiaPublicacion", SqlDbType.DateTime, -1, myNoticiaDTO.NotiPublicacion); wobjSQLHelper.SetParametro("@pNoticiaInicio", SqlDbType.DateTime, -1, myNoticiaDTO.NotiInicio); wobjSQLHelper.SetParametro("@pNoticiaExpira", SqlDbType.Char, 1, myNoticiaDTO.NotiExpira); wobjSQLHelper.SetParametro("@pNoticiaExpiracion", SqlDbType.DateTime, -1, myNoticiaDTO.NotiExpiracion); wobjSQLHelper.SetParametro("@pNoticiaAutor", SqlDbType.VarChar, 200, myNoticiaDTO.NotiAutor); wobjSQLHelper.SetParametro("@pNoticiaImagen", SqlDbType.VarChar, 200, !string.IsNullOrEmpty(myNoticiaDTO.NotiImagen) ? myNoticiaDTO.NotiImagen : System.Data.SqlTypes.SqlString.Null); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myNoticiaDTO.UsuarioModificacion); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_Noticia", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Update(YouCom.DTO.ProyectoDTO myProyectoDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdProyecto", SqlDbType.Decimal, -1, myProyectoDTO.IdProyecto); wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myProyectoDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pIdComunidad", SqlDbType.Decimal, -1, myProyectoDTO.TheComunidadDTO.IdComunidad); wobjSQLHelper.SetParametro("@pIdPropuesta", SqlDbType.Decimal, -1, myProyectoDTO.ThePropuestaDTO.IdPropuesta); wobjSQLHelper.SetParametro("@pNombreProyecto", SqlDbType.VarChar, 500, myProyectoDTO.NombreProyecto); wobjSQLHelper.SetParametro("@pDescripcionProyecto", SqlDbType.Text, -1, myProyectoDTO.DescripcionProyecto); wobjSQLHelper.SetParametro("@pFechaInicioProyecto", SqlDbType.DateTime, -1, myProyectoDTO.FechaInicioProyecto); wobjSQLHelper.SetParametro("@pFechaTerminoProyecto", SqlDbType.DateTime, -1, myProyectoDTO.FechaTerminoProyecto); wobjSQLHelper.SetParametro("@pFechaEntregaProyecto", SqlDbType.DateTime, -1, myProyectoDTO.FechaEntregaProyecto); wobjSQLHelper.SetParametro("@pPresupuestoProyecto", SqlDbType.Decimal, -1, myProyectoDTO.PresupuestoProyecto); wobjSQLHelper.SetParametro("@pDireccionProyecto", SqlDbType.VarChar, 300, myProyectoDTO.DireccionProyecto); wobjSQLHelper.SetParametro("@pIdEmpresaContratista", SqlDbType.Decimal, -1, myProyectoDTO.TheEmpresaContratistaDTO.IdEmpresaContratista); wobjSQLHelper.SetParametro("@pIdProyectoEstado", SqlDbType.Decimal, -1, myProyectoDTO.TheProyectoEstadoDTO.IdProyectoEstado); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myProyectoDTO.UsuarioModificacion); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_Proyecto", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Update(YouCom.DTO.DirectivaDTO myDirectivaDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdDirectiva", SqlDbType.Decimal, -1, myDirectivaDTO.IdDirectiva); wobjSQLHelper.SetParametro("@pIdCargo", SqlDbType.Decimal, -1, myDirectivaDTO.TheCargoDTO.IdCargo); wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myDirectivaDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pIdComunidad", SqlDbType.Decimal, -1, myDirectivaDTO.TheComunidadDTO.IdComunidad); wobjSQLHelper.SetParametro("@pRutDirectiva", SqlDbType.VarChar, 20, myDirectivaDTO.RutDirectiva); wobjSQLHelper.SetParametro("@pNombreDirectiva", SqlDbType.VarChar, 200, myDirectivaDTO.NombreDirectiva); wobjSQLHelper.SetParametro("@pApellidoPaternoDirectiva", SqlDbType.VarChar, 200, myDirectivaDTO.ApellidoPaternoDirectiva); wobjSQLHelper.SetParametro("@pApellidoMaternoDirectiva", SqlDbType.VarChar, 200, myDirectivaDTO.ApellidoMaternoDirectiva); wobjSQLHelper.SetParametro("@pFechaNacimientoDirectiva", SqlDbType.DateTime, -1, myDirectivaDTO.FechaNacimientoDirectiva); wobjSQLHelper.SetParametro("@pTelefonoDirectiva", SqlDbType.VarChar, 20, myDirectivaDTO.TelefonoDirectiva); wobjSQLHelper.SetParametro("@pImagenDirectiva", SqlDbType.VarChar, 200, !string.IsNullOrEmpty(myDirectivaDTO.ImagenDirectiva) ? myDirectivaDTO.ImagenDirectiva : System.Data.SqlTypes.SqlString.Null); wobjSQLHelper.SetParametro("@pEmailDirectiva", SqlDbType.VarChar, 200, myDirectivaDTO.EmailDirectiva); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myDirectivaDTO.UsuarioModificacion); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_Directiva", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Update(YouCom.DTO.Seguridad.CondominioDTO myCondominioDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.VarChar, 500, myCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pRutCondominio", SqlDbType.VarChar, 500, myCondominioDTO.RutCondominio); wobjSQLHelper.SetParametro("@pNombreCondominio", SqlDbType.VarChar, 500, myCondominioDTO.NombreCondominio); wobjSQLHelper.SetParametro("@pTelefonoCondominio", SqlDbType.VarChar, 200, myCondominioDTO.TelefonoCondominio); wobjSQLHelper.SetParametro("@pCorreoCondominio", SqlDbType.VarChar, 200, myCondominioDTO.EmailCondominio); wobjSQLHelper.SetParametro("@pDireccionCondominio", SqlDbType.VarChar, 200, myCondominioDTO.DireccionCondominio); wobjSQLHelper.SetParametro("@pIdRegion", SqlDbType.VarChar, 200, myCondominioDTO.TheComunaDTO.TheCiudadDTO.TheRegionDTO.IdRegion); wobjSQLHelper.SetParametro("@pIdCiudad", SqlDbType.VarChar, 200, myCondominioDTO.TheComunaDTO.TheCiudadDTO.IdCiudad); wobjSQLHelper.SetParametro("@pIdComuna", SqlDbType.VarChar, 200, myCondominioDTO.TheComunaDTO.IdComuna); wobjSQLHelper.SetParametro("@pLatitudCondominio", SqlDbType.VarChar, 200, myCondominioDTO.LatitudCondominio); wobjSQLHelper.SetParametro("@pLongitudCondominio", SqlDbType.VarChar, 200, myCondominioDTO.LongitudCondominio); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myCondominioDTO.UsuarioIngreso); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_Condominio", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Update(YouCom.DTO.GastosComunes.GastoComunDTO myGastosComunesDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdGasto", SqlDbType.Decimal, -1, myGastosComunesDTO.IdGastoComun); wobjSQLHelper.SetParametro("@pIdCasa", SqlDbType.Decimal, -1, myGastosComunesDTO.TheCasaDTO.IdCasa); wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myGastosComunesDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pDescripcionGasto", SqlDbType.VarChar, 500, myGastosComunesDTO.DescripcionGasto); wobjSQLHelper.SetParametro("@pMontoGasto", SqlDbType.VarChar, 200, myGastosComunesDTO.MontoGasto); wobjSQLHelper.SetParametro("@pFechaGasto", SqlDbType.DateTime, -1, myGastosComunesDTO.FechaGasto); wobjSQLHelper.SetParametro("@pFechaVencimiento", SqlDbType.DateTime, -1, myGastosComunesDTO.FechaVencimiento); wobjSQLHelper.SetParametro("@pArchivoGasto", SqlDbType.VarChar, 200, !string.IsNullOrEmpty(myGastosComunesDTO.ArchivoGasto) ? myGastosComunesDTO.ArchivoGasto : System.Data.SqlTypes.SqlString.Null); wobjSQLHelper.SetParametro("@pIdGastoComunEstado", SqlDbType.VarChar, 10, myGastosComunesDTO.TheGastoComunEstadoDTO.IdGastoComunEstado); wobjSQLHelper.SetParametro("@pFechaPagoGasto", SqlDbType.DateTime, -1, myGastosComunesDTO.FechaPagoGasto); wobjSQLHelper.SetParametro("@pComentarioGasto", SqlDbType.VarChar, 500, !string.IsNullOrEmpty(myGastosComunesDTO.ComentarioGasto) ? myGastosComunesDTO.ComentarioGasto : System.Data.SqlTypes.SqlString.Null); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myGastosComunesDTO.UsuarioModificacion); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_GastoComun", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Insert(YouCom.DTO.Foro.ForoComunidadDTO myForoComunidadDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myForoComunidadDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pIdComunidad", SqlDbType.Decimal, -1, myForoComunidadDTO.TheComunidadDTO.IdComunidad); wobjSQLHelper.SetParametro("@pIdPadre", SqlDbType.Decimal, -1, myForoComunidadDTO.IdPadre); wobjSQLHelper.SetParametro("@pIdFamilia", SqlDbType.Decimal, -1, myForoComunidadDTO.TheFamiliaDTO.IdFamilia); wobjSQLHelper.SetParametro("@pIdCategoria", SqlDbType.Decimal, -1, myForoComunidadDTO.TheCategoriaDTO.IdCategoria); wobjSQLHelper.SetParametro("@pIdForoEstado", SqlDbType.Decimal, -1, myForoComunidadDTO.TheForoComunidadEstadoDTO.IdForoComunidadEstado); wobjSQLHelper.SetParametro("@pFechaForo", SqlDbType.DateTime, -1, myForoComunidadDTO.FechaForoComunidad != DateTime.MinValue ? myForoComunidadDTO.FechaForoComunidad : System.Data.SqlTypes.SqlDateTime.Null); wobjSQLHelper.SetParametro("@pFechaPublicacionForo", SqlDbType.DateTime, -1, myForoComunidadDTO.FechaPublicacion != DateTime.MinValue ? myForoComunidadDTO.FechaPublicacion : System.Data.SqlTypes.SqlDateTime.Null); wobjSQLHelper.SetParametro("@pFechaTerminoForo", SqlDbType.DateTime, -1, myForoComunidadDTO.FechaTermino != DateTime.MinValue ? myForoComunidadDTO.FechaTermino : System.Data.SqlTypes.SqlDateTime.Null); wobjSQLHelper.SetParametro("@pTituloForo", SqlDbType.VarChar, 500, myForoComunidadDTO.TituloForoComunidad); wobjSQLHelper.SetParametro("@pDescripcionForo", SqlDbType.Text, -1, myForoComunidadDTO.DescripcionForoComunidad); wobjSQLHelper.SetParametro("@pUsuarioIngreso", SqlDbType.VarChar, 20, myForoComunidadDTO.UsuarioIngreso); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("INS_ForoComunidad", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Update(YouCom.DTO.Servicio.ResponsableDTO myResponsableDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdResponsable", SqlDbType.Decimal, -1, myResponsableDTO.IdResponsable); wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myResponsableDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pIdComunidad", SqlDbType.Decimal, -1, myResponsableDTO.TheComunidadDTO.IdComunidad); wobjSQLHelper.SetParametro("@pIdCargo", SqlDbType.Decimal, -1, myResponsableDTO.TheCargoDTO.IdCargo); wobjSQLHelper.SetParametro("@pNombreResponsable", SqlDbType.VarChar, 300, myResponsableDTO.NombreResponsable); wobjSQLHelper.SetParametro("@pApellidoPaternoResponsable", SqlDbType.VarChar, 20, myResponsableDTO.ApellidoPaternoResponsable); wobjSQLHelper.SetParametro("@pApellidoMaternoResponsable", SqlDbType.VarChar, 500, myResponsableDTO.ApellidoMaternoResponsable); wobjSQLHelper.SetParametro("@pRutResponsable", SqlDbType.VarChar, 500, myResponsableDTO.RutResponsable); wobjSQLHelper.SetParametro("@pTelefonoResponsable", SqlDbType.VarChar, 20, myResponsableDTO.TelefonoResponsable); wobjSQLHelper.SetParametro("@pCelularResponsable", SqlDbType.VarChar, 20, myResponsableDTO.CelularResponsable); wobjSQLHelper.SetParametro("@pEmailResponsable", SqlDbType.VarChar, 300, myResponsableDTO.EmailResponsable); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myResponsableDTO.UsuarioModificacion); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_Responsable", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }
public static bool Update(YouCom.DTO.Mensajeria.MensajeDirectivaDTO myMensajeAdministradorDTO) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); try { //Seteo Parámetros. //==================================================================================== wobjSQLHelper.SetParametro("@pIdMensajeDirectiva", SqlDbType.Decimal, -1, myMensajeAdministradorDTO.IdMensajeDirectiva); wobjSQLHelper.SetParametro("@pIdCondominio", SqlDbType.Decimal, -1, myMensajeAdministradorDTO.TheCondominioDTO.IdCondominio); wobjSQLHelper.SetParametro("@pIdComunidad", SqlDbType.Decimal, -1, myMensajeAdministradorDTO.TheComunidadDTO.IdComunidad); wobjSQLHelper.SetParametro("@pIdPadre", SqlDbType.Decimal, -1, myMensajeAdministradorDTO.IdPadre); wobjSQLHelper.SetParametro("@pIdMensajeTipoEnvio", SqlDbType.Decimal, -1, myMensajeAdministradorDTO.TheMensajeTipoEnvioDTO.IdMensajeTipoEnvio); wobjSQLHelper.SetParametro("@pIdCategoria", SqlDbType.Decimal, -1, myMensajeAdministradorDTO.TheCategoriaDTO.IdCategoria); wobjSQLHelper.SetParametro("@pIdFamilia", SqlDbType.Decimal, -1, myMensajeAdministradorDTO.TheFamiliaDTO.IdFamilia > 0 ? myMensajeAdministradorDTO.TheFamiliaDTO.IdFamilia : System.Data.SqlTypes.SqlDecimal.Null); wobjSQLHelper.SetParametro("@pIdDirectiva", SqlDbType.Decimal, -1, myMensajeAdministradorDTO.TheDirectivaDTO.IdDirectiva > 0 ? myMensajeAdministradorDTO.TheDirectivaDTO.IdDirectiva : System.Data.SqlTypes.SqlDecimal.Null); wobjSQLHelper.SetParametro("@pFechaMensaje", SqlDbType.DateTime, -1, myMensajeAdministradorDTO.MensajeFecha); wobjSQLHelper.SetParametro("@pTituloMensaje", SqlDbType.Text, -1, myMensajeAdministradorDTO.MensajeTitulo); wobjSQLHelper.SetParametro("@pDescripcionMensaje", SqlDbType.Text, -1, myMensajeAdministradorDTO.MensajeDescripcion); wobjSQLHelper.SetParametro("@pUsuarioModificacion", SqlDbType.VarChar, 20, myMensajeAdministradorDTO.UsuarioModificacion); //==================================================================================== //Ejecuto SP. //==================================================================================== switch (wobjSQLHelper.EjecutarNQ("UPD_MensajeDirectiva", "YouCom")) { case 0: throw new Exception("No se pudo grabar."); case -1: throw new Exception("Hubo un error."); case -2: throw new Exception("Hubo un error."); } //==================================================================================== retorno = true; } #region Catch catch (Exception eobjException) { throw eobjException; } #endregion return(retorno); }