This commit is contained in:
2019-06-26 00:17:13 +00:00
parent cc059dbd5e
commit 3e0530d007
10 changed files with 152 additions and 92 deletions

57
util.cs
View File

@@ -431,6 +431,63 @@ namespace raven_integration
return dCustomField.ToString();
}
/// <summary>
/// Generate a custom fields string that satisfies the rules in the sample test data
/// </summary>
/// <returns></returns>
public static string WidgetRequiredCustomFieldsJsonString()
{/*CURRENT TEMPLATE DEFINITION FOR WIDGET CUSTOM FIELDS, FROM SEEDER.CS SERVER PROJECT
{
""template"": [
{
""fld"": ""WidgetNotes"",
""required"": ""true""
},
{
""fld"": ""WidgetCustom1"",
""hide"": ""false"",
""required"": ""false"",
""type"": ""date""
},
{
""fld"": ""WidgetCustom2"",
""hide"": ""false"",
""required"": ""true"",
""type"": ""text""
},
{
""fld"": ""WidgetCustom3"",
""hide"": ""false"",
""required"": ""false"",
""type"": ""int""
},
{
""fld"": ""WidgetCustom4"",
""hide"": ""false"",
""required"": ""false"",
""type"": ""bool""
},
{
""fld"": ""WidgetCustom5"",
""hide"": ""false"",
""required"": ""false"",
""type"": ""decimal""
}
]
}"
*/
//Custom fields
//"[{c1:"blah"}]
dynamic dCustomField = new JObject();
dCustomField.c1 = "2019-02-08T06:31:48.0019809Z";
dCustomField.c2 = "c2 text";
dCustomField.c3 = "333";
dCustomField.c4 = "true";
dCustomField.c5 = "5.55";
return dCustomField.ToString();
}
}//eoc
}//eons