Esempio n. 1
0
        /// <summary>
        /// Obtiene los problemas de una deteccion
        /// </summary>
        /// <param name="deteccionId"></param>
        /// <param name="tratamiento"></param>
        /// <returns></returns>
        internal List <ProblemaInfo> ObtenerProblemasDeteccion(AnimalDeteccionInfo deteccionId, TratamientoInfo tratamiento)
        {
            try
            {
                Logger.Info();
                Dictionary <string, object> parametros = AuxProblemaDAL.ObtenerParametrosObtenerProblemasDeteccion(deteccionId);
                DataSet             ds        = Retrieve("Enfermeria_ObtenerProblemasDeteccion", parametros);
                List <ProblemaInfo> probelmas = null;

                if (ValidateDataSet(ds))
                {
                    probelmas = MapProblemaDAL.ObtenerProblemasPorDeteccion(ds, tratamiento);
                }
                return(probelmas);
            }
            catch (SqlException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (DataException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Obtiene la lista de problemas secundarios para deteccion de ganado
        /// </summary>
        /// <returns></returns>
        internal IList <ProblemaInfo> ObtenerListaProblemas()
        {
            IList <ProblemaInfo> retValue = null;

            try
            {
                Logger.Info();

                DataSet ds = Retrieve("DeteccionGanado_ObtenerProblemasSecundarios");

                if (ValidateDataSet(ds))
                {
                    retValue = MapProblemaDAL.ObtenerListaProblemasSecundarios(ds);
                }
            }
            catch (SqlException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (DataException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }

            return(retValue);
        }
Esempio n. 3
0
        /// <summary>
        /// Obtiene una lista de problemas registrados para sanidad y necropsia
        /// </summary>
        /// <returns></returns>
        internal List <ProblemaInfo> ObtenerListaProblemasNecropsia()
        {
            List <ProblemaInfo> retValue = null;

            try
            {
                Logger.Info();

                DataSet ds = Retrieve("SalidaPorMuerte_ObtenerListaProblemasNecropsia");

                if (ValidateDataSet(ds))
                {
                    retValue = MapProblemaDAL.ObtenerListaProblemasNecropsia(ds);
                }
            }
            catch (SqlException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (DataException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }

            return(retValue);
        }