123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- using System.Collections.Generic;
- using InABox.Core;
- namespace PRS.Mobile
- {
- public class DFLayoutLookupValue
- {
- public Guid ID { get; set; }
- public String Text { get; set; }
- public Dictionary<String,object> Values { get; set; }
- public DFLayoutLookupValue()
- {
- ID = Guid.Empty;
- Text = "";
- Values = new Dictionary<string, object>();
- }
-
- public DFLayoutLookupValue(String data = "") : this()
- {
- if (!String.IsNullOrWhiteSpace(data))
- {
- try
- {
- var value = Serialization.Deserialize<DFLayoutLookupValue>(data, true);
- ID = value?.ID ?? Guid.Empty;
- Text = value?.Text ?? "";
- Values = value?.Values ?? new Dictionary<String, Object>();
- }
- catch (Exception e)
- {
- ID = Guid.Empty;
- Text = data;
- Values = new Dictionary<String, Object>();
- }
- }
- }
- public override string ToString()
- {
- return Serialization.Serialize(this);
- }
- }
- }
|