Пример #1
0
        protected override void OnLoggingOn(LogonEventArgs args)
        {
            var para = args.LogonParameters as SystemLogonParameter;

            //Module.ERPModule.IsSafeMode = para.SafeMode;
            base.OnLoggingOn(args);
        }
Пример #2
0
 void OnLogon(object sender, LogonEventArgs e)
 {
     if (ShowDebug)
     {
         Console.WriteLine("{0} OnLogon(): {1}", Username, e);
     }
 }
Пример #3
0
        private void Application_LoggedOn(object sender, LogonEventArgs e)
        {
            SchedulerModuleBase   schedulerModule       = Application.Modules.FindModule <SchedulerModuleBase>();
            NotificationsProvider notificationsProvider = schedulerModule.NotificationsProvider;

            notificationsProvider.CustomizeNotificationCollectionCriteria += NotificationsProvider_CustomizeNotificationCollectionCriteria;
        }
Пример #4
0
        void application_LoggedOn(object sender, LogonEventArgs e)
        {
            NotificationsModule          notificationsModule   = Application.Modules.FindModule <NotificationsModule>();
            DefaultNotificationsProvider notificationsProvider = notificationsModule.DefaultNotificationsProvider;

            notificationsProvider.CustomizeNotificationCollectionCriteria += notificationsProvider_CustomizeNotificationCollectionCriteria;
        }
        static void ApplicationOnLoggedOn(object sender, LogonEventArgs logonEventArgs)
        {
            var xafApplication = ((XafApplication)sender);
            var modelWinLayoutManagerOptions = ((IModelWinLayoutManagerOptions)xafApplication.Model.Options.LayoutManagerOptions);

            modelWinLayoutManagerOptions.CustomizationEnabled = SecuritySystem.IsGranted(new OverallCustomizationAllowedPermissionRequest());
        }
        protected override void OnLoggingOn(LogonEventArgs args)
        {
            base.OnLoggingOn(args);
            string targetDataBaseName = ((IDatabaseNameParameter)args.LogonParameters).DatabaseName;

            ObjectSpaceProvider.ConnectionString = MSSqlServerChangeDatabaseHelper.PatchConnectionString(targetDataBaseName, ConnectionString);
        }
 protected override void OnLoggedOn(LogonEventArgs args)
 {
     base.OnLoggedOn(args);
     ObjectSpace objectSpace = CreateObjectSpace();
     CurrentCompanyOidParameter param = new CurrentCompanyOidParameter { CurrentCompanyOid = (objectSpace.FindObject<Company>(CriteriaOperator.Parse("Employees[Oid = ?]", SecuritySystem.CurrentUserId))).Oid };
     ParametersFactory.RegisterParameter(param);
 }
Пример #8
0
        private void Epay3AspNetApplication_LoggingOn(object sender, LogonEventArgs e)
        {
            MyLogonParameters param = (MyLogonParameters)e.LogonParameters;

            var client = param.Client;

            // todo security
            // sanitize param.Client

            if (string.IsNullOrWhiteSpace(client))
            {
                if (!Debugger.IsAttached)
                {
                    throw new UserFriendlyException("Please enter your client name");
                }
            }
            else
            {
                string connectionString = ConfigurationManager.AppSettings["RDS_DB_NAME"];
                if (connectionString == null)
                {
                    //
                    connectionString = ConfigurationManager.ConnectionStrings["ConnectionStringTenant"].ConnectionString;
                }
                var connectionStringOfTenant = connectionString.Replace("TENANT_SCHEMA", "epay3." + client);
                WebApplication.Instance.ConnectionString = connectionStringOfTenant;

                module3.Client = client;
            }
        }
Пример #9
0
        private void Application_LoggedOn(object sender, LogonEventArgs e)
        {
            var app  = sender as XafApplication;
            var user = app.Security.User as PermissionPolicyUser;

            ElasticSearchClient.Instance.AddParameter("ContactContext", string.Join(",", user.Roles.Select(t => t.Oid.ToString("N"))));
        }
