Example #1
0
		private void OnLoadUser_Completed(LoadUserOperation operation) {
			Logger.info("Пользователь авторизовался в клиенте");
			hasUser = true;
			if (hasRoot) {
				(this.RootVisual as MainPage).startLoad();
			}
		}
Example #2
0
        private void LoadUser_Completed(LoadUserOperation operation)
        {
            if (!operation.User.Identity.IsAuthenticated)
            {
                this.RootVisual = new MainLogin();
            }
            else
            {
                UserInfo = new UserInfo();
                ProductManager.Web.User lUser = operation.User.Identity as ProductManager.Web.User;
                UserInfo.UserName       = lUser.UserName;
                UserInfo.UserAction     = lUser.RightDictionary;
                UserInfo.UserDepartment = lUser.Department;
                UserInfo.UserID         = lUser.UserID;
                UserInfo.DepartmentID   = lUser.DepartmentID;
                UserInfo.UserPassword   = lUser.Password;
                UserInfo.IsManager      = lUser.IsManager;

                //InstanceContext context = new InstanceContext(LogonPersionCallBack);
                //IOnLinePersionService sc = new ProductManager.Web.OnLinePersionServiceContext(context);
                //sc.LogonPersion(UserInfo.UserID, UserInfo.UserName);
                LogonUser(UserInfo.UserID, UserInfo.UserName);
                this.RootVisual = new MainPage();
            }
        }
Example #3
0
		private void OnLoadUserCompleted(LoadUserOperation operation)
		{
			string errorStatus = operation.CheckErrorStatus();
			if (errorStatus != null)
				return;

			UpdateLastUserName();
		}
Example #4
0
 /// <summary>
 /// Invoked when the <see cref="LoadUserOperation"/> completes.
 /// Use this event handler to switch from the "loading UI" you created in <see cref="InitializeRootVisual"/> to the "application UI".
 /// </summary>
 private void Application_UserLoaded(LoadUserOperation operation)
 {
     if (operation.HasError)
     {
         ErrorWindow.CreateNew(operation.Error);
         operation.MarkErrorAsHandled();
     }
 }
 /// <summary>
 /// Invoked when the <see cref="LoadUserOperation"/> completes.
 /// Use this event handler to switch from the "loading UI" you created in <see cref="InitializeRootVisual"/> to the "application UI".
 /// </summary>
 private void Application_UserLoaded(LoadUserOperation operation)
 {
     if (operation.HasError)
     {
         ErrorWindow.CreateNew(operation.Error);
         operation.MarkErrorAsHandled();
     }
 }
Example #6
0
 private void OnLoadUser_Completed(LoadUserOperation operation)
 {
     Logger.info("Пользователь авторизовался в клиенте");
     hasUser = true;
     if (hasRoot)
     {
         (this.RootVisual as MainPage).startLoad();
     }
 }
        private void UserLoaded(LoadUserOperation operation)
        {
            if (operation.HasError)
            {
                ErrorWindow.CreateNew(operation.Error);
                operation.MarkErrorAsHandled();
            }

            _webContext.ResourceAuthenticate();
        }
Example #8
0
        /// <summary>
        /// Invoked when the <see cref="LoadUserOperation"/> completes.
        /// Use this event handler to switch from the "loading UI" you created in <see cref="InitializeRootVisual"/> to the "application UI".
        /// </summary>
        private void Application_UserLoaded(LoadUserOperation operation)
        {
            if (operation.HasError)
            {
                throw operation.Error;
            }

            // MaterialsService.Load(MaterialsService.GetMaterialClassesQuery(), GetMaterialClassesCallback, null);
            ((Grid)this.RootVisual).Children.Add(new MainPage());
        }
Example #9
0
 private void LoadUser_Completed(LoadUserOperation operation)
 {
     if (!operation.User.Identity.IsAuthenticated)
     {
         this.RootVisual = new Logon();
     }
     else
     {
         DocumentManager.Web.User lUser = operation.User.Identity as DocumentManager.Web.User;
         MainPageViewModel.User = lUser;
         this.RootVisual        = new MainPage();
     }
 }
