/// <summary> /// Valida el arete y arete testigo ingresado que no se haya detectado en el dia /// </summary> /// <param name="arete"></param> /// <param name="areteTestigo"></param> /// <returns></returns> internal int ValidarAreteDetectado(string arete, string areteTestigo) { try { Logger.Info(); var parameters = AuxSupervisionGanadoDAL.ObtenerParametrosValidarAretesDetectados(arete, areteTestigo); DataSet ds = Retrieve("SupervisionGanado_ValidarAretesDetectados", parameters); return(Convert.ToInt32(ds.Tables[0].Rows[0][0].ToString())); } 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); } }
/// <summary> /// Guarda los aretes detectados despues de la revision /// </summary> /// <param name="supervision"></param> /// <param name="organizacionId"></param> /// <returns></returns> internal int GuardarEstatusDeteccion(List <SupervisionGanadoInfo> supervision, int organizacionId) { try { Logger.Info(); var parameters = AuxSupervisionGanadoDAL.ObtenerParametrosGuardarSupervisionGanado(supervision, organizacionId); Create("SupervisionGanado_GuardarSupervision", parameters); return(1); } 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); } }