Beispiel #1
0
        public ItemsLogLatestAIOViewModel GeItemsLogLatest(int itemId)
        {
            ItemsLogLatestAIOViewModel result = null;

            ItemsLogLatest current = Entities.ItemsLogLatests.FirstOrDefault(x => x.ItemId == itemId);

            if (current == null)
            {
                return(null);
            }

            result = new ItemsLogLatestAIOViewModel(current);

            return(result);
        }
Beispiel #2
0
        public ItemsLogLatestAIOViewModel GeItemsLogLatest(int itemId)
        {
            try
            {
                ItemsLogLatestAIOViewModel result = null;

                var            Entities = new IndustrialMonitoringEntities();
                ItemsLogLatest current  = Entities.ItemsLogLatests.FirstOrDefault(x => x.ItemId == itemId);

                if (current == null)
                {
                    return(null);
                }

                result = new ItemsLogLatestAIOViewModel(current);

                return(result);
            }
            catch (Exception ex)
            {
                Logger.LogMonitoringServiceLibrary(ex);
                return(null);
            }
        }