コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPCRMMutableParticipants"/> class.
 /// </summary>
 /// <param name="viewReference">The view reference.</param>
 /// <param name="rootInfoAreaId">The root information area identifier.</param>
 /// <param name="recordIdentification">The record identification.</param>
 /// <param name="linkParticipantsInfoAreaId">The link participants information area identifier.</param>
 /// <param name="linkParticipantsLinkId">The link participants link identifier.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPCRMMutableParticipants(ViewReference viewReference, string rootInfoAreaId, string recordIdentification,
                                 string linkParticipantsInfoAreaId, int linkParticipantsLinkId, UPCRMParticipantsDelegate theDelegate)
     : base(viewReference, rootInfoAreaId, linkParticipantsInfoAreaId, linkParticipantsLinkId, recordIdentification, theDelegate)
 {
     this.mutableLinkParticipantArray = new List <UPCRMLinkParticipant>();
     this.mutableRepParticipantArray  = new List <UPCRMRepParticipant>();
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPCRMRecordParticipants" /> class.
 /// </summary>
 /// <param name="recordIdentification">The record identification.</param>
 /// <param name="linkParticipantsSearchAndListName">Name of the link participants search and list.</param>
 /// <param name="linkParticipantsLinkId">The link participants link identifier.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPCRMRecordParticipants(string recordIdentification, string linkParticipantsSearchAndListName,
                                int linkParticipantsLinkId, UPCRMParticipantsDelegate theDelegate)
     : this(null, null, linkParticipantsSearchAndListName, linkParticipantsLinkId, recordIdentification, theDelegate)
 {
 }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UPCRMRecordParticipants"/> class.
        /// </summary>
        /// <param name="viewReference">The view reference.</param>
        /// <param name="rootInfoAreaId">The root information area identifier.</param>
        /// <param name="linkParticipantsSearchAndListName">Name of the link participants search and list.</param>
        /// <param name="linkParticipantsLinkId">The link participants link identifier.</param>
        /// <param name="recordIdentification">The record identification.</param>
        /// <param name="theDelegate">The delegate.</param>
        public UPCRMRecordParticipants(ViewReference viewReference, string rootInfoAreaId, string linkParticipantsSearchAndListName,
                                       int linkParticipantsLinkId, string recordIdentification, UPCRMParticipantsDelegate theDelegate)
            : base(viewReference, rootInfoAreaId, recordIdentification, null, linkParticipantsLinkId, theDelegate)
        {
            this.LinkParticipantsRequestOption = UPCRMDataStore.RequestOptionFromString(
                this.ViewReference?.ContextValueForKey("LinkParticipantsRequestOption"), UPRequestOption.FastestAvailable);

            this.LinkParticipantsSearchAndListName = linkParticipantsSearchAndListName;
        }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPCRMRecordParticipants"/> class.
 /// </summary>
 /// <param name="recordIdentification">The record identification.</param>
 /// <param name="theDelegate">The delegate.</param>
 public UPCRMRecordParticipants(string recordIdentification, UPCRMParticipantsDelegate theDelegate)
     : this(null, null, null, -1, recordIdentification, theDelegate)
 {
 }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UPCRMParticipants"/> class.
        /// </summary>
        /// <param name="viewReference">The view reference.</param>
        /// <param name="rootInfoAreaId">The root information area identifier.</param>
        /// <param name="linkParticipantsInfoAreaId">The link participants information area identifier.</param>
        /// <param name="linkParticipantsLinkId">The link participants link identifier.</param>
        /// <param name="recordIdentification">The record identification.</param>
        /// <param name="theDelegate">The delegate.</param>
        public UPCRMParticipants(ViewReference viewReference, string rootInfoAreaId, string linkParticipantsInfoAreaId, int linkParticipantsLinkId, string recordIdentification, UPCRMParticipantsDelegate theDelegate)
        {
            this.RecordIdentification = recordIdentification;
            this.TheDelegate          = theDelegate;

            this.RootInfoAreaId = rootInfoAreaId ?? recordIdentification.InfoAreaId();

            if (string.IsNullOrEmpty(this.RootInfoAreaId))
            {
                this.RootInfoAreaId = "MA";
            }

            this.linkParticipantsInfoAreaId = linkParticipantsInfoAreaId;
            this.linkParticipantsLinkId     = linkParticipantsLinkId;

            if (viewReference == null)
            {
                Menu menu = ConfigurationUnitStore.DefaultStore.MenuByName($"Configuration:{this.RootInfoAreaId}Participants");
                this.ViewReference = menu?.ViewReference;
            }
            else
            {
                this.ViewReference = viewReference;
            }

            this.RepParticipantsRequestOption = UPCRMDataStore.RequestOptionFromString(this.ViewReference?.ContextValueForKey("RepAcceptanceRequestOption"), UPRequestOption.FastestAvailable);
            this.AcceptanceFieldId            = -1;
            string configName = this.ViewReference?.ContextValueForKey("RepAcceptanceConfigName");

            if (!string.IsNullOrEmpty(configName))
            {
                IConfigurationUnitStore configStore   = ConfigurationUnitStore.DefaultStore;
                SearchAndList           searchAndList = configStore.SearchAndListByName(configName);

                if (!string.IsNullOrEmpty(searchAndList.FieldGroupName))
                {
                    configName = searchAndList.FieldGroupName;
                }

                FieldControl fieldControl = configStore.FieldControlByNameFromGroup("Edit", configName) ??
                                            configStore.FieldControlByNameFromGroup("List", configName);

                if (fieldControl != null)
                {
                    UPConfigFieldControlField field = fieldControl.FieldWithFunction(Constants.UPRepAcceptanceFunctionName_Acceptance);
                    if (field != null)
                    {
                        this.AcceptanceFieldId = field.FieldId;
                    }

                    this.RepAcceptanceInfoAreaId = fieldControl.InfoAreaId;
                }
            }
        }