Ejemplo n.º 1
0
        public static Respuesta Valida_Lote_Activo(Peticion <int> req)
        {
            var feedBack = new Respuesta {
                Mensaje = string.Empty, Resultado = false
            };

            try
            {
                var pl   = new LotePL();
                var info = pl.ObtenerEstatusPorLoteId(req.Datos);
                if (info != null)
                {
                    if (info.Activo.GetHashCode() == 1)
                    {
                        feedBack.Resultado = true;
                    }
                }
                else
                {
                    feedBack.Mensaje = String.Format("El lote no existe, favor de verificar.");
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                feedBack.Mensaje = string.Format("Ocurrió un error al validar el estatus del lote.");
            }

            return(feedBack);
        }