コード例 #1
0
        /// <summary>
        /// P6s the log on.
        /// </summary>
        /// <returns>P6AuthenticationService.</returns>
        public P6AuthenticationService P6LogOn()
        {
            var retValue = new P6AuthenticationService();

            //
            // If we don't have a global P6
            //
            if (Program.P6WebServicesLogin == null)
            {
                retValue = new P6AuthenticationService(P6WebServiceInfo.HostName, P6WebServiceInfo.HostPort);
            }

            //
            // Check to see if we need to login.
            //
            if (!retValue.IsLoggedOn)
            {
                retValue.Login(P6WebServiceInfo.UserName, P6WebServiceInfo.Password);
            }
            //
            // TODO check if session is still valid
            //
            Program.P6WebServicesLogin = retValue;
            return(retValue);
        }
コード例 #2
0
 public P6ProjectCodeService(P6AuthenticationService authenticationService)
 {
     _projectCodeService = new ProjectCodeService
     {
         CookieContainer = authenticationService.CookieContainer,
         Url             = authenticationService.AuthService.Url.Replace("AuthenticationService", "ProjectCodeService")
     };
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="P6UserService"/> class.
 /// </summary>
 /// <param name="authenticationService">The authentication service.</param>
 public P6UserService(P6AuthenticationService authenticationService)
 {
     UserService = new UserService
     {
         CookieContainer = authenticationService.CookieContainer,
         Url             = authenticationService.AuthService.Url.Replace("AuthenticationService", "UserService")
     };
 }
コード例 #4
0
 public P6UdfValueService(P6AuthenticationService authenticationService)
 {
     _udfValueService = new UDFValueService
     {
         CookieContainer = authenticationService.CookieContainer,
         Url             = authenticationService.AuthService.Url.Replace("AuthenticationService", "UDFValueService")
     };
 }
コード例 #5
0
 public P6SpreadService(P6AuthenticationService authenticationService)
 {
     SpreadService = new SpreadService
     {
         CookieContainer = authenticationService.CookieContainer,
         Url             = authenticationService.AuthService.Url.Replace("AuthenticationService", "SpreadService")
     };
 }
コード例 #6
0
 public P6EpsService(P6AuthenticationService authenticationService)
 {
     _epsService = new EPSService
     {
         CookieContainer = authenticationService.CookieContainer,
         Url             = authenticationService.AuthService.Url.Replace("AuthenticationService", "EPSService")
     };
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="P6WbsService"/> class.
 /// </summary>
 /// <param name="authenticationService">The authentication service.</param>
 public P6WbsService(P6AuthenticationService authenticationService)
 {
     WbsService = new WBSService
     {
         CookieContainer = authenticationService.CookieContainer,
         Url             = authenticationService.AuthService.Url.Replace("AuthenticationService", "WBSService")
     };
 }
コード例 #8
0
 public P6ActivityExpenseService(P6AuthenticationService authenticationService)
 {
     Filter = String.Empty;
     _activityExpenseService = new ActivityExpenseService
     {
         CookieContainer = authenticationService.CookieContainer,
         Url             = authenticationService.AuthService.Url.Replace("AuthenticationService", "ActivityExpenseService")
     };
 }
コード例 #9
0
 public P6ResourceAssignmentService(P6AuthenticationService authenticationService)
 {
     Filter = String.Empty;
     _resourceAssignmentService = new ResourceAssignmentService
     {
         CookieContainer = authenticationService.CookieContainer,
         Url             = authenticationService.AuthService.Url.Replace("AuthenticationService", "ResourceAssignmentService")
     };
 }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="P6ProjectBudgetChangeLogService"/> class.
 /// </summary>
 /// <param name="authenticationService">The authentication service.</param>
 public P6ProjectBudgetChangeLogService(P6AuthenticationService authenticationService)
 {
     Filter = String.Empty;
     _projectBudgetChangeLogService = new ProjectBudgetChangeLogService
     {
         CookieContainer = authenticationService.CookieContainer,
         Url             = authenticationService.AuthService.Url.Replace("AuthenticationService", "ProjectBudgetChangeLogService")
     };
 }