private static List <UIOverLimitConfig> ConvertUIOverLimiitConfigList(List <OverLimitConfigEntity> list)
        {
            List <UIOverLimitConfig> resultList = new List <UIOverLimitConfig>();

            if (list == null || list.Count <= 0)
            {
                return(resultList);
            }
            foreach (var item in list)
            {
                UIOverLimitConfig currentEntity = new UIOverLimitConfig()
                {
                    TagName           = item.TagName,
                    TagCode           = item.TagCode,
                    OverLimitConfigID = item.OverLimitConfigID,
                    RealDesc          = item.RealDesc,
                    CreatedDate       = item.CreatedDate,

                    LowLimit1Value       = item.LowLimit1Value == null ? "" : item.LowLimit1Value.ToString(),
                    LowLimit2Value       = item.LowLimit2Value == null ? "" : item.LowLimit2Value.ToString(),
                    LowLimit3Value       = item.LowLimit2Value == null ? "" : item.LowLimit2Value.ToString(),
                    FirstLimitingValue   = item.FirstLimitingValue == null ? "" : item.FirstLimitingValue.ToString(),
                    SecondLimitingValue  = item.SecondLimitingValue == null ? "" : item.SecondLimitingValue.ToString(),
                    ThirdLimitingValue   = item.ThirdLimitingValue == null ? "" : item.ThirdLimitingValue.ToString(),
                    FourthLimitingValue  = item.FourthLimitingValue == null ? "" : item.FourthLimitingValue.ToString(),
                    OverLimitComputeType = item.EnumOverLimitComputeType,
                    Comment = item.Comment
                };

                if (item.EnumOverLimitComputeType == OverLimitComputeTypeEnum.Realtime)
                {
                    currentEntity.LowLimit1Value      = item.LowLimit1Tag;
                    currentEntity.LowLimit2Value      = item.LowLimit2Tag;
                    currentEntity.LowLimit3Value      = item.LowLimit3Tag;
                    currentEntity.FirstLimitingValue  = item.FirstLimitingTag;
                    currentEntity.SecondLimitingValue = item.SecondLimitingTag;
                    currentEntity.ThirdLimitingValue  = item.ThirdLimitingTag;
                    currentEntity.FourthLimitingValue = item.FourthLimitingTag;
                }

                resultList.Add(currentEntity);
            }
            return(resultList);
        }
        private static List<UIOverLimitConfig> ConvertUIOverLimiitConfigList(List<OverLimitConfigEntity> list)
        {
            List<UIOverLimitConfig> resultList = new List<UIOverLimitConfig>();
            if (list == null || list.Count <= 0) return resultList;
            foreach (var item in list) {
                UIOverLimitConfig currentEntity = new UIOverLimitConfig() {
                    TagName = item.TagName,
                    TagCode = item.TagCode,
                    OverLimitConfigID = item.OverLimitConfigID,
                    RealDesc = item.RealDesc,
                    CreatedDate = item.CreatedDate,

                    LowLimit1Value = item.LowLimit1Value == null ? "" : item.LowLimit1Value.ToString(),
                    LowLimit2Value = item.LowLimit2Value == null ? "" : item.LowLimit2Value.ToString(),
                    LowLimit3Value = item.LowLimit2Value == null ? "" : item.LowLimit2Value.ToString(),
                    FirstLimitingValue = item.FirstLimitingValue == null ? "" : item.FirstLimitingValue.ToString(),
                    SecondLimitingValue = item.SecondLimitingValue == null ? "" : item.SecondLimitingValue.ToString(),
                    ThirdLimitingValue = item.ThirdLimitingValue == null ? "" : item.ThirdLimitingValue.ToString(),
                    FourthLimitingValue = item.FourthLimitingValue == null ? "" : item.FourthLimitingValue.ToString(),
                    OverLimitComputeType = item.EnumOverLimitComputeType,
                    Comment = item.Comment
                };

                if (item.EnumOverLimitComputeType == OverLimitComputeTypeEnum.Realtime) {
                    currentEntity.LowLimit1Value = item.LowLimit1Tag;
                    currentEntity.LowLimit2Value = item.LowLimit2Tag;
                    currentEntity.LowLimit3Value = item.LowLimit3Tag;
                    currentEntity.FirstLimitingValue = item.FirstLimitingTag;
                    currentEntity.SecondLimitingValue = item.SecondLimitingTag;
                    currentEntity.ThirdLimitingValue = item.ThirdLimitingTag;
                    currentEntity.FourthLimitingValue = item.FourthLimitingTag;
                }

                resultList.Add(currentEntity);
            }
            return resultList;
        }