Пример #10
0
        //
        void application_LoggedOn(object sender, LogonEventArgs e)
        {
            Cdb.Notifications.NotificationsModule notifications = Application.Modules.FindModule <Cdb.Notifications.NotificationsModule>();
            if (notifications != null)
            {
                notifications.NotificationObjects = new List <NotificationObjects>();

                NotificationObjects objNotifObject = new NotificationObjects();
                //Ticket
                objNotifObject.ObjectType                = typeof(Ticket);
                objNotifObject.ObjectCriteria            = "Type.Ticket_Type = 'Error'";
                objNotifObject.IsNotificationForCreation = true;
                objNotifObject.IsNotificationForUpdation = true;

                notifications.NotificationObjects.Add(objNotifObject);

                //Comment
                objNotifObject                           = new NotificationObjects();
                objNotifObject.ObjectType                = typeof(TicketComment);
                objNotifObject.ObjectCriteria            = "";
                objNotifObject.IsNotificationForCreation = true;
                objNotifObject.IsNotificationForDeletion = true;
                notifications.NotificationObjects.Add(objNotifObject);
            }
        }
Пример #11
0
        protected override void OnLoggedOn(LogonEventArgs args)
        {
            RegistrarLogueo RegistrarLogueo = new RegistrarLogueo();

            RegistrarLogueo.Registrar();
            base.OnLoggedOn(args);
        }
Пример #12
0
        void OnLogon(object sender, LogonEventArgs e)
        {
            var symbols = Settings1.Default.SubscribeToSymbols.Split(',');

            // we should subscribe to quotes every time after logon event
            this.Feed.Server.SubscribeToQuotes(symbols, Settings1.Default.Depth);
        }
        protected override void OnLoggingOn(LogonEventArgs args)
        {
            base.OnLoggingOn(args);
            var        os = this.CreateObjectSpace(typeof(Login));
            LoginCount lc = null;

            if (os.GetObjectsCount(typeof(LoginCount), null) == 0)
            {
                lc       = os.CreateObject <LoginCount>();
                lc.Count = 0;
            }
            else
            {
                lc = os.GetObjects <LoginCount>()[0];
            }
            lc.Count++;

            var Login = os.CreateObject <Login>();

            Login.UserName = "******";
            if (os.IsModified)
            {
                os.CommitChanges();
            }
        }
        /// <summary>
        /// Método chamado quando o usuário estiver logado
        /// </summary>
        /// <param name="e">Evento</param>
        protected override void OnLoggedOn(LogonEventArgs e)
        {
            base.OnLoggedOn(e);

            // Código para exibição das propriedades de coleção no detail
            ((ShowViewStrategy)base.ShowViewStrategy).CollectionsEditMode =
                DevExpress.ExpressApp.Editors.ViewEditMode.Edit;
        }
Пример #15
0
 void ApplicationOnLoggingOn(object sender, LogonEventArgs logonEventArgs) {
     var webApplication = ((WebApplication)sender);
     webApplication.LoggingOn -= ApplicationOnLoggingOn;
     var logonParameters = logonEventArgs.LogonParameters as XpandLogonParameters;
     if (logonParameters != null && RememberMeViewItemExists(webApplication, logonParameters) && webApplication.CanAutomaticallyLogonWithStoredLogonParameters) {
         webApplication.CanAutomaticallyLogonWithStoredLogonParameters = logonParameters.RememberMe;
     }
 }
Пример #16
0
        protected override void OnLoggedOn(LogonEventArgs args)
        {
            base.OnLoggedOn(args);

            var coreAppLogonParameters = (CoreAppLogonParameters)args.LogonParameters;

            SetSessionRegionalSettings(coreAppLogonParameters);
        }
