Beispiel #1
0
 public string CreateCustomField(
     string fieldName,
     CustomFieldDataType dataType,
     List<string> options)
 {
     return CreateCustomField(fieldName, dataType, options, true);
 }
Beispiel #2
0
 public string CreateCustomField(
     string fieldName,
     CustomFieldDataType dataType,
     List <string> options)
 {
     return(CreateCustomField(fieldName, dataType, options, true));
 }
Beispiel #3
0
 public string CreateCustomField(string fieldName, CustomFieldDataType dataType, List<string> options)
 {
     string json = HttpHelper.Post(string.Format("/lists/{0}/customfields.json", _listID), null, JavaScriptConvert.SerializeObject(
         new Dictionary<string, object>() { { "FieldName", fieldName }, { "DataType", dataType.ToString() }, { "Options", options } })
         );
     return JavaScriptConvert.DeserializeObject<string>(json);
 }
 public string CreateCustomField(string fieldName, CustomFieldDataType dataType, List<string> options)
 {
     return HttpHelper.Post<Dictionary<string, object>, string>(
         string.Format("/lists/{0}/customfields.json", ListID), null,
         new Dictionary<string, object>()
         {
             { "FieldName", fieldName },
             { "DataType", dataType.ToString() },
             { "Options", options }
         });
 }
Beispiel #5
0
        public string CreateCustomField(string fieldName, CustomFieldDataType dataType, List <string> options)
        {
            string json = HttpHelper.Post(string.Format("/lists/{0}/customfields.json", _listID), null, JavaScriptConvert.SerializeObject(
                                              new Dictionary <string, object>()
            {
                { "FieldName", fieldName }, { "DataType", dataType.ToString() }, { "Options", options }
            })
                                          );

            return(JavaScriptConvert.DeserializeObject <string>(json));
        }
Beispiel #6
0
        public string CreateCustomField(string listId, string name, CustomFieldDataType type)
        {
            var list          = new List(auth, listId);
            var sanitizedName = SanitizeKeyName(name);

            try
            {
                return(list.CreateCustomField(sanitizedName, type, null));
            }
            catch (Exception ex)
            {
                throw new Exception(String.Format("Error creating custom field '{0}'. {1}", name, ex.Message));
            }
        }
Beispiel #7
0
 public string CreateCustomField(
     string fieldName,
     CustomFieldDataType dataType,
     List <string> options,
     bool visibleInPreferenceCenter)
 {
     return(HttpPost <Dictionary <string, object>, string>(
                string.Format("/lists/{0}/customfields.json", ListID), null,
                new Dictionary <string, object>()
     {
         { "FieldName", fieldName },
         { "DataType", dataType.ToString() },
         { "Options", options },
         { "VisibleInPreferenceCenter", visibleInPreferenceCenter }
     }));
 }
Beispiel #8
0
 public string CreateCustomField(
     string fieldName,
     CustomFieldDataType dataType,
     List<string> options,
     bool visibleInPreferenceCenter)
 {
     return HttpPost<Dictionary<string, object>, string>(
         string.Format("/lists/{0}/customfields.json", ListID), null,
         new Dictionary<string, object>()
         {
             { "FieldName", fieldName },
             { "DataType", dataType.ToString() },
             { "Options", options },
             { "VisibleInPreferenceCenter", visibleInPreferenceCenter }
         });
 }