Example #10
0
 public void Application_UserLoaded(LoadUserOperation operation)
 {
     if (operation.User.Identity.IsAuthenticated)
     {
         // implement switch to views
         viewOrchestrator.ChangeView(RegionNames.MAIN_REGION, "BoardsView");
         viewOrchestrator.ChangeView(RegionNames.HEADER_REGION, "StatusView", string.Format(viewOrchestrator.ParametrTemplate, "USERNAME", operation.User.Identity.Name));
     }
     else
     {
         // implement switch to views
         viewOrchestrator.ChangeView(RegionNames.MAIN_REGION, "LoginView");
     }
 }
Example #11
0
 private void LoadUserOperation_Completed(LoadUserOperation loadUserOperation)
 {
     if (loadUserOperation.HasError)
     {
         if (LoadUserComplete != null)
         {
             LoadUserComplete(this, new LoadUserOperationEventArgs(loadUserOperation, loadUserOperation.Error));
         }
         loadUserOperation.MarkErrorAsHandled();
     }
     else
     {
         if (LoadUserComplete != null)
         {
             LoadUserComplete(this, new LoadUserOperationEventArgs(loadUserOperation));
         }
     }
 }
Example #12
0
        private void OnLoadUser_Completed(LoadUserOperation operation)
        {
            if (ApplicationViewModel.Instance.AuthenticationMode.ToString().ToLower() == "windows")
            {
                Membership.MembershipManager mm = new Membership.MembershipManager();
                // Authenticate this user aganist the EWAV database.  If authenticated,  load the user
                ApplicationViewModel.Instance.CurrentUserDomain =
                    WebContext.Current.Authentication.User.Identity.Name.Split('\\')[0].ToString();
                //ApplicationViewModel.Instance.LoggedInUser.UserDto.UserName =
                //    WebContext.Current.Authentication.User.Identity.Name.Split('\\')[1].ToString();

                //mm.AuthenticateAndLoadUser(WebContext.Current.Authentication.User.Identity.Name.Split('\\')[1].ToString());
                mm.AuthenticateAndLoadUser(WebContext.Current.Authentication.User.Identity.Name);
                mm.UserAuthenticatedFromEwav    += new EventHandler(mm_UserAuthenticated);
                mm.UserNotAuthenticatedFromEwav += new EventHandler(mm_UserNotAuthenticatedFromEwav);
                mm.UserLoadedWithNoDatasource   += new EventHandler(mm_UserLoadedWithNoDatasource);
            }
        }
Example #13
0
 /// <summary>
 /// Invoked when the <see cref="LoadUserOperation"/> completes. Use this
 /// event handler to switch from the "loading UI" you created in
 /// <see cref="InitializeRootVisual"/> to the "application UI"
 /// </summary>
 private void Application_UserLoaded(LoadUserOperation operation)
 {
     if (operation.User != null && operation.User.Identity != null && operation.User.Identity.IsAuthenticated)
     {
         var userService = IoC.Resolve <IApplicationUserService>();
         if (userService != null)
         {
             userService.ApplicationUserRetrieved += (sender, e) =>
             {
                 ApplicationUser.CurrentUser = e.Value;
             };
             userService.ApplicationUserRetrievalError += (sender, e) =>
             {
                 ErrorWindow.CreateNew(e.Value);
             };
             userService.RetrieveApplicationUser(operation.User.Identity.Name);
         }
     }
 }
Example #14
0
 /// <summary>
 ///     Invoked when the <see cref="LoadUserOperation"/> completes. Use this
 ///     event handler to switch from the "loading UI" you created in
 ///     <see cref="InitializeRootVisual"/> to the "application UI"
 /// </summary>
 private void Application_UserLoaded(LoadUserOperation operation)
 {
     this.progressIndicator.IsActive = false;
 }
Example #15
0
        private void UserLoaded(LoadUserOperation loadOperation)
        {
            if (!loadOperation.HasError)
            {

            }
        }
