Exemple #1
0
 /// <summary>
 /// OObtiene el costo de un tratamiento en un movimiento
 /// </summary>
 /// <param name="movimiento">se debe de proporcionar Organizacion y animalmovimiento</param>
 /// <param name="tratamientoID">Identificador del producto</param>
 /// <returns></returns>
 internal decimal ObtenerCostoPorMovimiento(AnimalMovimientoInfo movimiento, int tratamientoID)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxTratamientoDAL.ObtenerParametrosCostoPorMovimiento(movimiento, tratamientoID);
         DataSet ds     = Retrieve("TratamientoGanado_ObtenerCostoTratamientoPorMovimiento", parameters);
         decimal result = 0;
         if (ValidateDataSet(ds))
         {
             result = MapTratamientoDAL.ObtenerCosto(ds);
         }
         return(result);
     }
     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);
     }
 }
Exemple #2
0
 /// <summary>
 /// Obtiene la lista de tratamientos por TipoTrtamiento
 /// </summary>
 /// <param name="tratamientoInfo"></param>
 /// <returns></returns>
 public IList <TratamientoInfo> ObtenerTratamientosPorTipo(TratamientoInfo tratamientoInfo)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters =
             AuxTratamientoDAL.ObtenerParametrosObtenerTratamientosPorTipo(tratamientoInfo);
         DataSet ds = Retrieve("TratamientoGanado_ObtenerPorTipo", parameters);
         IList <TratamientoInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapTratamientoDAL.ObtenerTipoTratamientos(ds);
         }
         return(result);
     }
     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);
     }
 }
Exemple #3
0
 /// <summary>
 /// Obtiene la lista de tratamientos por tipo reimplante
 /// </summary>
 /// <param name="filtroTratamiento"></param>
 /// <param name="pagina"></param>
 /// <returns></returns>
 internal ResultadoInfo <TratamientoInfo> Centros_ObtenerTratamientosPorFiltro(PaginacionInfo pagina, FiltroTratamientoInfo filtroTratamiento)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxTratamientoDAL.Centros_ObtenerTratamientosPorFiltro(pagina, filtroTratamiento);
         DataSet ds = Retrieve("TratamientoCentros_ObtenerTratamientoPorPagina", parameters);
         ResultadoInfo <TratamientoInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapTratamientoDAL.Centros_ObtenerPorFiltro(ds);
         }
         return(result);
     }
     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);
     }
 }
Exemple #4
0
        internal IList <TratamientoInfo> ObtenerTratamientosCorte(TratamientoInfo tratamientoInfo, Metafilaxia bMetafilaxia)
        {
            try
            {
                IList <TratamientoInfo> result = null;
                Logger.Info();
                Dictionary <string, object> parameters = AuxTratamientoDAL.ObtenerTipoTratamientos(tratamientoInfo, bMetafilaxia);
                DataSet ds = Retrieve("TratamientoGanado_Obtener", parameters);

                if (ValidateDataSet(ds))
                {
                    result = MapTratamientoDAL.ObtenerTipoTratamientos(ds);
                }
                return(result);
            }
            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);
            }
        }
Exemple #5
0
 /// <summary>
 /// Obtiene un registro de Tratamiento
 /// </summary>
 /// <param name="descripcion">Descripción de la Tratamiento</param>
 /// <returns></returns>
 internal TratamientoInfo ObtenerPorDescripcion(string descripcion)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxTratamientoDAL.ObtenerParametrosPorDescripcion(descripcion);
         DataSet         ds     = Retrieve("Tratamiento_ObtenerPorDescripcion", parameters);
         TratamientoInfo result = null;
         if (ValidateDataSet(ds))
         {
             result = MapTratamientoDAL.ObtenerPorDescripcion(ds);
         }
         return(result);
     }
     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);
     }
 }
Exemple #6
0
 /// <summary>
 /// Obtiene una lista filtrando por el estatus Activo = 1, Inactivo = 0
 /// </summary>
 /// <returns></returns>
 internal IList <TratamientoInfo> ObtenerTodos(EstatusEnum estatus)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxTratamientoDAL.ObtenerTodos(estatus);
         DataSet ds = Retrieve("Tratamiento_ObtenerTodos", parameters);
         IList <TratamientoInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapTratamientoDAL.ObtenerTodos(ds);
         }
         return(result);
     }
     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);
     }
 }
Exemple #7
0
 /// <summary>
 /// Obtiene una lista de Tratamiento
 /// </summary>
 /// <returns></returns>
 internal IList <TratamientoInfo> ObtenerTodos()
 {
     try
     {
         Logger.Info();
         DataSet ds = Retrieve("Tratamiento_ObtenerTodos");
         IList <TratamientoInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapTratamientoDAL.ObtenerTodos(ds);
         }
         return(result);
     }
     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);
     }
 }