/// <summary> /// Obtiene de la base de datos la informacion de una cabeza de ganado muerta /// </summary> /// <param name="organizacionId">Id Organizacion</param> /// <param name="numeroArete">Numero de arete</param> /// <returns></returns> internal MuerteInfo ObtenerGanadoMuertoPorArete(int organizacionId, string numeroArete) { MuerteInfo retValue = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxMuerteDAL.ObtenerParametrosPorOrganizacionArete(organizacionId, numeroArete); DataSet ds = Retrieve("SalidaPorMuerte_ObtenerMuertePorArete", parameters); if (ValidateDataSet(ds)) { retValue = MapMuerteDAL.ObtenerGanadoMuertoPorArete(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); }
/// <summary> /// Obtiene las muertes por fecha Necropsia /// </summary> /// <param name="muerteInfo"></param> /// <returns></returns> public IList <SalidaGanadoMuertoInfo> ObtenerMuertesFechaNecropsia(MuerteInfo muerteInfo) { IList <SalidaGanadoMuertoInfo> listaMuertesInfo = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxMuerteDAL.ObtenerParametrosMuertesFechaNecropsia(muerteInfo); DataSet ds = Retrieve("SalidaPorMuerte_ObtenerMuertosFechaNecropsia", parameters); if (ValidateDataSet(ds)) { listaMuertesInfo = MapMuerteDAL.ObtenerMuertesFechaNecropsia(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(listaMuertesInfo); }
/// <summary> /// Obtiene la lista de muertes por lote /// </summary> /// <param name="loteID"></param> /// <returns></returns> internal IList <MuerteInfo> ObtenerGanadoMuertoPorLoteID(int loteID) { IList <MuerteInfo> retValue = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxMuerteDAL.ObtenerParametrosPorLoteID(loteID); DataSet ds = Retrieve("DeteccionGanado_ObtenerMuertesPorLoteID", parameters); if (ValidateDataSet(ds)) { retValue = MapMuerteDAL.ObtenerGanadoMuertoPorLoteID(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); }
/// <summary> /// Obtiene la lista de aretes muertos para recoleccion de ganado /// </summary> /// <param name="organizacionId"></param> /// <returns></returns> internal IList <MuerteInfo> ObtenerAretesMuertosRecoleccion(int organizacionId) { IList <MuerteInfo> retValue = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxMuerteDAL.ObtenerParametrosPorOrganizacion(organizacionId); DataSet ds = Retrieve("CheckListGanadoMuerto_ObtenerAretesMuertosRecoleccion", parameters); if (ValidateDataSet(ds)) { retValue = MapMuerteDAL.ObtenerAretesMuertosRecoleccion(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); }