コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPGroupModelController"/> class.
 /// </summary>
 /// <param name="formItem">The form item.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPGroupModelController(FormItem formItem, IGroupModelControllerDelegate theDelegate)
 {
     this.Delegate                = theDelegate;
     this.FormItem                = formItem;
     this.controllerState         = GroupModelControllerState.Empty;
     this._changedControllerState = true;
     this.RequestOption           = UPRequestOption.FastestAvailable;
     this.RootTabIndex            = -1;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPFieldControlBasedGroupModelController"/> class.
 /// </summary>
 /// <param name="formItem">The form item.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPFieldControlBasedGroupModelController(FormItem formItem, IGroupModelControllerDelegate theDelegate)
     : base(theDelegate)
 {
     this.FormItem               = formItem;
     this.ControllerState        = GroupModelControllerState.Empty;
     this.ChangedControllerState = true;
     this.RequestOption          = UPRequestOption.FastestAvailable;
     this.RootTabIndex           = -1;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPEditFieldGroupModelController"/> class.
 /// </summary>
 /// <param name="fieldControl">
 /// The field control.
 /// </param>
 /// <param name="tabIndex">
 /// Index of the tab.
 /// </param>
 /// <param name="editPageContext">
 /// The edit page context.
 /// </param>
 /// <param name="theDelegate">
 /// The delegate.
 /// </param>
 /// <param name="_editHeader">
 /// if set to <c>true</c> [_edit header].
 /// </param>
 public UPEditFieldGroupModelController(
     FieldControl fieldControl,
     int tabIndex,
     UPEditPageContext editPageContext,
     IGroupModelControllerDelegate theDelegate,
     bool _editHeader = false)
     : base(fieldControl, tabIndex, editPageContext, theDelegate)
 {
     this.editHeader = _editHeader;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="UPActionFormGroupModelController"/> class.
        /// </summary>
        /// <param name="formItem">The form item.</param>
        /// <param name="identifier">The identifier.</param>
        /// <param name="theDelegate">The delegate.</param>
        /// <exception cref="Exception">
        /// Invalid Config Name.
        /// or
        /// Invalid TabIndex.
        /// </exception>
        public UPActionFormGroupModelController(FormItem formItem, IIdentifier identifier, IGroupModelControllerDelegate theDelegate)
            : base(formItem, theDelegate)
        {
            string configName = this.FormItem.ViewReference.ContextValueForKey("Func0");
            IConfigurationUnitStore configStore = ConfigurationUnitStore.DefaultStore;

            this.FieldControl = configStore.FieldControlByNameFromGroup("Edit", configName);
            int tabIndex = 0;

            if (this.FieldControl == null)
            {
                var parts = configName.Split('_');
                if (parts.Length < 2)
                {
                    throw new Exception("Invalid Config Name.");
                }

                this.FieldControl = configStore.FieldControlByNameFromGroup("Edit", parts[0]);
                if (this.FieldControl != null)
                {
                    tabIndex = Convert.ToInt32(parts[1]);
                    if (tabIndex < 0 || tabIndex >= this.FieldControl.NumberOfTabs)
                    {
                        throw new Exception("Invalid TabIndex.");
                    }
                }
            }

            this.enableLinkedEditFields = true;
            this.editFieldDictionary    = new Dictionary <string, UPEditFieldContext>();
            this.TabConfig = this.FieldControl.TabAtIndex(tabIndex);
            Dictionary <string, string> _dependentFieldDictionary = null;

            foreach (UPConfigFieldControlField field in this.TabConfig.Fields)
            {
                string inheritance = field.Attributes.ExtendedOptionForKey("Inherits");
                if (!string.IsNullOrEmpty(field.Function) && inheritance != null)
                {
                    if (_dependentFieldDictionary == null)
                    {
                        _dependentFieldDictionary = new Dictionary <string, string> {
                            { inheritance, field.Function }
                        };
                    }
                    else
                    {
                        _dependentFieldDictionary[inheritance] = field.Function;
                    }
                }
            }

            if (_dependentFieldDictionary != null)
            {
                this.dependentFieldDictionary = _dependentFieldDictionary;
                foreach (string val in _dependentFieldDictionary.Keys)
                {
                    this.AddDependingKey(val);
                }
            }

            this.mustFieldDictionary = new Dictionary <string, string>();
            this.emptyMustFieldCount = -1;
            this.SignalEveryChange   = !ConfigurationUnitStore.DefaultStore.ConfigValueIsSet("Disable.295");
        }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ContactTimesGroupModelController"/> class.
        /// </summary>
        /// <param name="fieldControl">Field Control</param>
        /// <param name="tabIndex">Tab Index</param>
        /// <param name="controllerDelegate">Controller Delegate</param>
        public ContactTimesGroupModelController(FieldControl fieldControl, int tabIndex, IGroupModelControllerDelegate controllerDelegate)
            : base(fieldControl, tabIndex, controllerDelegate)
        {
            var typeParts = this.TabConfig.Type.Split('_');

            this.linkId = -1;
            if (typeParts?.Length > 1)
            {
                this.searchAndListConfigurationName = typeParts[1];
            }

            if (this.searchAndListConfigurationName.Length == 0)
            {
                this.searchAndListConfigurationName = "U001";
            }

            var configStore = ConfigurationUnitStore.DefaultStore;

            this.searchAndList = configStore.SearchAndListByName(this.searchAndListConfigurationName);
            if (this.searchAndList != null)
            {
                this.infoAreaid   = this.searchAndList.InfoAreaId;
                this.fieldControl = configStore.FieldControlByNameFromGroup("List", this.searchAndList.FieldGroupName);
            }
            else
            {
                this.fieldControl = configStore.FieldControlByNameFromGroup("List", this.searchAndListConfigurationName);
            }
        }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPFieldControlBasedGroupModelController"/> class.
 /// </summary>
 /// <param name="fieldControl">The field control.</param>
 /// <param name="tabIndex">Index of the tab.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPMenuGroupModelController(FieldControl fieldControl, int tabIndex, IGroupModelControllerDelegate theDelegate)
     : base(fieldControl, tabIndex, theDelegate)
 {
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="UPEditChildrenGroupModelControllerBase"/> class.
        /// </summary>
        /// <param name="fieldControl">The field control.</param>
        /// <param name="tabIndex">Index of the tab.</param>
        /// <param name="editPageContext">The edit page context.</param>
        /// <param name="theDelegate">The delegate.</param>
        protected UPEditChildrenGroupModelControllerBase(FieldControl fieldControl, int tabIndex,
                                                         UPEditPageContext editPageContext, IGroupModelControllerDelegate theDelegate)
            : base(fieldControl, tabIndex, editPageContext, theDelegate)
        {
            this.AddRecordEnabled    = this.AddRecordEnabledDefault(this.EditPageContext.IsNewRecord);
            this.DeleteRecordEnabled = this.DeleteRecordEnabledDefault;

            string attrValue = fieldControl.ValueForAttribute($"AddRecords_{tabIndex + 1}");

            if (!string.IsNullOrEmpty(attrValue))
            {
                attrValue = fieldControl.ValueForAttribute($"{(editPageContext.IsNewRecord ? @"New" : @"Update")}.AddRecords_{tabIndex + 1}");
            }

            if (!string.IsNullOrEmpty(attrValue))
            {
                this.MaxChildren      = Convert.ToInt32(attrValue);
                this.AddRecordEnabled = this.MaxChildren > 0;
            }

            attrValue = fieldControl.ValueForAttribute($"MaxRecords_{tabIndex + 1}");
            if (!string.IsNullOrEmpty(attrValue))
            {
                attrValue = fieldControl.ValueForAttribute($"{(editPageContext.IsNewRecord ? @"New" : @"Update")}.MaxRecords_{tabIndex + 1}");
            }

            if (!string.IsNullOrEmpty(attrValue))
            {
                this.MinChildren = Convert.ToInt32(attrValue);
            }

            attrValue = fieldControl.ValueForAttribute($"DeleteRecord_{tabIndex + 1}");

            if (!string.IsNullOrEmpty(attrValue))
            {
                this.DeleteRecordEnabled = Convert.ToBoolean(attrValue);
            }

            this._displayIndex = 0;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="UnknownControlGroupModelController"/> class.
 /// </summary>
 /// <param name="formItem">The form item.</param>
 /// <param name="identifier">The identifier.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UnknownControlGroupModelController(FormItem formItem, IIdentifier identifier, IGroupModelControllerDelegate theDelegate)
     : base(theDelegate)
 {
     this.FormItem              = formItem;
     this.ViewReference         = formItem.ViewReference;
     this.ExplicitTabIdentifier = identifier;
     this.ExplicitLabel         = this.FormItem.Label;
 }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPFieldControlBasedGroupModelController"/> class.
 /// </summary>
 /// <param name="formItem">The form item.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPMenuGroupModelController(FormItem formItem, IGroupModelControllerDelegate theDelegate)
     : base(formItem, theDelegate)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPFieldControlBasedGroupModelController"/> class.
 /// </summary>
 /// <param name="theDelegate">The delegate.</param>
 public UPFieldControlBasedGroupModelController(IGroupModelControllerDelegate theDelegate)
     : base(theDelegate)
 {
 }
コード例 #11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UPDocumentGroupModelController"/> class.
        /// </summary>
        /// <param name="_fieldControl">The field control.</param>
        /// <param name="_tabIndex">Index of the tab.</param>
        /// <param name="_theDelegate">The delegate.</param>
        public UPDocumentGroupModelController(FieldControl _fieldControl, int _tabIndex, IGroupModelControllerDelegate _theDelegate)
            : base(_fieldControl, _tabIndex, _theDelegate)
        {
            var typeParts = this.TabConfig.Type.Split('_');

            this.MaxResults = 100;
            if (typeParts.Length > 1)
            {
                bool docSearch = typeParts[0].StartsWith("DOCSEARCH");
                if (docSearch)
                {
                    IConfigurationUnitStore configStore = ConfigurationUnitStore.DefaultStore;
                    if (typeParts.Length > 1)
                    {
                        string searchAndListName = (string)typeParts[1];
                        this.searchAndList = configStore.SearchAndListByName(searchAndListName);
                    }

                    if (typeParts.Length > 2)
                    {
                        this.MaxResults = Convert.ToInt32(typeParts[2]);
                    }
                }
                else
                {
                    if (typeParts.Length > 1)
                    {
                        this.MaxResults = Convert.ToInt32(typeParts[1]);
                    }
                }

                this.ControllerState = GroupModelControllerState.Pending;
                string sendEmailFieldgroup = _fieldControl.ValueForAttribute("documentClientEmailFieldgroup");
                if (sendEmailFieldgroup != null)
                {
                    this._sendEmailFieldgroup = sendEmailFieldgroup;
                }
            }
        }
コード例 #12
0
        /// <summary>
        /// Edits the group model controller for.
        /// </summary>
        /// <param name="fieldControl">The field control.</param>
        /// <param name="tabIndex">Index of the tab.</param>
        /// <param name="editPageContext">The edit page context.</param>
        /// <param name="theDelegate">The delegate.</param>
        /// <returns></returns>
        public static UPGroupModelController EditGroupModelControllerFor(FieldControl fieldControl, int tabIndex,
                                                                         UPEditPageContext editPageContext, IGroupModelControllerDelegate theDelegate)
        {
            var tab     = fieldControl.TabAtIndex(tabIndex);
            var tabType = tab.Type;

            if (tabType.StartsWith("CHILDREN"))
            {
                if (fieldControl.ControlName != "Edit")
                {
                    // CHILDREN only supported in explicit Edit Controls
                    return(null);
                }

                //2019-05-27 Vipul Commented out code for link participants
                //return new EditChildrenGroupModelController(fieldControl, tabIndex, editPageContext, theDelegate);
                return(null);
            }

            if (tabType.StartsWith("REPPARTICIPANTS") || tabType.StartsWith("PARTICIPANTS"))
            {
                return(new UPEditRepParticipantsGroupModelController(fieldControl, tabIndex, editPageContext, theDelegate));
            }

            if (tabType.StartsWith("LINKPARTICIPANTS"))
            {
                //2019-05-27 Vipul Commented out code for link participants
                //return new UPEditLinkParticipantsGroupModelController(fieldControl, tabIndex, editPageContext, theDelegate);
                return(null);
            }

            if (tabType.StartsWith("EDITHEADER"))
            {
                return(new UPEditFieldGroupModelController(fieldControl, tabIndex, editPageContext, theDelegate, true));
            }

            if (fieldControl.ControlName == "Details" && tabType == "GRID")
            {
                // PVCS 81779  Dont ignore Grid groups from Detail
                return(new UPEditFieldGroupModelController(fieldControl, tabIndex, editPageContext, theDelegate));
            }

            if (!string.IsNullOrEmpty(tabType) && tabType != "GRID")
            {
                // ignore other Tab Types
                return(null);
            }

            return(new UPEditFieldGroupModelController(fieldControl, tabIndex, editPageContext, theDelegate));
        }
コード例 #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPFieldControlBasedEditGroupModelController"/> class.
 /// </summary>
 /// <param name="formItem">The form item.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPFieldControlBasedEditGroupModelController(FormItem formItem, IGroupModelControllerDelegate theDelegate)
     : base(formItem, theDelegate)
 {
 }
コード例 #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPFieldControlBasedEditGroupModelController"/> class.
 /// </summary>
 /// <param name="fieldControl">The field control.</param>
 /// <param name="tabIndex">Index of the tab.</param>
 /// <param name="editPageContext">The edit page context.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPFieldControlBasedEditGroupModelController(FieldControl fieldControl, int tabIndex, UPEditPageContext editPageContext, IGroupModelControllerDelegate theDelegate)
     : base(fieldControl, tabIndex, theDelegate)
 {
     this.EditPageContext = editPageContext;
 }
 public UPDetailsFieldGroupModelController(FormItem formItem, IIdentifier identifier, IGroupModelControllerDelegate theDelegate)
     : base(formItem, theDelegate)
 {
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="UPDetailsFieldGroupModelController"/> class.
        /// </summary>
        /// <param name="fieldControl">The field control.</param>
        /// <param name="tabIndex">Index of the tab.</param>
        /// <param name="theDelegate">The delegate.</param>
        public UPDetailsFieldGroupModelController(FieldControl fieldControl, int tabIndex, IGroupModelControllerDelegate theDelegate)
            : base(fieldControl, tabIndex, theDelegate)
        {
            var tab     = fieldControl.TabAtIndex(tabIndex);
            var tabType = tab?.Type;

            this.columnStyle = tabType == "GRID";
        }
        /// <summary>
        /// Detailses the group model controller for control tab index the delegate.
        /// </summary>
        /// <param name="fieldControl">The field control.</param>
        /// <param name="tabIndex">Index of the tab.</param>
        /// <param name="theDelegate">The delegate.</param>
        /// <returns></returns>
        public static UPFieldControlBasedGroupModelController DetailsGroupModelControllerForFieldControl(
            FieldControl fieldControl, int tabIndex, IGroupModelControllerDelegate theDelegate)
        {
            var tab     = fieldControl.TabAtIndex(tabIndex);
            var tabType = tab.Type;

            if (tabType.StartsWith("IGNORE"))
            {
                return(new UPFieldControlBasedGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("PARTICIPANTS"))
            {
                return(new UPParticipantsGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("CHILDREN"))
            {
                return(new ChildListGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("MAP"))
            {
                return(new UPMapGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("MULTIMAP"))
            {
                return(new ChildMultiMapGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("PARENT"))
            {
                return(new UPParentDetailsGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("DOCFIELDS"))
            {
                return(new UPDocumentFieldGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("DOCSEARCH"))
            {
                return(new UPDocumentGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("DOCUMENTS"))
            {
                if (fieldControl.TabAtIndex(tabIndex).NumberOfFields > 0)
                {
                    return(new UPDocumentFieldGroupModelController(fieldControl, tabIndex, theDelegate));
                }

                return(new UPDocumentGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("DOC"))
            {
                return(new UPDocumentGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("CHARACTERISTICS"))
            {
                return(new UPCharacteristicsGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("MENU"))
            {
                return(new UPMenuGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("WEBCONTENT"))
            {
                return(new UPWebContentGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("INSIGHTBOARDH"))
            {
                return(new UPInsightBoardGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("INSIGHTBOARDV2"))
            {
                return(new UPInsightBoardGroupModelController(fieldControl, tabIndex, theDelegate, false));
            }

            if (tabType.StartsWith("INSIGHTBOARDV"))
            {
                return(new UPInsightBoardGroupModelController(fieldControl, tabIndex, theDelegate, false, true));
            }

            if (tabType.StartsWith("INSIGHTBOARD"))
            {
                return(new UPInsightBoardGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("CONTACTTIMES"))
            {
                return(new ContactTimesGroupModelController(fieldControl, tabIndex, theDelegate));
            }
#if PORTING
            if (tabType.StartsWith("QUERY"))
            {
                return(new UPQueryListResultGroupModelController(fieldControl, tabIndex, theDelegate));
            }

            if (tabType.StartsWith("ANALYSIS"))
            {
                return(new UPAnalysisListResultGroupModelController(fieldControl, tabIndex, theDelegate));
            }
#endif
            return(new UPDetailsFieldGroupModelController(fieldControl, tabIndex, theDelegate));
        }
コード例 #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPFieldControlBasedGroupModelController"/> class.
 /// </summary>
 /// <param name="formItem">The form item.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPDocumentFieldGroupModelController(FormItem formItem, IGroupModelControllerDelegate theDelegate)
     : base(formItem, theDelegate)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPMultiMapGroupModelController"/> class.
 /// </summary>
 /// <param name="formItem">
 /// The form item.
 /// </param>
 /// <param name="identifier">
 /// The identifier.
 /// </param>
 /// <param name="controllerDelegate">
 /// The controller delegate.
 /// </param>
 public UPMultiMapGroupModelController(FormItem formItem, IIdentifier identifier, IGroupModelControllerDelegate controllerDelegate)
     : base(formItem, identifier, controllerDelegate)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPEditChildrenGroupModelControllerBase"/> class.
 /// </summary>
 /// <param name="fieldControl">The field control.</param>
 /// <param name="tabIndex">Index of the tab.</param>
 /// <param name="theDelegate">The delegate.</param>
 protected UPEditChildrenGroupModelControllerBase(FieldControl fieldControl, int tabIndex, IGroupModelControllerDelegate theDelegate)
     : base(fieldControl, tabIndex, theDelegate)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPFieldControlBasedGroupModelController"/> class.
 /// </summary>
 /// <param name="fieldControl">The field control.</param>
 /// <param name="tabIndex">Index of the tab.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPFieldControlBasedGroupModelController(FieldControl fieldControl, int tabIndex, IGroupModelControllerDelegate theDelegate)
     : base(theDelegate)
 {
     this.FieldControlConfig = fieldControl;
     this.TabIndex           = tabIndex;
     this.TabConfig          = this.FieldControlConfig.TabAtIndex(tabIndex);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPMultiMapGroupModelController"/> class.
 /// </summary>
 /// <param name="searchAndListConfigurationName">Name of the search and list configuration.</param>
 /// <param name="linkId">The link identifier.</param>
 /// <param name="headerSwipeEnabled">if set to <c>true</c> [header swipe enabled].</param>
 /// <param name="cellStyleAsString">The cell style as string.</param>
 /// <param name="disablePaging">if set to <c>true</c> [disable paging].</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPMultiMapGroupModelController(string searchAndListConfigurationName, int linkId, bool headerSwipeEnabled,
                                       string cellStyleAsString, bool disablePaging, IGroupModelControllerDelegate theDelegate)
     : base(searchAndListConfigurationName, linkId, headerSwipeEnabled, cellStyleAsString, disablePaging, theDelegate)
 {
 }
コード例 #23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPFieldControlBasedGroupModelController"/> class.
 /// </summary>
 /// <param name="theDelegate">The delegate.</param>
 public UPDocumentFieldGroupModelController(IGroupModelControllerDelegate theDelegate)
     : base(theDelegate)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPParticipantsGroupModelController"/> class.
 /// </summary>
 /// <param name="fieldControl">The field control.</param>
 /// <param name="tabIndex">Index of the tab.</param>
 /// <param name="editPageContext">The edit page context.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPParticipantsGroupModelController(FieldControl fieldControl, int tabIndex,
                                           UPEditPageContext editPageContext, IGroupModelControllerDelegate theDelegate)
     : base(fieldControl, tabIndex, editPageContext, theDelegate)
 {
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="UPCharacteristicsGroupModelController"/> class.
        /// </summary>
        /// <param name="fieldControl">The field control.</param>
        /// <param name="tabIndex">Index of the tab.</param>
        /// <param name="theDelegate">The delegate.</param>
        public UPCharacteristicsGroupModelController(FieldControl fieldControl, int tabIndex, IGroupModelControllerDelegate theDelegate)
            : base(fieldControl, tabIndex, theDelegate)
        {
            var typeParts = this.TabConfig.Type.Split('_');

            if (typeParts.Length > 1)
            {
                if (typeParts[0] == "CHARACTERISTICS")
                {
                    this.CharacteristicsSearchAndListName = typeParts[1];
                }
                else if (typeParts[0] == "CHARACTERISTICSCONTEXT")
                {
                    this.CharacteristicsContext = typeParts[1];
                }
            }
            else if (this.TabConfig.Fields.Count > 0)
            {
                this.CharacteristicsFieldControl = fieldControl.FieldControlWithSingleTab(tabIndex, this.TabConfig.Fields[0].InfoAreaId);
            }
            else
            {
                this.CharacteristicsSearchAndListName = "IT";
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="UPParticipantsGroupModelController"/> class.
 /// </summary>
 /// <param name="fieldControl">The field control.</param>
 /// <param name="tabIndex">Index of the tab.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPParticipantsGroupModelController(FieldControl fieldControl, int tabIndex, IGroupModelControllerDelegate theDelegate)
     : base(fieldControl, tabIndex, theDelegate)
 {
 }
コード例 #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPFieldControlBasedGroupModelController"/> class.
 /// </summary>
 /// <param name="theDelegate">The delegate.</param>
 public UPMenuGroupModelController(IGroupModelControllerDelegate theDelegate)
     : base(theDelegate)
 {
 }
コード例 #28
0
 public UPActionGroupModelController(FormItem _formItem, IIdentifier identifier, IGroupModelControllerDelegate _theDelegate) : base(_theDelegate)
 {
     this._identifier = identifier;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="UPParentDetailsGroupModelController"/> class.
        /// </summary>
        /// <param name="fieldControl">The field control.</param>
        /// <param name="tabIndex">Index of the tab.</param>
        /// <param name="theDelegate">The delegate.</param>
        public UPParentDetailsGroupModelController(FieldControl fieldControl, int tabIndex, IGroupModelControllerDelegate theDelegate)
            : base(fieldControl, tabIndex, theDelegate)
        {
            var typeParts = this.TabConfig.Type.Split('_');
            IConfigurationUnitStore configStore = ConfigurationUnitStore.DefaultStore;

            if (typeParts.Length > 1)
            {
                string fieldGroupName;
                var    configParts = ((string)typeParts[1]).Split('#');
                if (configParts.Length > 1)
                {
                    fieldGroupName = configParts[0];
                    this.LinkId    = Convert.ToInt32(configParts[1]);
                }
                else
                {
                    fieldGroupName = (string)typeParts[1];
                    this.LinkId    = -1;
                }

                int parentTabIndex;
                if (typeParts.Length > 2)
                {
                    parentTabIndex = Convert.ToInt32(typeParts[2]);
                    if (parentTabIndex >= 1)
                    {
                        parentTabIndex--;
                    }
                }
                else
                {
                    parentTabIndex = 0;
                }

                this.ParentFieldControl = configStore.FieldControlByNameFromGroup("Details", fieldGroupName);
                if (this.ParentFieldControl.NumberOfTabs <= parentTabIndex || parentTabIndex < 0)
                {
                    parentTabIndex = 0;
                }

                this.ParentFieldControl             = this.ParentFieldControl.FieldControlWithSingleTab(parentTabIndex);
                this.ParentController               = DetailsGroupModelController(this.ParentFieldControl, 0, this);
                this.ParentController.RootTabIndex  = this.RootTabIndex;
                this.ParentController.ExplicitLabel = this.TabLabel;
            }
            else
            {
                this.LinkFields = fieldControl.TabAtIndex(tabIndex).Fields;
            }
        }
コード例 #30
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UPCalendarGroupModelController"/> class.
        /// </summary>
        /// <param name="formItem">The form item.</param>
        /// <param name="identifier">The identifier.</param>
        /// <param name="theDelegate">The delegate.</param>
        public UPCalendarGroupModelController(FormItem formItem, IIdentifier identifier, IGroupModelControllerDelegate theDelegate)
            : base(theDelegate)
        {
            this.FormItem = formItem;

            this.ExplicitTabIdentifier = identifier;

            if (formItem.Options?.ContainsKey(@"OutputRange") == true && Convert.ToInt32(formItem.Options[@"OutputRange"]) != 0)
            {
                this.OutputDateRange = true;
            }

            string _currentValue = null;

            if (!string.IsNullOrEmpty(formItem.ValueName))
            {
                _currentValue = this.Delegate.GroupModelControllerValueForKey(this, "$" + formItem.ValueName);
            }

            if (!string.IsNullOrEmpty(_currentValue))
            {
                this.CurrentDateString = _currentValue;
            }
            else
            {
                this.CurrentDateString = formItem.ViewReference.ContextValueForKey(@"Date");

                if (string.IsNullOrEmpty(this.CurrentDateString))
                {
                    this.CurrentDateString = StringExtensions.CrmValueFromDate(DateTime.Now);

                    if (this.OutputDateRange)
                    {
                        this.CurrentDateString = string.Format("{0};{0}", this.CurrentDateString);
                    }
                }
                else
                {
                    this.CurrentDateString = this.CurrentDateString.ReplaceDateVariables();
                }
            }
        }