Example #16
0
File: App1.cs Project: mikestam/t2t
        /// <summary>
        /// Invoked when the <see cref="LoadUserOperation"/> completes.
        /// Use this event handler to switch from the "loading UI" you created in <see cref="InitializeRootVisual"/> to the "application UI".
        /// </summary>
        private void Application_UserLoaded(LoadUserOperation operation)
        {
            if (operation.HasError)
                throw operation.Error;

            // MaterialsService.Load(MaterialsService.GetMaterialClassesQuery(), GetMaterialClassesCallback, null);
            ((Grid)this.RootVisual).Children.Add(new MainPage());
        }
 public LoadUserOperationEventArgs(LoadUserOperation loadUserOp)
     : base(null)
 {
     LoginOp = loadUserOp;
 }
 public LoadUserOperationEventArgs(LoadUserOperation loadUserOp, Exception ex)
     : base(ex)
 {
     LoginOp = loadUserOp;
 }
 /// <summary>
 /// Invoked when the <see cref="LoadUserOperation"/> completes. Use this
 /// event handler to switch from the "loading UI" you created in
 /// <see cref="InitializeRootVisual"/> to the "application UI"
 /// </summary>
 private void Application_UserLoaded(LoadUserOperation operation)
 {
     this.busyIndicator.IsBusy = false;
 }
 public LoadUserOperationEventArgs(LoadUserOperation loadUserOp)
     : base(null)
 {
     LoginOp = loadUserOp;
 }
Example #21
0
        private void OnLoadUser_Completed(LoadUserOperation operation)
        {
            Logger.info("Пользователь авторизовался в клиенте");

            this.RootVisual = new MainPage();
        }
Example #22
0
 private void LoadUser_Completed(LoadUserOperation operation)
 {
     if (!operation.User.Identity.IsAuthenticated)
     {
         this.RootVisual = new Logon();
     }
     else
     {
         DocumentManager.Web.User lUser = operation.User.Identity as DocumentManager.Web.User;
         MainPageViewModel.User = lUser;
         this.RootVisual = new MainPage();
     }
 }
Example #23
0
        private void LoadUser_Completed(LoadUserOperation operation)
        {
            if (!operation.User.Identity.IsAuthenticated)
            {
                this.RootVisual = new MainLogin();
            }
            else
            {
                UserInfo = new UserInfo();
                ProductManager.Web.User lUser = operation.User.Identity as ProductManager.Web.User;
                UserInfo.UserName = lUser.UserName;
                UserInfo.UserAction = lUser.RightDictionary;
                UserInfo.UserDepartment = lUser.Department;
                UserInfo.UserID = lUser.UserID;
                UserInfo.DepartmentID = lUser.DepartmentID;
                UserInfo.UserPassword = lUser.Password;
                UserInfo.IsManager = lUser.IsManager;

                //InstanceContext context = new InstanceContext(LogonPersionCallBack);
                //IOnLinePersionService sc = new ProductManager.Web.OnLinePersionServiceContext(context);
                //sc.LogonPersion(UserInfo.UserID, UserInfo.UserName);
                LogonUser(UserInfo.UserID, UserInfo.UserName);
                this.RootVisual = new MainPage();
            }
        }
Example #24
0
 private void LoadUserOperation_Completed(LoadUserOperation loadUserOperation)
 {
     if (loadUserOperation.HasError)
     {
         if (LoadUserComplete != null)
             LoadUserComplete(this, new LoadUserOperationEventArgs(loadUserOperation, loadUserOperation.Error));
         loadUserOperation.MarkErrorAsHandled();
     }
     else
     {
         if (LoadUserComplete != null)
             LoadUserComplete(this, new LoadUserOperationEventArgs(loadUserOperation));
     }
 }
Example #25
0
 /// <summary>
 /// Invoked when the <see cref="LoadUserOperation"/> completes. Use this
 /// event handler to switch from the "loading UI" you created in
 /// <see cref="InitializeRootVisual"/> to the "application UI"
 /// </summary>
 private void Application_UserLoaded(LoadUserOperation operation)
 {
 }
 public LoadUserOperationEventArgs(LoadUserOperation loadUserOp, Exception ex)
     : base(ex)
 {
     LoginOp = loadUserOp;
 }
Example #27
0
 /// <summary>
 /// Invoked when the <see cref="LoadUserOperation"/> completes. Use this
 /// event handler to switch from the "loading UI" you created in
 /// <see cref="InitializeRootVisual"/> to the "application UI"
 /// </summary>
 private void Application_UserLoaded(LoadUserOperation operation)
 {
 }
Example #28
0
 /// <summary>
 ///     Invoked when the <see cref="LoadUserOperation"/> completes. Use this
 ///     event handler to switch from the "loading UI" you created in
 ///     <see cref="InitializeRootVisual"/> to the "application UI"
 /// </summary>
 private void Application_UserLoaded(LoadUserOperation operation)
 {
     this.progressIndicator.IsActive = false;
 }