Пример #17
0
 void OnFeedLogon(object sender, LogonEventArgs e)
 {
     lock (this.synchronizer)
     {
         this.IsFeedLoggedOn = true;
     }
     this.syncEvent.Set();
 }
Пример #18
0
        protected override void OnLoggedOn(LogonEventArgs args)
        {
            base.OnLoggedOn(args);
            ObjectSpace objectSpace          = this.CreateObjectSpace();
            CurrentCompanyOidParameter param = new CurrentCompanyOidParameter();

            param.CurrentCompanyOid = (objectSpace.FindObject <Company>(CriteriaOperator.Parse("Employees[Oid = ?]", SecuritySystem.CurrentUserId))).Oid;
            ParametersFactory.RegisterParameter(param);
        }
Пример #19
0
 private void OnLogon(object sender, LogonEventArgs e)
 {
     lock (m_synchronizer)
     {
         m_wasActualSymbolsReset = true;
         m_actual.Clear();
     }
     m_event.Set();
 }
        protected override void OnLoggingOn(LogonEventArgs args)
        {
            base.OnLoggingOn(args);
            string targetDataBaseName = ((IDatabaseNameParameter)args.LogonParameters).DatabaseName;

            ((XPObjectSpaceProvider)ObjectSpaceProviders[0]).SetDataStoreProvider(
                GetDataStoreProvider(MSSqlServerChangeDatabaseHelper.PatchConnectionString(targetDataBaseName, ConnectionString),
                                     null));
        }
Пример #21
0
        void ApplicationOnLoggedOn(object sender, LogonEventArgs logonEventArgs)
        {
            var session = ((XPObjectSpace)((Application.ObjectSpaceProvider.CreateUpdatingObjectSpace(false)))).Session;

            if (session.DataLayer != null)
            {
                MergeTypes(new UnitOfWork(session.DataLayer));
            }
        }
Пример #22
0
 void OnLogon(object sender, LogonEventArgs e)
 {
     if (this.InvokeRequired)
     {
         this.InvokeInPrimaryThread(this.OnLogon, sender, e);
         return;
     }
     this.Log("Data feed is connected");
 }
Пример #23
0
        void RaiseLogon(FxMessage message)
        {
            var eh = this.Logon;

            if (eh != null)
            {
                var e = new LogonEventArgs(message);
                eh(this, e);
            }
        }
Пример #24
0
        private void WebApplicationOnLoggedOn(object sender, LogonEventArgs logonEventArgs)
        {
            var logonParameters = SecuritySystem.LogonParameters as XpandLogonParameters;

            if (logonParameters != null && logonParameters.RememberMe)
            {
                var cookie = HttpCookie(SecuritySystem.CurrentUserName, ((WebApplication)sender).CanAutomaticallyLogonWithStoredLogonParameters);
                HttpContext.Current.Response.Cookies.Add(cookie);
            }
        }
Пример #25
0
 void ApplicationOnLoggedOn(object sender, LogonEventArgs logonEventArgs) {
     ISchedulerFactory stdSchedulerFactory = new XpandSchedulerFactory(Application);
     try {
         IScheduler scheduler = stdSchedulerFactory.AllSchedulers.SingleOrDefault();
         _scheduler = scheduler ?? stdSchedulerFactory.GetScheduler();
     } catch (Exception e) {
         if (!Debugger.IsAttached)
             Tracing.Tracer.LogError(e);
     }
 }
Пример #26
0
        protected override void OnLoggingOn(LogonEventArgs args)
        {
            //AuthenticationStandardLogonParameters standardLogonParameters = args.LogonParameters as AuthenticationStandardLogonParameters;
            ChangeDatabaseStandardAuthenticationLogonParametersWeb
                standardLogonParameters = args.LogonParameters as ChangeDatabaseStandardAuthenticationLogonParametersWeb;

            base.OnLoggingOn(args);
            ChangeDatabaseHelper.UpdateDatabaseName(this,
                                                    /*((IDatabaseNameParameter)args.LogonParameters)*/
                                                    standardLogonParameters.Clv);
        }
