예제 #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
파일: Module.cs 프로젝트: nbarya/bliss
        //
        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
파일: DataClient.cs 프로젝트: hombrevrc/FDK
        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
파일: WebApplication.cs 프로젝트: icpac/cap
        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
파일: Example.cs 프로젝트: hombrevrc/FDK
 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
파일: Module.cs 프로젝트: derjabkin/eXpand
 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();
        }