This commit is contained in:
57
util.cs
57
util.cs
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user