Exemple #1
0
        /// <summary>
        /// Metodo que obtiene los rangos iniciales por el sexo del ganado
        /// </summary>
        /// <param name="sexo"></param>
        /// <returns></returns>
        internal List <TipoGanadoInfo> ObtenerPorSexo(String sexo)
        {
            List <TipoGanadoInfo> lista = null;

            try
            {
                Dictionary <string, object> parameters = AuxTipoGanadoDAL.ObtenerParametrosPorSexo(sexo);
                DataSet ds = Retrieve("[dbo].[TipoGanado_ObtenerPorSexo]", parameters);
                if (ValidateDataSet(ds))
                {
                    lista = MapTipoGanadoDAL.ObtenerPorSexo(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(lista);
        }