Esempio n. 1
0
        private ZCRMSection GetZCRMSection(JObject sectionJSON)
        {
            ZCRMSection section = ZCRMSection.GetInstance(Convert.ToString(sectionJSON["name"]));

            section.ColumnCount = Convert.ToInt32(sectionJSON["column_count"]);
            section.DisplayName = (string)sectionJSON["display_label"];
            section.Sequence    = Convert.ToInt32(sectionJSON["sequence_number"]);
            if (sectionJSON.ContainsKey("isSubformSection"))
            {
                section.IsSubformSection = Convert.ToBoolean(sectionJSON["isSubformSection"]);
            }
            if (sectionJSON.ContainsKey("tab_traversal"))
            {
                section.TabTraversal = Convert.ToInt32(sectionJSON["tab_traversal"]);
            }
            if (sectionJSON.ContainsKey("api_name"))
            {
                section.ApiName = Convert.ToString(sectionJSON["api_name"]);
            }
            if (sectionJSON.ContainsKey("properties") && sectionJSON["properties"].Type != JTokenType.Null)
            {
                section.Properties = (JObject)sectionJSON["properties"];
            }
            section.Fields = GetAllFields(sectionJSON);
            return(section);
        }
Esempio n. 2
0
 /// <summary>
 /// To add the section of the layout based on ZCRMSection class instance.
 /// </summary>
 /// <param name="section">ZCRMSection class instance</param>
 public void AddSection(ZCRMSection section)
 {
     Sections.Add(section);
 }