示例#1
0
        private DLBase GetDLObject(DESettings settings, Dictionary <string, string> filters = null)
        {
            string listName    = settings.ListName;
            DLBase defaultList = DMFactory.GetDLObject(listName, settings, filters);

            return(defaultList);
        }
示例#2
0
 //Verify Function and selectedTable through reflection find BaseVersion is enabled, if yes see if *ALL exists, if no return False and display Error
 /// <summary>
 /// XML Comment
 /// </summary>
 /// <param name="tableName"></param>
 /// <param name="defaultNames"></param>
 /// <returns></returns>
 /// <remarks></remarks>
 public string[] GetMasterConfigIds(string tableName, string[] defaultNames)
 {
     if (bool.Parse(DMFactory.IsBaseDefinitionEnabled(tableName)))
     {
         Dictionary <string, string> variableKeyValues = DMFactory.GetVariableKeyValues(tableName);
         string masterVK1 = string.Empty;
         string masterVK2 = string.Empty;
         string masterVK3 = string.Empty;
         string masterVK4 = string.Empty;
         foreach (var key in variableKeyValues.Keys)
         {
             bool value = System.Convert.ToBoolean(variableKeyValues[key]);
             if ((string)key == "VariableKey1Active")
             {
                 if (value)
                 {
                     masterVK1 = VALUE_ALL;
                 }
             }
             else if ((string)key == "VariableKey2Active")
             {
                 if (value)
                 {
                     masterVK2 = VALUE_ALL;
                 }
             }
             else if ((string)key == "VariableKey3Active")
             {
                 if (value)
                 {
                     masterVK3 = VALUE_ALL;
                 }
             }
             else if ((string)key == "VariableKey4Active")
             {
                 if (value)
                 {
                     masterVK4 = VALUE_ALL;
                 }
             }
         }
         return(GetMasterConfigurations(tableName, defaultNames));
     }
     return(null);
 }
示例#3
0
            protected override void RetrieveData()
            {
                System.Collections.Generic.List <ModuleEntity> entities = DMFactory.GetModuleEntities();
                System.Collections.Generic.List <DEListDetail> data     = new System.Collections.Generic.List <DEListDetail>();
                DEListDetail listDetail = default(DEListDetail);

                foreach (ModuleEntity entity in entities)
                {
                    listDetail = new DEListDetail(new string[] { entity.Title }, new string[] { });
                    if (entity.Type == ModuleType.List)
                    {
                        listDetail.SelectURL = string.Format(DefaultListURL, entity.Name, "{1}");
                    }
                    else
                    {
                        listDetail.SelectURL = string.Format(SystemDefaultURL, entity.Name, "{1}");
                    }
                    data.Add(listDetail);
                }
                DEList.Data          = data;
                DEList.BusinessUnits = Utilities.GetBusinessUnits(settings);
            }
示例#4
0
            public void Initialise(List <RequestData> requestDataList = null)
            {
                dataModuleObj = DMFactory.GetDMObject(settings);
                PrepareCommonHiddenFields();
                BaseFieldModel model       = null;
                object         fieldType   = null;
                int            i           = 0;
                string         key         = null;
                RequestData    requestData = null;

                // clear all tabs
                Tabs.Clear();
                // set default tab orientation
                DefaultTabType = dataModuleObj.DefaultTabType;
                foreach (var mConfig in dataModuleObj.MConfigs)
                {
                    fieldType = mConfig.FieldType;
                    //get the matching requested data
                    if (!(requestDataList == null))
                    {
                        requestData = requestDataList.Find(x => x.FieldName == (mConfig.ConfigurationItem.DefaultName + mConfig.UniqueId) && x.TableName == mConfig.ConfigurationItem.TableName);
                        if (requestData != null)
                        {
                            string updatedValue = requestData.UpdatedValue;
                            setUpdatedValue(mConfig, updatedValue);
                        }
                    }
                    model = null;
                    //Dim pageTexts As Dictionary(Of String, String) = settings.PageTexts
                    switch ((DataType)fieldType)
                    {
                    case DataType.TEXT:
                        model = new TextBoxFieldModel(i, mConfig);
                        break;

                    case DataType.TEXTAREA:
                        model = new TextAreaFieldModel(i, mConfig);
                        break;

                    case DataType.DROPDOWN:
                        model = new DropdownFieldModel(i, mConfig);
                        break;

                    case DataType.BOOL:
                    case DataType.BOOL_10:
                    case DataType.BOOL_YN:
                        model = new BooleanFieldModel(i, mConfig);
                        break;

                    case DataType.LABEL:
                        model = new LabelFieldModel(i, mConfig);
                        break;
                    }
                    key = mConfig.TabHeader;
                    if (model != null)
                    {
                        if (!Tabs.ContainsKey(key))
                        {
                            Tabs.Add(key, new TabContentModel(key, i == 0 ? true : false));
                        }
                        Tabs[key].Add(model);
                    }
                    i++;
                }
                BackURL = dataModuleObj.BackUrl();
            }