瀏覽代碼

Fix on the display data

master
George Williams 4 年之前
父節點
當前提交
3f06d4cb2e
共有 1 個檔案被更改,包括 10 行新增14 行删除
  1. 10
    14
      UnivateProperties_API/Repository/Properties/PropertyRepository.cs

+ 10
- 14
UnivateProperties_API/Repository/Properties/PropertyRepository.cs 查看文件

@@ -114,22 +114,18 @@ namespace UnivateProperties_API.Repository.Properties
114 114
 
115 115
                         foreach (var val in groupFields)
116 116
                         {
117
-                            var item = new PropertyDetail()
117
+                            if (!string.IsNullOrEmpty(val.Value))
118 118
                             {
119
-                                Name = val.FieldName,
120
-                                Description = val.Description
121
-                            };
122
-
123
-                            detailGroup.Values.Add(item);
124
-
125
-                            //if (!string.IsNullOrEmpty(val.Value) && (val.FieldName == "Erf Size" || val.FieldName == "Floor Size") && val.Value.EndsWith("2"))
126
-                            //{
127
-                            //    item.Value = val.Value.Substring(0, val.Value.Length - 1) + "<sup>" + val.Value.Last() + "</sup>";
128
-                            //}
129
-                            //else
130
-                                item.Value = val.Value;
119
+                                var item = new PropertyDetail()
120
+                                {
121
+                                    Name = val.FieldName,
122
+                                    Description = val.Description,
123
+                                    Value = val.Value
124
+                                };
125
+
126
+                                detailGroup.Values.Add(item);
127
+                            }
131 128
                         }
132
-
133 129
                         property.DisplayData.Add(detailGroup);
134 130
                     }
135 131
                 }

Loading…
取消
儲存