Пример #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")
     };
 }
 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")
     };
 }