private void OnLoadUser_Completed(LoadUserOperation operation) { Logger.info("Пользователь авторизовался в клиенте"); hasUser = true; if (hasRoot) { (this.RootVisual as MainPage).startLoad(); } }
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(); } }
private void OnLoadUserCompleted(LoadUserOperation operation) { string errorStatus = operation.CheckErrorStatus(); if (errorStatus != null) return; UpdateLastUserName(); }
/// <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(); } }
private void UserLoaded(LoadUserOperation operation) { if (operation.HasError) { ErrorWindow.CreateNew(operation.Error); operation.MarkErrorAsHandled(); } _webContext.ResourceAuthenticate(); }
/// <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()); }
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(); } }
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"); } }
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)); } } }
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); } }
/// <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); } } }
/// <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; }
private void UserLoaded(LoadUserOperation loadOperation) { if (!loadOperation.HasError) { } }
/// <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; }
private void OnLoadUser_Completed(LoadUserOperation operation) { Logger.info("Пользователь авторизовался в клиенте"); this.RootVisual = new MainPage(); }
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)); } }
/// <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) { }