Example #1
0
        /// <summary>
        /// Obtiene el detalle del lector
        /// </summary>
        /// <param name="lectorRegistro"></param>
        /// <returns></returns>
        internal List <LectorRegistroDetalleInfo> ObtenerDetalleLectorRegistro(LectorRegistroInfo lectorRegistro)
        {
            var resultado = new List <LectorRegistroDetalleInfo>();

            try
            {
                Logger.Info();
                var parameters = AuxLectorRegistro.ObtenerParametroDetalleLectorRegistro(lectorRegistro);
                var ds         = Retrieve("Reparto_ObtenerDetalleLectorRegistro", parameters);
                if (ValidateDataSet(ds))
                {
                    resultado = MapLectorRegistro.ObtenerDetalleLectorRegistro(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(resultado);
        }
        public static LectorRegistroInfo ObtenerKilogramosProgramados(int loteID)
        {
            LectorRegistroInfo lector           = null;
            LectorRegistroPL   lectorRegistroPL = new LectorRegistroPL();

            try
            {
                var seguridad      = (SeguridadInfo)HttpContext.Current.Session["Seguridad"];
                int organizacionId = seguridad.Usuario.Organizacion.OrganizacionID;

                if (seguridad != null)
                {
                    LoteInfo lote = new LoteInfo();
                    lote.LoteID         = loteID;
                    lote.OrganizacionID = organizacionId;
                    lector = lectorRegistroPL.ObtenerLectorRegistro(lote, DateTime.Now);
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
            }

            return(lector);
        }
Example #3
0
 /// <summary>
 /// Obtiene un registro de la tabla LectorRegistro por lote
 /// </summary>
 /// <param name="lote"></param>
 /// <param name="fecha"></param>
 /// <returns></returns>
 public LectorRegistroInfo ObtenerLectorRegistro(LoteInfo lote, DateTime fecha)
 {
     try
     {
         Logger.Info();
         var lectorRegistroDAL             = new LectorRegistroDAL();
         LectorRegistroInfo lectorRegistro = lectorRegistroDAL.ObtenerLectorRegistro(lote, fecha);
         return(lectorRegistro);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
Example #4
0
 /// <summary>
 /// Obtiene los parametros necesarios para obtener el detalle del lector registro
 /// </summary>
 /// <param name="lector">Lector de cual se quiere obtener el detalle</param>
 /// <returns>Diccionario de parametros</returns>
 internal static Dictionary <string, object> ObtenerParametroDetalleLectorRegistro(LectorRegistroInfo lector)
 {
     try
     {
         Logger.Info();
         var parametros =
             new Dictionary <string, object>
         {
             { "@LectorRegistroID", lector.LectorRegistroID },
             { "@Activo", (int)EstatusEnum.Activo },
         };
         return(parametros);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }