Ejemplo n.º 1
0
        /// <summary>
        /// References to the rest of the topmost level of the other Petra Module Namespaces will go here
        /// </summary>
        /// <returns>void</returns>
        public TRemote(IClientManagerInterface AClientManager,
                       IMCommonNamespace ACommonObject,
                       IMConferenceNamespace AConferenceObject,
                       IMPartnerNamespace APartnerObject,
                       IMPersonnelNamespace APersonnelObject,
                       IMFinanceNamespace AFinanceObject,
                       IMReportingNamespace AReportingObject,
                       IMSysManNamespace ASysManObject)
            : base(AClientManager)
        {
            USysManObject     = ASysManObject;
            UConferenceObject = AConferenceObject;
            UPartnerObject    = APartnerObject;
            UCommonObject     = ACommonObject;
            UPersonnelObject  = APersonnelObject;
            UFinanceObject    = AFinanceObject;
            UReportingObject  = AReportingObject;

            FRemoteObjects.Add((MarshalByRefObject)USysManObject);
            FRemoteObjects.Add((MarshalByRefObject)UConferenceObject);
            FRemoteObjects.Add((MarshalByRefObject)UPartnerObject);
            FRemoteObjects.Add((MarshalByRefObject)UCommonObject);
            FRemoteObjects.Add((MarshalByRefObject)UPersonnelObject);
            FRemoteObjects.Add((MarshalByRefObject)UFinanceObject);
            FRemoteObjects.Add((MarshalByRefObject)UReportingObject);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// todoComment
        /// </summary>
        /// <param name="AUserName"></param>
        /// <param name="APassword"></param>
        /// <param name="AProcessID"></param>
        /// <param name="AWelcomeMessage"></param>
        /// <param name="ASystemEnabled"></param>
        /// <param name="AError"></param>
        /// <returns></returns>
        public bool ConnectToServer(String AUserName,
                                    String APassword,
                                    out Int32 AProcessID,
                                    out String AWelcomeMessage,
                                    out Boolean ASystemEnabled,
                                    out String AError)
        {
            IPrincipal LocalUserInfo;

            if (!ConnectToServer(AUserName, APassword, out AProcessID, out AWelcomeMessage, out ASystemEnabled, out AError, out LocalUserInfo))
            {
                return(false);
            }

            Ict.Petra.Shared.UserInfo.GUserInfo = (TPetraPrincipal)LocalUserInfo;

            FRemoteConferenceObjects = (IMConferenceNamespace)FConnector.GetRemoteObject(FRemotingURL_MConference, typeof(IMConferenceNamespace));
            FRemotePersonnelObjects  = (IMPersonnelNamespace)FConnector.GetRemoteObject(FRemotingURL_MPersonnel, typeof(IMPersonnelNamespace));
            FRemoteCommonObjects     = (IMCommonNamespace)FConnector.GetRemoteObject(FRemotingURL_MCommon, typeof(IMCommonNamespace));
            FRemotePartnerObjects    = (IMPartnerNamespace)FConnector.GetRemoteObject(FRemotingURL_MPartner, typeof(IMPartnerNamespace));
            FRemoteFinanceObjects    = (IMFinanceNamespace)FConnector.GetRemoteObject(FRemotingURL_MFinance, typeof(IMFinanceNamespace));
            FRemoteReportingObjects  = (IMReportingNamespace)FConnector.GetRemoteObject(FRemotingURL_MReporting, typeof(IMReportingNamespace));
            FRemoteSysManObjects     = (IMSysManNamespace)FConnector.GetRemoteObject(FRemotingURL_MSysMan, typeof(IMSysManNamespace));

            //
            // initialise object that holds references to all our remote object .NET Remoting Proxies
            //
            FRemote = new TRemote(FClientManager,
                                  FRemoteCommonObjects,
                                  FRemoteConferenceObjects,
                                  FRemotePartnerObjects,
                                  FRemotePersonnelObjects,
                                  FRemoteFinanceObjects,
                                  FRemoteReportingObjects,
                                  FRemoteSysManObjects);

            return(true);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// todoComment
        /// </summary>
        /// <param name="AUserName"></param>
        /// <param name="APassword"></param>
        /// <param name="AProcessID"></param>
        /// <param name="AWelcomeMessage"></param>
        /// <param name="ASystemEnabled"></param>
        /// <param name="AError"></param>
        /// <returns></returns>
        public bool ConnectToServer(String AUserName,
            String APassword,
            out Int32 AProcessID,
            out String AWelcomeMessage,
            out Boolean ASystemEnabled,
            out String AError)
        {
            IPrincipal LocalUserInfo;

            if (!ConnectToServer(AUserName, APassword, out AProcessID, out AWelcomeMessage, out ASystemEnabled, out AError, out LocalUserInfo))
            {
                return false;
            }

            Ict.Petra.Shared.UserInfo.GUserInfo = (TPetraPrincipal)LocalUserInfo;

            FRemoteConferenceObjects = (IMConferenceNamespace)FConnector.GetRemoteObject(FRemotingURL_MConference, typeof(IMConferenceNamespace));
            FRemotePersonnelObjects = (IMPersonnelNamespace)FConnector.GetRemoteObject(FRemotingURL_MPersonnel, typeof(IMPersonnelNamespace));
            FRemoteCommonObjects = (IMCommonNamespace)FConnector.GetRemoteObject(FRemotingURL_MCommon, typeof(IMCommonNamespace));
            FRemotePartnerObjects = (IMPartnerNamespace)FConnector.GetRemoteObject(FRemotingURL_MPartner, typeof(IMPartnerNamespace));
            FRemoteFinanceObjects = (IMFinanceNamespace)FConnector.GetRemoteObject(FRemotingURL_MFinance, typeof(IMFinanceNamespace));
            FRemoteReportingObjects = (IMReportingNamespace)FConnector.GetRemoteObject(FRemotingURL_MReporting, typeof(IMReportingNamespace));
            FRemoteSysManObjects = (IMSysManNamespace)FConnector.GetRemoteObject(FRemotingURL_MSysMan, typeof(IMSysManNamespace));

            //
            // initialise object that holds references to all our remote object .NET Remoting Proxies
            //
            FRemote = new TRemote(FClientManager,
                FRemoteCommonObjects,
                FRemoteConferenceObjects,
                FRemotePartnerObjects,
                FRemotePersonnelObjects,
                FRemoteFinanceObjects,
                FRemoteReportingObjects,
                FRemoteSysManObjects);

            return true;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// References to the rest of the topmost level of the other Petra Module Namespaces will go here
        /// </summary>
        /// <returns>void</returns>
        public TRemote(IClientManagerInterface AClientManager,
            IMCommonNamespace ACommonObject,
            IMConferenceNamespace AConferenceObject,
            IMPartnerNamespace APartnerObject,
            IMPersonnelNamespace APersonnelObject,
            IMFinanceNamespace AFinanceObject,
            IMReportingNamespace AReportingObject,
            IMSysManNamespace ASysManObject)
            : base(AClientManager)
        {
            USysManObject = ASysManObject;
            UConferenceObject = AConferenceObject;
            UPartnerObject = APartnerObject;
            UCommonObject = ACommonObject;
            UPersonnelObject = APersonnelObject;
            UFinanceObject = AFinanceObject;
            UReportingObject = AReportingObject;

            FRemoteObjects.Add((MarshalByRefObject)USysManObject);
            FRemoteObjects.Add((MarshalByRefObject)UConferenceObject);
            FRemoteObjects.Add((MarshalByRefObject)UPartnerObject);
            FRemoteObjects.Add((MarshalByRefObject)UCommonObject);
            FRemoteObjects.Add((MarshalByRefObject)UPersonnelObject);
            FRemoteObjects.Add((MarshalByRefObject)UFinanceObject);
            FRemoteObjects.Add((MarshalByRefObject)UReportingObject);
        }