Пример #27
0
        void OnLogon(object sender, LogonEventArgs e)
        {
            var symbols = new[]
            {
                "EURUSD",
                "EURJPY",
            };

            // we should subscribe to quotes every time after logon event
            this.Feed.Server.SubscribeToQuotes(symbols, 3);
        }
Пример #28
0
 void OnLogon(object sender, LogonEventArgs e)
 {
     if (this.Trade == sender)
     {
         this.dataTradeEvent.Set();
     }
     if (this.Feed == sender)
     {
         this.dataFeedEvent.Set();
     }
 }
Пример #29
0
        void ApplicationOnLoggingOn(object sender, LogonEventArgs logonEventArgs)
        {
            var webApplication = ((WebApplication)sender);

            webApplication.LoggingOn -= ApplicationOnLoggingOn;
            var logonParameters = logonEventArgs.LogonParameters as XpandLogonParameters;

            if (logonParameters != null && RememberMeViewItemExists(webApplication, logonParameters) && webApplication.CanAutomaticallyLogonWithStoredLogonParameters)
            {
                webApplication.CanAutomaticallyLogonWithStoredLogonParameters = logonParameters.RememberMe;
            }
        }
Пример #30
0
        private void LogonCompleted(object sender, LogonEventArgs e)
        {
            this.IsAuthenticated = e.IsAuthenticated;
            this.Token           = e.Token;

            this.BusyIndicator.Visibility = Visibility.Collapsed;

            if (this.IsAuthenticated)
            {
                NavigationService.Navigate(new Uri("/MainPage.xaml?token=" + this.Token, UriKind.Relative));
            }
        }
 private void ApplicationOnLoggingOn(object sender, LogonEventArgs logonEventArgs)
 {
     if (logonEventArgs.LogonParameters is IDBServerParameter parameter)
     {
         Validator.RuleSet.Validate(ObjectSpace, logonEventArgs.LogonParameters, DBServer);
         var connectionString = GetConnectionStringSettings().First(settings
                                                                    => GetDbServerName(settings) == parameter.DBServer).ConnectionString;
         Application.ConnectionString = connectionString;
         foreach (var provider in Application.ObjectSpaceProviders.OfType <XpandObjectSpaceProvider>().Select(provider => provider.DataStoreProvider).OfType <MultiDataStoreProvider>())
         {
             provider.ConnectionString = connectionString;
         }
     }
 }
Пример #32
0
        protected override void OnLoggedOn(LogonEventArgs args)
        {
            ConfigHelper.GoogleMapsApi = MultiTenantHelper.AutheticationObject.GoogleMapsApi;
            ConfigHelper.BingMapsApi   = MultiTenantHelper.AutheticationObject.BingMapsApi;

            this.mapsAspNetModule.GoogleApiKey = ConfigHelper.GoogleMapsApi;
            this.mapsAspNetModule.BingApiKey   = ConfigHelper.BingMapsApi;

            this.Model.Options.UseServerMode = true;

            this.SetApplicationCulture();

            base.OnLoggedOn(args);
        }
Пример #33
0
        void ApplicationOnLoggedOn(object sender, LogonEventArgs logonEventArgs)
        {
            ISchedulerFactory stdSchedulerFactory = new XpandSchedulerFactory(Application);

            try {
                IScheduler scheduler = stdSchedulerFactory.AllSchedulers.SingleOrDefault();
                _scheduler = scheduler ?? stdSchedulerFactory.GetScheduler();
            } catch (Exception e) {
                if (!Debugger.IsAttached)
                {
                    Tracing.Tracer.LogError(e);
                }
            }
        }
