This commit is contained in:
2020-01-15 18:55:26 +00:00
parent 4a0aa6c411
commit 816ccc5e91
2 changed files with 48 additions and 34 deletions

View File

@@ -9,7 +9,22 @@ namespace raven_integration
{
public class FormCustom
{
public enum AyaDataType : int
{
NoType = 0,
DateTime = 1,
Date = 2,
Time = 3,
Text = 4,
Integer = 5,
Bool = 6,
Decimal = 7,
Currency = 8,
Tags = 9,
Enum = 10
}
/// <summary>
/// Test create or update
@@ -19,7 +34,9 @@ namespace raven_integration
{
//This is a special case, you can PUT a formcustom, but you can't delete one and you can't create one
/*
*/
dynamic d = new JObject();
d.formkey = "user";
@@ -30,7 +47,7 @@ namespace raven_integration
dt.fld = "UserCustom1";
dt.hide = false;
dt.required = true;
dt.type = "text";
dt.type = AyaDataType.Text;
dtemplate.Add(dt);
@@ -43,7 +60,7 @@ namespace raven_integration
dt.fld = "UserCustom2";
dt.hide = true;
dt.required = false;
dt.type = "bool";
dt.type = AyaDataType.Bool;
dtemplate.Add(dt);
d.template = dtemplate.ToString();//it expects it to be a json string, not actual json