Пример #34
0
 void application_LoggingOn(object sender, LogonEventArgs e)
 {
     using (var objectSpace = Application.CreateObjectSpace())
     {
         var users = objectSpace.GetObjects(typeof(User));
         if (users.Count == 0)
         {
             var adminUser = objectSpace.CreateObject<User>();
             adminUser.UserName = "******";
             adminUser.IsActive = true;
             adminUser.Roles.Add(new Role { Name = "Administrator", CanEditModel = true, IsAdministrative = true });
             objectSpace.CommitChanges();
         }
     }
 }
Пример #35
0
 protected override void OnLoggedOn(LogonEventArgs args)
 {
     base.OnLoggedOn(args);
     using (var objectSpace = CreateObjectSpace())
     {
         if (objectSpace.GetObjectsCount(typeof(Waypoint), null) == 0)
         {
             const string importFileName = "Waypoints.xml";
             if (File.Exists(importFileName))
             {
                 WaypointImporter importer = new WaypointImporter(objectSpace);
                 importer.ImportFile(@"Waypoints.xml");
             }
         }
     }
 }
 // Methods
 private static void application_LoggedOn(object sender, LogonEventArgs e)
 {
     Initialize();
 }
Пример #37
0
 void ApplicationOnLoggedOn(object sender, LogonEventArgs logonEventArgs) {
     ((ShowViewStrategy)Application.ShowViewStrategy).CollectionsEditMode = ((IModelOptionsCollectionEditMode)Application.Model.Options).CollectionsEditMode;
 }
Пример #38
0
 void ApplicationOnLoggedOn(object sender, LogonEventArgs logonEventArgs){
     var session = ((XPObjectSpace)((Application.ObjectSpaceProvider.CreateUpdatingObjectSpace(false)))).Session;
     if (session.DataLayer != null) MergeTypes(new UnitOfWork(session.DataLayer));
 }
Пример #39
0
 protected override void OnLoggedOn(LogonEventArgs args) {
     base.OnLoggedOn(args);
     ((ShowViewStrategy)ShowViewStrategy).CollectionsEditMode = DevExpress.ExpressApp.Editors.ViewEditMode.Edit;
 }
Пример #40
0
 protected override void OnLoggedOn(LogonEventArgs args)
 {
     base.OnLoggedOn(args);
     // скрываем сплэш скрин, что бы не мигал при входе
     if (this.SplashScreen != null)
     {
         this.SplashScreen.Stop();
         this.SplashScreen = null;
     }
     if (Config.Data.UserSettings.DBPathIsInstalled == false)
     {
         Config.Data.UserSettings.DBPathIsInstalled = true;
         Config.Data.UserSettings.Save();
         //Config.SaveAll();
     }
 }
Пример #41
0
 protected override void OnLoggingOn(LogonEventArgs args)
 {
     var para = args.LogonParameters as SystemLogonParameter;
     //Module.ERPModule.IsSafeMode = para.SafeMode;
     base.OnLoggingOn(args);
 }
Пример #42
0
 // Override to execute custom code after a logon has been performed, the SecuritySystem object is initialized, logon parameters have been saved and user model differences are loaded.
 protected override void OnLoggedOn(LogonEventArgs args) { // http://documentation.devexpress.com/#Xaf/DevExpressExpressAppXafApplication_LoggedOntopic
     base.OnLoggedOn(args);
 }
Пример #43
0
 private void XafApplicationOnLoggedOn(object sender, LogonEventArgs logonEventArgs){
     _loggedOn = true;
 }
Пример #44
0
 protected override void OnLoggedOn(LogonEventArgs args)
 {
     base.OnLoggedOn(args);
     AboutInfo.Instance.Description = "asdasddas";
 }
Пример #45
0
        /// <summary>
        /// Вход пользователя в базу
        /// </summary>
        private void application_LoggedOn(object sender, LogonEventArgs e)
        {
            InitializePlugins();

            // проверяем базу на обследования со статусом "В РАБОТЕ"
            CheckExaminationStatus();

            CreateDummyObjects();
        }