Example #1
0
        static void Main(string[] arguments) {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            SecurityDemoWindowsFormsApplication application = new SecurityDemoWindowsFormsApplication();
            application.CreateCustomTemplate += new EventHandler<CreateCustomTemplateEventArgs>(xafApplication_CreateCustomTemplate);
            application.CreateCustomLogonWindowObjectSpace += new EventHandler<CreateCustomLogonWindowObjectSpaceEventArgs>(application_CreateCustomLogonWindowObjectSpace);
            application.CreateCustomLogonWindowControllers += new EventHandler<CreateCustomLogonWindowControllersEventArgs>(application_CreateCustomLogonWindowControllers);

            try {
                application.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

                SecurityStrategyComplex security = new SecurityStrategyComplex(typeof(SecurityDemoUser), typeof(DevExpress.ExpressApp.Security.Strategy.SecuritySystemRole), new SecurityDemoAuthentication());
                application.Security = security;
                //                application.CreateCustomObjectSpaceProvider += delegate(object sender, CreateCustomObjectSpaceProviderEventArgs e) {
                //                    e.ObjectSpaceProvider = new SecuredObjectSpaceProvider(security, e.ConnectionString, e.Connection);
                //                };
                application.DatabaseVersionMismatch += delegate(object sender, DatabaseVersionMismatchEventArgs e) {
                    e.Updater.Update();
                    e.Handled = true;
                };

                application.Setup();
                application.Start();
            } catch (Exception e) {
                application.HandleException(e);
            }
        }
Example #2
0
        protected void Session_Start(Object sender, EventArgs e) {
            WebApplication.SetInstance(Session, new SecurityDemoAspNetApplication());
            WebApplication.Instance.CreateCustomLogonWindowObjectSpace += new EventHandler<CreateCustomLogonWindowObjectSpaceEventArgs>(Instance_CreateCustomLogonWindowObjectSpace);
            WebApplication.Instance.CreateCustomLogonWindowControllers += new EventHandler<CreateCustomLogonWindowControllersEventArgs>(Instance_CreateCustomLogonWindowControllers);


            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null) {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }

            SecurityStrategyComplex security = new SecurityStrategyComplex(typeof(SecurityDemoUser), typeof(DevExpress.ExpressApp.Security.Strategy.SecuritySystemRole), new SecurityDemoAuthentication());
            WebApplication.Instance.Security = security;
            WebApplication.Instance.DatabaseVersionMismatch += delegate(object sender2, DatabaseVersionMismatchEventArgs e2) {
                e2.Updater.Update();
                e2.Handled = true;
            };

            //You do not need this call, the functionality is build in the XpandObjectSpaceProvider. To enable or disable use Model/Options/ClientSideSecurity


            //            WebApplication.Instance.CreateCustomObjectSpaceProvider += delegate(object sender3, CreateCustomObjectSpaceProviderEventArgs e3) {
            //                e3.ObjectSpaceProvider = new SecuredObjectSpaceProvider(security, e3.ConnectionString, e3.Connection);
            //            };

            WebApplication.Instance.Setup();
            WebApplication.Instance.Start();

        }
Example #3
0
        private static void Main(){
#if EASYTEST
			DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var application = new SecurityDemoWindowsFormsApplication();
            application.CreateCustomTemplate += xafApplication_CreateCustomTemplate;
            application.CreateCustomLogonWindowObjectSpace += application_CreateCustomLogonWindowObjectSpace;
            application.CreateCustomLogonWindowControllers += application_CreateCustomLogonWindowControllers;
#if EASYTEST
			if(ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null) {
				application.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
			}
#else
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null){
                application.ConnectionString =
                    ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#endif
            try{
                var security = new SecurityStrategyComplex(typeof (SecuritySystemUser), typeof (SecuritySystemRole),
                    new SecurityDemoAuthentication());
                application.Security = security;

                //                This functionality is build in the XpandObjectSpaceProvider. To enable or disable use Model/Options/ClientSideSecurity. You can continue using the designer if you want.

                //                application.CreateCustomObjectSpaceProvider += delegate(object sender, CreateCustomObjectSpaceProviderEventArgs e) {
                //                    e.ObjectSpaceProvider = new SecuredObjectSpaceProvider(security, e.ConnectionString, e.Connection);
                //                };
                application.DatabaseVersionMismatch += delegate(object sender, DatabaseVersionMismatchEventArgs e){
                    try{
#if EASYTEST
                        e.Updater.Update();
                        e.Handled = true;
#else
                        if (Debugger.IsAttached){
                            e.Updater.Update();
                            e.Handled = true;
                        }
#endif
                    }
                    catch (CompatibilityException exception){
                        if (exception.Error is CompatibilityUnableToOpenDatabaseError){
                            throw new UserFriendlyException(
                                "The connection to the database failed. This demo requires the local instance of Microsoft SQL Server Express. To use another database server,\r\nopen the demo solution in Visual Studio and modify connection string in the \"app.config\" file.");
                        }
                    }
                };

                application.Setup();
                application.Start();
            }
            catch (Exception e){
                application.HandleException(e);
            }
        }
Example #4
0
        static void Main() {
            try {
                ValueManager.ValueManagerType = typeof (MultiThreadValueManager<>).GetGenericTypeDefinition();

                string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

                Console.WriteLine("Starting...");
                var securityStrategyComplex = new SecurityStrategyComplex(typeof (SecuritySystemUser), typeof (SecuritySystemRole), new AuthenticationStandard());
                var serverApplication = new ConsoleApplicationServerServerApplication(securityStrategyComplex){
                    ConnectionString = connectionString
                };

                Console.WriteLine("Setup...");
                serverApplication.Setup();
                Console.WriteLine("CheckCompatibility...");
                serverApplication.CheckCompatibility();
                serverApplication.Dispose();

                Console.WriteLine("Starting server...");
                QueryRequestSecurityStrategyHandler securityProviderHandler =
                    () => securityStrategyComplex;

                var dataServer =
                    new SecuredDataServer(connectionString, XpoTypesInfoHelper.GetXpoTypeInfoSource().XPDictionary,
                                          securityProviderHandler);
                RemoteSecuredDataServer.Initialize(dataServer);

                //"Authentication with the TCP Channel" at http://msdn.microsoft.com/en-us/library/59hafwyt(v=vs.80).aspx

                IDictionary t = new Hashtable();
                t.Add("port", 1425);
                t.Add("secure", true);
                t.Add("impersonate", true);

                var channel = new TcpChannel(t, null, null);
                ChannelServices.RegisterChannel(channel, true);
                RemotingConfiguration.RegisterWellKnownServiceType(typeof (RemoteSecuredDataServer), "DataServer",
                                                                   WellKnownObjectMode.Singleton);

                Console.WriteLine("Server is started. Press Enter to stop.");
                Console.ReadLine();
                Console.WriteLine("Stopping...");
                ChannelServices.UnregisterChannel(channel);
                Console.WriteLine("Server is stopped.");
            }
            catch (Exception e) {
                Console.WriteLine("Exception occurs: " + e.Message);
                Console.WriteLine("Press Enter to close.");
                Console.ReadLine();
            }
        }
Example #5
0
        void InitializeComponent() {
            module1 = new SystemModule();
            module2 = new SystemAspNetModule();
            module3 = new ModelDifferenceTesterModule();
            module4 = new ModelDifferenceTesterAspNetModule();
            sqlConnection1 = new SqlConnection();
            cloneObjectModule1 = new CloneObjectModule();
            securityModule1 = new SecurityModule();
            _securityStrategyComplex = new SecurityStrategyComplex();
            _authenticationStandard = new AuthenticationStandard();
            xpandSecurityModule1 = new XpandSecurityModule();
            modelDifferenceModule1 = new ModelDifferenceModule();
            modelDifferenceAspNetModule1 = new ModelDifferenceAspNetModule();
            ((ISupportInitialize) (this)).BeginInit();
            // 
            // sqlConnection1
            // 
            sqlConnection1.ConnectionString =
                "Integrated Security=SSPI;Pooling=false;Data Source=.\\SQLEXPRESS;Initial Catalog=M" +
                "odelDifferenceTester";
            sqlConnection1.FireInfoMessageEventOnUserErrors = false;
            // 
            // _securityStrategyComplex
            // 
            _securityStrategyComplex.Authentication = _authenticationStandard;
            _securityStrategyComplex.UserType = typeof (SecuritySystemUser);
            _securityStrategyComplex.RoleType = typeof (SecuritySystemRole);
            // 
            // _authenticationStandard
            // 

            _authenticationStandard.LogonParametersType = typeof (AuthenticationStandardLogonParameters);
            // 
            // ModelDifferenceTesterAspNetApplication
            // 
            ApplicationName = "ModelDifferenceTester";
            Connection = sqlConnection1;
            Modules.Add(module1);
            Modules.Add(module2);
            Modules.Add(module3);
            Modules.Add(cloneObjectModule1);
            Modules.Add(securityModule1);
            Modules.Add(xpandSecurityModule1);
            Modules.Add(modelDifferenceModule1);
            Modules.Add(modelDifferenceAspNetModule1);
            Modules.Add(module4);
            Security = _securityStrategyComplex;
            ((ISupportInitialize) (this)).EndInit();
        }
Example #6
0
		protected void Session_Start(Object sender, EventArgs e) {
			WebApplication.SetInstance(Session, new SecurityDemoAspNetApplication());
            WebApplication.Instance.CreateCustomLogonWindowObjectSpace += new EventHandler<CreateCustomLogonWindowObjectSpaceEventArgs>(Instance_CreateCustomLogonWindowObjectSpace);
            WebApplication.Instance.CreateCustomLogonWindowControllers += new EventHandler<CreateCustomLogonWindowControllersEventArgs>(Instance_CreateCustomLogonWindowControllers);

#if EASYTEST
			if(ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null) {
				WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
			}
#else

            if(ConfigurationManager.AppSettings["SiteMode"] != null && ConfigurationManager.AppSettings["SiteMode"].ToLower() == "true") {
                InMemoryDataStoreProvider.Register();
                WebApplication.Instance.ConnectionString = InMemoryDataStoreProvider.ConnectionString;
            }
            else {
                if(ConfigurationManager.ConnectionStrings["ConnectionString"] != null) {
                    WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
                }
            }
#endif
            SecurityStrategyComplex security = new SecurityStrategyComplex(typeof(SecuritySystemUser), typeof(DevExpress.ExpressApp.Security.Strategy.SecuritySystemRole), new SecurityDemoAuthentication());
            WebApplication.Instance.Security = security;
            WebApplication.Instance.DatabaseVersionMismatch += delegate(object sender2, DatabaseVersionMismatchEventArgs e2) {
                try {
                    e2.Updater.Update();
                    e2.Handled = true;
                }
                catch(CompatibilityException exception) {
                    if(exception.Error is CompatibilityUnableToOpenDatabaseError) {
                        throw new UserFriendlyException(
                        "The connection to the database failed. This demo requires the local instance of Microsoft SQL Server Express. To use another database server,\r\nopen the demo solution in Visual Studio and modify connection string in the \"app.config\" file.");
                    }
                }
            };

//            WebApplication.Instance.CreateCustomObjectSpaceProvider += delegate(object sender3, CreateCustomObjectSpaceProviderEventArgs e3) {
//                e3.ObjectSpaceProvider = new SecuredObjectSpaceProvider(security, e3.ConnectionString, e3.Connection);
//            };
            
            WebApplication.Instance.Setup();
			WebApplication.Instance.Start();

        }
Example #7
0
        static void Main() {
            try {
                
                string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

                ValueManager.ValueManagerType = typeof(MultiThreadValueManager<>).GetGenericTypeDefinition();

                Console.WriteLine("Starting...");
                var securityStrategyComplex = new SecurityStrategyComplex(typeof(SecuritySystemUser), typeof(SecuritySystemRole), new AuthenticationStandard());
                var serverApplication = new ConsoleApplicationServerServerApplication(securityStrategyComplex) {
                    ConnectionString = connectionString
                };
                Console.WriteLine("Setup...");
                serverApplication.Setup();
                Console.WriteLine("CheckCompatibility...");
                serverApplication.CheckCompatibility();
                XpandWcfDataServerHelper.AddKnownTypesForAll(serverApplication);
                serverApplication.Dispose();

                Console.WriteLine("Starting server...");
                QueryRequestSecurityStrategyHandler securityProviderHandler =() => securityStrategyComplex;

                var dataServer = new XpandSecuredDataServer(connectionString, XpoTypesInfoHelper.GetXpoTypeInfoSource().XPDictionary, securityProviderHandler);

                var serviceHost = new ServiceHost(new WcfSecuredDataServer(dataServer));
                var defaultBinding = (WSHttpBinding)WcfDataServerHelper.CreateDefaultBinding();
                defaultBinding.ReaderQuotas.MaxStringContentLength = 2147483647;
                serviceHost.AddServiceEndpoint(typeof(IWcfSecuredDataServer), defaultBinding, "http://localhost:1451/DataServer");
                serviceHost.Open();

                Console.WriteLine("Server is started. Press Enter to stop.");
                Console.ReadLine();
                Console.WriteLine("Stopping...");
                serviceHost.Close();
                Console.WriteLine("Server is stopped.");
            } catch (Exception e) {
                Console.WriteLine("Exception occurs: " + e.Message);
                Console.WriteLine("Press Enter to close.");
                Console.ReadLine();
            }
        }
        protected void Session_Start(Object sender, EventArgs e)
        {
            WebApplication.SetInstance(Session, new HideNavigationItemsExampleAspNetApplication());
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                WebApplication.Instance.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
            ((SecurityStrategy)WebApplication.Instance.Security).CustomizeRequestProcessors +=
                delegate(object sender2, CustomizeRequestProcessorsEventArgs e2) {
                List <IOperationPermission> result   = new List <IOperationPermission>();
                SecurityStrategyComplex     security = sender2 as SecurityStrategyComplex;
                if (security != null)
                {
                    ISecurityUserWithRoles user = security.User as ISecurityUserWithRoles;
                    if (user != null)
                    {
                        foreach (ISecurityRole role in user.Roles)
                        {
                            if (role is CustomSecurityRole)
                            {
                                result.AddRange(((CustomSecurityRole)role).GetPermissions());
                            }
                        }
                    }
                }
                IPermissionDictionary permissionDictionary = new PermissionDictionary((IEnumerable <IOperationPermission>)result);
                e2.Processors.Add(typeof(NavigationItemPermissionRequest), new NavigationItemPermissionRequestProcessor(permissionDictionary));
            };
            WebApplication.Instance.Setup();
            WebApplication.Instance.Start();
        }
Example #9
0
        private void InitializeComponent()
        {
            _module1 = new SystemModule();
            _module2 = new SystemAspNetModule();
            _securityStrategyComplex1 = new SecurityStrategyComplex();
            _authenticationStandard1  = new AuthenticationStandard();

            _module4        = new XtraDashboardTesterAspNetModule();
            _sqlConnection1 = new SqlConnection();
            ((ISupportInitialize)(this)).BeginInit();
            //
            // sqlConnection1
            //
            _sqlConnection1.ConnectionString =
                @"Integrated Security=SSPI;Pooling=false;Data Source=.\SQLEXPRESS;Initial Catalog=XtraDashboardTester";
            _sqlConnection1.FireInfoMessageEventOnUserErrors = false;
            _securityStrategyComplex1.Authentication         = _authenticationStandard1;
            _securityStrategyComplex1.RoleType = typeof(XpandRole);
            _securityStrategyComplex1.UserType = typeof(SecuritySystemUser);
            //
            // authenticationStandard1
            //
            _authenticationStandard1.LogonParametersType = typeof(AuthenticationStandardLogonParameters);
            //
            // XtraDashboardTesterAspNetApplication
            //
            ApplicationName = "XtraDashboardTester";
            Connection      = _sqlConnection1;
            Modules.Add(_module1);
            Modules.Add(_module2);

            Modules.Add(_module4);
            Security = _securityStrategyComplex1;

            DatabaseVersionMismatch += XtraDashboardTesterAspNetApplication_DatabaseVersionMismatch;
            ((ISupportInitialize)(this)).EndInit();
        }
Example #10
0
        public ConsoleApplicationServerServerApplication(SecurityStrategyComplex securityStrategyComplex)
            : base(securityStrategyComplex) {
            // Change the ServerApplication.ApplicationName property value. It should be the same as your client application name. 
            ApplicationName = "SecuritySystemExample";

            // Add your client application's modules to the ServerApplication.Modules collection here. 
            Modules.Add(new AdditionalViewControlsProviderWindowsFormsModule());
            Modules.Add(new Xpand.ExpressApp.Chart.Win.XpandChartWinModule());
            Modules.Add(new Xpand.ExpressApp.ConditionalObjectView.ConditionalObjectViewModule());
            Modules.Add(new Xpand.ExpressApp.ImportWizard.Win.ImportWizardWindowsFormsModule());
            Modules.Add(new Xpand.ExpressApp.MasterDetail.Win.MasterDetailWindowsModule());
            Modules.Add(new Xpand.ExpressApp.PivotGrid.Win.XpandPivotGridWinModule());
            Modules.Add(new Xpand.ExpressApp.Reports.Win.XpandReportsWindowsFormsModule());
            Modules.Add(new Xpand.ExpressApp.Scheduler.Win.XpandSchedulerWindowsFormsModule());
            Modules.Add(new Xpand.ExpressApp.Security.Win.XpandSecurityWinModule());
            Modules.Add(new Xpand.ExpressApp.StateMachine.XpandStateMachineModule());
            Modules.Add(new Xpand.ExpressApp.TreeListEditors.Win.XpandTreeListEditorsWinModule());
            Modules.Add(new Xpand.ExpressApp.Validation.Win.XpandValidationWinModule());
            Modules.Add(new Xpand.ExpressApp.ViewVariants.XpandViewVariantsModule());
            Modules.Add(new Xpand.ExpressApp.WizardUI.Win.WizardUIWindowsFormsModule());
            Modules.Add(new ModelDifferenceWindowsFormsModule());
            //            Modules.Add(new Xpand.ExpressApp.Win.SystemModule.XpandSystemWindowsFormsModule());
            Modules.Add(new SecuritySystemExampleModule());
        }
Example #11
0
        void InitializeComponent() {
            _module1 = new SystemModule();
            _module2 = new SystemAspNetModule();
            _module3 = new SecurityTesterModule();
            _module4 = new SecurityTesterAspNetModule();
            _sqlConnection1 = new SqlConnection();
            _securityStrategyComplex1 = new SecurityStrategyComplex();
            _authenticationStandard1 = new AnonymousAuthenticationStandard();
            ((ISupportInitialize)(this)).BeginInit();
            // 
            // sqlConnection1
            // 
            _sqlConnection1.ConnectionString =
                @"Integrated Security=SSPI;Pooling=false;Data Source=.\SQLEXPRESS;Initial Catalog=SecurityTester";
            _sqlConnection1.FireInfoMessageEventOnUserErrors = false;
            // 
            // SecurityTesterAspNetApplication
            // 
            _securityStrategyComplex1.Authentication = _authenticationStandard1;
            _securityStrategyComplex1.RoleType = typeof(XpandRole);
            _securityStrategyComplex1.UserType = typeof(SecuritySystemUser);
            // 
            // authenticationStandard1
            // 
            _authenticationStandard1.LogonParametersType = typeof(AnonymousLogonParameters);
            ApplicationName = "SecurityTester";
            Connection = _sqlConnection1;
            Modules.Add(_module1);
            Modules.Add(_module2);
            Modules.Add(_module3);
            Modules.Add(_module4);
            Security = _securityStrategyComplex1;

            DatabaseVersionMismatch += SecurityTesterAspNetApplication_DatabaseVersionMismatch;
            ((ISupportInitialize)(this)).EndInit();
        }
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainDemoWebApplication));
     this.systemModule1 = new DevExpress.ExpressApp.SystemModule.SystemModule();
     this.webSystemModule1 = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
     this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
     this.securityModule1 = new DevExpress.ExpressApp.Security.SecurityModule();
     this.securityStrategyComplex1 = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
     this.authenticationStandard1 = new DevExpress.ExpressApp.Security.AuthenticationStandard();
     this.objectsModule1 = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
     this.auditTrailModule1 = new DevExpress.ExpressApp.AuditTrail.AuditTrailModule();
     this.fileAttachmentsWebModule1 = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
     this.reportsModule1 = new DevExpress.ExpressApp.Reports.ReportsModule();
     this.reportsWebModule1 = new DevExpress.ExpressApp.Reports.Web.ReportsAspNetModule();
     this.validationModule1 = new DevExpress.ExpressApp.Validation.ValidationModule();
     this.viewVariantsModule1 = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
     this.conditionalAppearanceModule1 = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
     this.mainDemoModule1 = new MainDemo.Module.MainDemoModule();
     this.mainDemoWebModule1 = new MainDemo.Module.Web.MainDemoWebModule();
     this.schedulerAspNetModule1 = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
     this.schedulerModuleBase1 = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
     this.pivotChartAspNetModule1 = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
     this.pivotChartModuleBase1 = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
     this.htmlPropertyEditorAspNetModule1 = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
     this.scriptRecorderModuleBase1 = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
     this.scriptRecorderAspNetModule1 = new DevExpress.ExpressApp.ScriptRecorder.Web.ScriptRecorderAspNetModule();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // sqlConnection1
     //
     this.sqlConnection1.ConnectionString = "Integrated Security=SSPI;Pooling=false;Data Source=(local);Initial Catalog=MainDe" +
         "mo_v13.1";
     this.sqlConnection1.FireInfoMessageEventOnUserErrors = false;
     //
     // securityComplex1
     //
     this.securityStrategyComplex1.Authentication = this.authenticationStandard1;
     this.securityStrategyComplex1.RoleType = typeof(SecuritySystemRole);
     this.securityStrategyComplex1.UserType = typeof(SecuritySystemUser);
     //
     // authenticationStandard1
     //
     this.authenticationStandard1.LogonParametersType = typeof(DevExpress.ExpressApp.Security.AuthenticationStandardLogonParameters);
     //
     // auditTrailModule1
     //
     this.auditTrailModule1.AuditDataItemPersistentType = typeof(DevExpress.Persistent.BaseImpl.AuditDataItemPersistent);
     //
     // reportsModule1
     //
     this.reportsModule1.EnableInplaceReports = true;
     this.reportsModule1.ReportDataType = typeof(DevExpress.Persistent.BaseImpl.ReportData);
     this.reportsModule1.ShowAdditionalNavigation = false;
     //
     // validationModule1
     //
     this.validationModule1.AllowValidationDetailsAccess = true;
     //
     // viewVariantsModule1
     //
     this.viewVariantsModule1.GenerateVariantsNode = false;
     this.viewVariantsModule1.ShowAdditionalNavigation = false;
     //
     // pivotChartModuleBase1
     //
     this.pivotChartModuleBase1.ShowAdditionalNavigation = false;
     //
     // MainDemoWebApplication
     //
     this.ApplicationName = "MainDemo";
     this.Connection = this.sqlConnection1;
     this.Modules.Add(this.systemModule1);
     this.Modules.Add(this.webSystemModule1);
     this.Modules.Add(this.securityModule1);
     this.Modules.Add(this.objectsModule1);
     this.Modules.Add(this.auditTrailModule1);
     this.Modules.Add(this.fileAttachmentsWebModule1);
     this.Modules.Add(this.reportsModule1);
     this.Modules.Add(this.reportsWebModule1);
     this.Modules.Add(this.validationModule1);
     this.Modules.Add(this.viewVariantsModule1);
     this.Modules.Add(this.conditionalAppearanceModule1);
     this.Modules.Add(this.mainDemoModule1);
     this.Modules.Add(this.mainDemoWebModule1);
     this.Modules.Add(this.schedulerModuleBase1);
     this.Modules.Add(this.schedulerAspNetModule1);
     this.Modules.Add(this.pivotChartModuleBase1);
     this.Modules.Add(this.pivotChartAspNetModule1);
     this.Modules.Add(this.htmlPropertyEditorAspNetModule1);
     this.Modules.Add(this.scriptRecorderModuleBase1);
     this.Modules.Add(this.scriptRecorderAspNetModule1);
     this.Security = this.securityStrategyComplex1;
     this.LastLogonParametersRead += new System.EventHandler<DevExpress.ExpressApp.LastLogonParametersReadEventArgs>(this.MainDemoWebApplication_LastLogonParametersRead);
     this.DatabaseVersionMismatch += new System.EventHandler<DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.MainDemoWebApplication_DatabaseVersionMismatch);
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }
Example #13
0
        /// <summary>
        ///     Required method for Designer support - do not modify
        ///     the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.module1                      = new DevExpress.ExpressApp.SystemModule.SystemModule();
            this.module2                      = new DevExpress.ExpressApp.Win.SystemModule.SystemWindowsFormsModule();
            this.module4                      = new FDIT.Core.Module.Win.WinModule();
            this.sqlConnection1               = new System.Data.SqlClient.SqlConnection();
            this.cloneObjectModule1           = new DevExpress.ExpressApp.CloneObject.CloneObjectModule();
            this.reportsModule1               = new DevExpress.ExpressApp.Reports.ReportsModule();
            this.validationModule1            = new DevExpress.ExpressApp.Validation.ValidationModule();
            this.conditionalAppearanceModule1 =
                new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
            this.stateMachineModule1      = new DevExpress.ExpressApp.StateMachine.StateMachineModule();
            this.securityStrategyComplex1 = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
            this.CoreAuthenticationApp1   = new FDIT.Core.Seguridad.CoreAuthentication();
            this.securityModule1          = new DevExpress.ExpressApp.Security.SecurityModule();
            this.coreModule1       = new FDIT.Core.CoreModule();
            this.afipModule1       = new FDIT.Core.AFIP.AFIPModule();
            this.afipWsMtxcaModule = new FDIT.Core.AFIP.AFIPWsMtxcaModule();
            this.segurosModule1    = new FDIT.Core.Seguros.SegurosModule();
            this.segurosWinModule1 = new FDIT.Core.Seguros.Win.SegurosWinModule();
            this.fileAttachmentsWindowsFormsModule1 =
                new DevExpress.ExpressApp.FileAttachments.Win.FileAttachmentsWindowsFormsModule();
            this.reportsWindowsFormsModule1 = new DevExpress.ExpressApp.Reports.Win.ReportsWindowsFormsModule();
            this.viewVariantsModule1        = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
            this.auditTrailModule1          = new DevExpress.ExpressApp.AuditTrail.AuditTrailModule();
            this.pivotGridModule1           = new DevExpress.ExpressApp.PivotGrid.PivotGridModule();
            this.treeListEditorsModuleBase1 = new DevExpress.ExpressApp.TreeListEditors.TreeListEditorsModuleBase();
            this.chartModule1 = new DevExpress.ExpressApp.Chart.ChartModule();
            this.kpiModule1   = new DevExpress.ExpressApp.Kpi.KpiModule();
            this.validationWindowsFormsModule1         = new DevExpress.ExpressApp.Validation.Win.ValidationWindowsFormsModule();
            this.htmlPropertyEditorWindowsFormsModule1 =
                new DevExpress.ExpressApp.HtmlPropertyEditor.Win.HtmlPropertyEditorWindowsFormsModule();
            this.treeListEditorsWindowsFormsModule1 =
                new DevExpress.ExpressApp.TreeListEditors.Win.TreeListEditorsWindowsFormsModule();
            this.chartWindowsFormsModule1 = new DevExpress.ExpressApp.Chart.Win.ChartWindowsFormsModule();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            //
            // sqlConnection1
            //
            this.sqlConnection1.FireInfoMessageEventOnUserErrors = false;
            //
            // reportsModule1
            //
            this.reportsModule1.EnableInplaceReports = true;
            this.reportsModule1.ReportDataType       = typeof(DevExpress.Persistent.BaseImpl.ReportData);
            //
            // validationModule1
            //
            this.validationModule1.AllowValidationDetailsAccess = true;
            //
            // stateMachineModule1
            //
            this.stateMachineModule1.StateMachineStorageType =
                typeof(DevExpress.ExpressApp.StateMachine.Xpo.XpoStateMachine);
            //
            // securityStrategyComplex1
            //
            this.securityStrategyComplex1.Authentication = this.CoreAuthenticationApp1;
            this.securityStrategyComplex1.RoleType       = typeof(FDIT.Core.Seguridad.Rol);
            this.securityStrategyComplex1.UserType       = typeof(FDIT.Core.Seguridad.Usuario);
            //
            // coreModule1
            //
            this.coreModule1.FileAttachmentsBasePath = "";
            //
            // viewVariantsModule1
            //
            this.viewVariantsModule1.GenerateVariantsNode     = true;
            this.viewVariantsModule1.ShowAdditionalNavigation = false;
            //
            // auditTrailModule1
            //
            this.auditTrailModule1.AuditDataItemPersistentType =
                typeof(DevExpress.Persistent.BaseImpl.AuditDataItemPersistent);
            //
            // WinApplication
            //
            this.ApplicationName = "CORE";
            this.Connection      = this.sqlConnection1;
            this.Modules.Add(this.module1);
            this.Modules.Add(this.module2);
            this.Modules.Add(this.cloneObjectModule1);
            this.Modules.Add(this.reportsModule1);
            this.Modules.Add(this.validationModule1);
            this.Modules.Add(this.conditionalAppearanceModule1);
            this.Modules.Add(this.stateMachineModule1);
            this.Modules.Add(this.viewVariantsModule1);
            this.Modules.Add(this.auditTrailModule1);
            this.Modules.Add(this.pivotGridModule1);
            this.Modules.Add(this.treeListEditorsModuleBase1);
            this.Modules.Add(this.chartModule1);
            this.Modules.Add(this.kpiModule1);
            this.Modules.Add(this.coreModule1);
            this.Modules.Add(this.fileAttachmentsWindowsFormsModule1);
            this.Modules.Add(this.reportsWindowsFormsModule1);
            this.Modules.Add(this.validationWindowsFormsModule1);
            this.Modules.Add(this.securityModule1);
            this.Modules.Add(this.htmlPropertyEditorWindowsFormsModule1);
            this.Modules.Add(this.treeListEditorsWindowsFormsModule1);
            this.Modules.Add(this.chartWindowsFormsModule1);
            this.Modules.Add(this.module4);
            this.Modules.Add(this.afipModule1);
            this.Modules.Add(this.afipWsMtxcaModule);
            this.Modules.Add(this.segurosModule1);
            this.Modules.Add(this.segurosWinModule1);
            this.Security = this.securityStrategyComplex1;

            this.DatabaseVersionMismatch +=
                new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(
                    this.CoreWindowsFormsApplication_DatabaseVersionMismatch);
            this.CustomizeLanguagesList +=
                new System.EventHandler <DevExpress.ExpressApp.CustomizeLanguagesListEventArgs>(
                    this.CoreWindowsFormsApplication_CustomizeLanguagesList);

            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
        }
Example #14
0
        static void Main(string[] args)
        {
            WcfDataServerHelper.AddKnownType(typeof(ExportPermissionRequest));
            try
            {
                string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

                ValueManager.ValueManagerType = typeof(MultiThreadValueManager <>).GetGenericTypeDefinition();

                SecurityAdapterHelper.Enable();
                ServerApplication serverApplication = new ServerApplication();
                serverApplication.ApplicationName        = "InsureCore";
                serverApplication.CheckCompatibilityType = CheckCompatibilityType.DatabaseSchema;
#if DEBUG
                if (System.Diagnostics.Debugger.IsAttached && serverApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
                {
                    serverApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
                }
#endif

                serverApplication.Modules.BeginInit();
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Security.SecurityModule());
                serverApplication.Modules.Add(new InsureCore.Module.InsureCoreModule());
                serverApplication.Modules.Add(new InsureCore.Module.Win.InsureCoreWindowsFormsModule());
                serverApplication.Modules.Add(new InsureCore.Module.Web.InsureCoreAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.AuditTrail.AuditTrailModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Chart.ChartModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Chart.Win.ChartWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Chart.Web.ChartAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.CloneObject.CloneObjectModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Dashboards.DashboardsModule()
                {
                    DashboardDataType = typeof(DevExpress.Persistent.BaseImpl.DashboardData)
                });
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Dashboards.Win.DashboardsWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Dashboards.Web.DashboardsAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.FileAttachments.Win.FileAttachmentsWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.HtmlPropertyEditor.Win.HtmlPropertyEditorWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Kpi.KpiModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Maps.Web.MapsAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Notifications.NotificationsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Notifications.Win.NotificationsWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Notifications.Web.NotificationsAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotChart.Win.PivotChartWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotGrid.PivotGridModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotGrid.Win.PivotGridWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotGrid.Web.PivotGridAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ReportsV2.ReportsModuleV2()
                {
                    ReportDataType = typeof(DevExpress.Persistent.BaseImpl.ReportDataV2)
                });
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ReportsV2.Win.ReportsWindowsFormsModuleV2());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ReportsV2.Web.ReportsAspNetModuleV2());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Scheduler.Win.SchedulerWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ScriptRecorder.Win.ScriptRecorderWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ScriptRecorder.Web.ScriptRecorderAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.StateMachine.StateMachineModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.TreeListEditors.TreeListEditorsModuleBase());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.TreeListEditors.Win.TreeListEditorsWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.TreeListEditors.Web.TreeListEditorsAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.ValidationModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.Win.ValidationWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.Web.ValidationAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Workflow.WorkflowModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Workflow.Win.WorkflowWindowsFormsModule());
                serverApplication.Modules.EndInit();

                serverApplication.DatabaseVersionMismatch         += new EventHandler <DatabaseVersionMismatchEventArgs>(serverApplication_DatabaseVersionMismatch);
                serverApplication.CreateCustomObjectSpaceProvider += new EventHandler <CreateCustomObjectSpaceProviderEventArgs>(serverApplication_CreateCustomObjectSpaceProvider);

                serverApplication.ConnectionString = connectionString;

                Console.WriteLine("Setup...");
                serverApplication.Setup();
                Console.WriteLine("CheckCompatibility...");
                serverApplication.CheckCompatibility();
                serverApplication.Dispose();

                Console.WriteLine("Starting server...");
                Func <IDataServerSecurity> dataServerSecurityProvider = () =>
                {
                    SecurityStrategyComplex security = new SecurityStrategyComplex(typeof(User), typeof(Role), new AuthenticationStandard());
                    security.SupportNavigationPermissionsForTypes = false;
                    security.CustomizeRequestProcessors          += delegate(object sender, CustomizeRequestProcessorsEventArgs e)
                    {
                        List <IOperationPermission> result = new List <IOperationPermission>();
                        if (security != null)
                        {
                            User user = security.User as User;
                            if (user != null)
                            {
                                foreach (Role role in user.Roles)
                                {
                                    if (role.CanExport)
                                    {
                                        result.Add(new ExportPermission());
                                    }
                                }
                            }
                        }
                        IPermissionDictionary permissionDictionary = new PermissionDictionary((IEnumerable <IOperationPermission>)result);
                        e.Processors.Add(typeof(ExportPermissionRequest), new ExportPermissionRequestProcessor(permissionDictionary));
                    };
                    return(security);
                };

                WcfXafServiceHost serviceHost = new WcfXafServiceHost(connectionString, dataServerSecurityProvider);
                serviceHost.AddServiceEndpoint(typeof(IWcfXafDataServer), WcfDataServerHelper.CreateNetTcpBinding(), "net.tcp://127.0.0.1:1451/DataServer");
                serviceHost.Open();
                Console.WriteLine("Server is started. Press Enter to stop.");
                Console.ReadLine();
                Console.WriteLine("Stopping...");
                serviceHost.Close();
                Console.WriteLine("Server is stopped.");
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception occurs: " + e.Message);
                Console.WriteLine("Press Enter to close.");
                Console.ReadLine();
            }
        }
Example #15
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainDemoWebApplication));
     this.systemModule1                   = new DevExpress.ExpressApp.SystemModule.SystemModule();
     this.webSystemModule1                = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
     this.securityModule1                 = new DevExpress.ExpressApp.Security.SecurityModule();
     this.securityStrategyComplex1        = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
     this.authenticationStandard1         = new DevExpress.ExpressApp.Security.AuthenticationStandard();
     this.objectsModule1                  = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
     this.auditTrailModule1               = new DevExpress.ExpressApp.AuditTrail.AuditTrailModule();
     this.fileAttachmentsWebModule1       = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
     this.reportsModuleV21                = new DevExpress.ExpressApp.ReportsV2.ReportsModuleV2();
     this.reportsAspNetModuleV21          = new DevExpress.ExpressApp.ReportsV2.Web.ReportsAspNetModuleV2();
     this.validationModule1               = new DevExpress.ExpressApp.Validation.ValidationModule();
     this.validationAspNetModule1         = new DevExpress.ExpressApp.Validation.Web.ValidationAspNetModule();
     this.viewVariantsModule1             = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
     this.conditionalAppearanceModule1    = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
     this.mainDemoModule1                 = new MainDemo.Module.MainDemoModule();
     this.mainDemoWebModule1              = new MainDemo.Module.Web.MainDemoWebModule();
     this.schedulerAspNetModule1          = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
     this.schedulerModuleBase1            = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
     this.pivotChartAspNetModule1         = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
     this.pivotChartModuleBase1           = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
     this.htmlPropertyEditorAspNetModule1 = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
     this.scriptRecorderModuleBase1       = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
     this.scriptRecorderAspNetModule1     = new DevExpress.ExpressApp.ScriptRecorder.Web.ScriptRecorderAspNetModule();
     this.notificationsModule             = new DevExpress.ExpressApp.Notifications.NotificationsModule();
     this.notificationsModuleWeb          = new DevExpress.ExpressApp.Notifications.Web.NotificationsAspNetModule();
     this.elasticSearchModule1            = new BYteWare.XAF.ElasticSearch.ElasticSearchModule();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // securityStrategyComplex1
     //
     this.securityStrategyComplex1.Authentication = this.authenticationStandard1;
     this.securityStrategyComplex1.RoleType       = typeof(DevExpress.Persistent.BaseImpl.PermissionPolicy.PermissionPolicyRole);
     this.securityStrategyComplex1.UserType       = typeof(DevExpress.Persistent.BaseImpl.PermissionPolicy.PermissionPolicyUser);
     //
     // authenticationStandard1
     //
     this.authenticationStandard1.LogonParametersType = typeof(DevExpress.ExpressApp.Security.AuthenticationStandardLogonParameters);
     //
     // auditTrailModule1
     //
     this.auditTrailModule1.AuditDataItemPersistentType = typeof(DevExpress.Persistent.BaseImpl.AuditDataItemPersistent);
     //
     // reportsModuleV21
     //
     this.reportsModuleV21.EnableInplaceReports = true;
     this.reportsModuleV21.ReportDataType       = typeof(DevExpress.Persistent.BaseImpl.ReportDataV2);
     this.reportsModuleV21.ReportStoreMode      = DevExpress.ExpressApp.ReportsV2.ReportStoreModes.XML;
     //
     // validationModule1
     //
     this.validationModule1.AllowValidationDetailsAccess     = true;
     this.validationModule1.IgnoreWarningAndInformationRules = false;
     //
     // pivotChartModuleBase1
     //
     this.pivotChartModuleBase1.DataAccessMode           = DevExpress.ExpressApp.CollectionSourceDataAccessMode.Client;
     this.pivotChartModuleBase1.ShowAdditionalNavigation = false;
     //
     // notificationsModule
     //
     this.notificationsModule.CanAccessPostponedItems      = false;
     this.notificationsModule.NotificationsRefreshInterval = System.TimeSpan.Parse("00:05:00");
     this.notificationsModule.NotificationsStartDelay      = System.TimeSpan.Parse("00:00:05");
     this.notificationsModule.ShowDismissAllAction         = false;
     this.notificationsModule.ShowNotificationsWindow      = true;
     this.notificationsModule.ShowRefreshAction            = false;
     //
     // elasticSearchModule1
     //
     this.elasticSearchModule1.ElasticSearchIndexPersistentType        = null;
     this.elasticSearchModule1.ElasticSearchIndexRefreshPersistentType = null;
     //
     // MainDemoWebApplication
     //
     this.ApplicationName        = "MainDemo";
     this.CheckCompatibilityType = DevExpress.ExpressApp.CheckCompatibilityType.DatabaseSchema;
     this.Modules.Add(this.systemModule1);
     this.Modules.Add(this.webSystemModule1);
     this.Modules.Add(this.securityModule1);
     this.Modules.Add(this.objectsModule1);
     this.Modules.Add(this.auditTrailModule1);
     this.Modules.Add(this.fileAttachmentsWebModule1);
     this.Modules.Add(this.reportsModuleV21);
     this.Modules.Add(this.reportsAspNetModuleV21);
     this.Modules.Add(this.validationModule1);
     this.Modules.Add(this.validationAspNetModule1);
     this.Modules.Add(this.viewVariantsModule1);
     this.Modules.Add(this.conditionalAppearanceModule1);
     this.Modules.Add(this.pivotChartModuleBase1);
     this.Modules.Add(this.elasticSearchModule1);
     this.Modules.Add(this.mainDemoModule1);
     this.Modules.Add(this.htmlPropertyEditorAspNetModule1);
     this.Modules.Add(this.schedulerModuleBase1);
     this.Modules.Add(this.schedulerAspNetModule1);
     this.Modules.Add(this.mainDemoWebModule1);
     this.Modules.Add(this.pivotChartAspNetModule1);
     this.Modules.Add(this.scriptRecorderModuleBase1);
     this.Modules.Add(this.scriptRecorderAspNetModule1);
     this.Modules.Add(this.notificationsModule);
     this.Modules.Add(this.notificationsModuleWeb);
     this.Security = this.securityStrategyComplex1;
     this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.MainDemoWebApplication_DatabaseVersionMismatch);
     this.LastLogonParametersRead += new System.EventHandler <DevExpress.ExpressApp.LastLogonParametersReadEventArgs>(this.MainDemoWebApplication_LastLogonParametersRead);
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }
Example #16
0
 private void InitializeComponent()
 {
     this.module1                           = new DevExpress.ExpressApp.SystemModule.SystemModule();
     this.module2                           = new DevExpress.ExpressApp.Mobile.SystemModule.SystemMobileModule();
     this.module3                           = new BPIWABK.Module.BPIWABKModule();
     this.module4                           = new BPIWABK.Module.Mobile.BPIWABKMobileModule();
     this.securityModule1                   = new DevExpress.ExpressApp.Security.SecurityModule();
     this.auditTrailModule                  = new DevExpress.ExpressApp.AuditTrail.AuditTrailModule();
     this.objectsModule                     = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
     this.chartModule                       = new DevExpress.ExpressApp.Chart.ChartModule();
     this.cloneObjectModule                 = new DevExpress.ExpressApp.CloneObject.CloneObjectModule();
     this.cloneObjectMobileModule           = new DevExpress.ExpressApp.CloneObject.Mobile.CloneObjectMobileModule();
     this.conditionalAppearanceModule       = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
     this.conditionalAppearanceMobileModule = new DevExpress.ExpressApp.ConditionalAppearance.Mobile.ConditionalAppearanceMobileModule();
     this.dashboardsModule                  = new DevExpress.ExpressApp.Dashboards.DashboardsModule();
     this.fileAttachmentsMobileModule       = new DevExpress.ExpressApp.FileAttachments.Mobile.FileAttachmentsMobileModule();
     this.pivotChartModuleBase              = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
     this.pivotGridModule                   = new DevExpress.ExpressApp.PivotGrid.PivotGridModule();
     this.reportsModuleV2                   = new DevExpress.ExpressApp.ReportsV2.ReportsModuleV2();
     this.reportsMobileModuleV2             = new DevExpress.ExpressApp.ReportsV2.Mobile.ReportsMobileModuleV2();
     this.treeListEditorsModuleBase         = new DevExpress.ExpressApp.TreeListEditors.TreeListEditorsModuleBase();
     this.validationModule                  = new DevExpress.ExpressApp.Validation.ValidationModule();
     this.validationMobileModule            = new DevExpress.ExpressApp.Validation.Mobile.ValidationMobileModule();
     this.viewVariantsModule                = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
     this.securityStrategyComplex1          = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
     this.authenticationStandard1           = new DevExpress.ExpressApp.Security.AuthenticationStandard();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // auditTrailModule
     //
     this.auditTrailModule.AuditDataItemPersistentType = typeof(DevExpress.Persistent.BaseImpl.AuditDataItemPersistent);
     //
     // dashboardsModule
     //
     this.dashboardsModule.DashboardDataType = typeof(DevExpress.Persistent.BaseImpl.DashboardData);
     //
     // pivotChartModuleBase
     //
     this.pivotChartModuleBase.DataAccessMode           = DevExpress.ExpressApp.CollectionSourceDataAccessMode.Client;
     this.pivotChartModuleBase.ShowAdditionalNavigation = false;
     //
     // reportsModuleV2
     //
     this.reportsModuleV2.EnableInplaceReports = true;
     this.reportsModuleV2.ReportDataType       = typeof(DevExpress.Persistent.BaseImpl.ReportDataV2);
     this.reportsModuleV2.ReportStoreMode      = DevExpress.ExpressApp.ReportsV2.ReportStoreModes.XML;
     //
     // validationModule
     //
     this.validationModule.AllowValidationDetailsAccess     = true;
     this.validationModule.IgnoreWarningAndInformationRules = false;
     //
     // securityStrategyComplex1
     //
     this.securityStrategyComplex1.Authentication = this.authenticationStandard1;
     this.securityStrategyComplex1.RoleType       = typeof(BPIWABK.Module.BusinessObjects.Administrative.Peran);
     this.securityStrategyComplex1.UserType       = typeof(BPIWABK.Module.BusinessObjects.Administrative.Pegawai);
     //
     // authenticationStandard1
     //
     this.authenticationStandard1.LogonParametersType = typeof(DevExpress.ExpressApp.Security.AuthenticationStandardLogonParameters);
     //
     // BPIWABKMobileApplication
     //
     this.ApplicationName = "BPIWABK";
     this.Modules.Add(this.module1);
     this.Modules.Add(this.securityModule1);
     this.Modules.Add(this.module2);
     this.Modules.Add(this.auditTrailModule);
     this.Modules.Add(this.objectsModule);
     this.Modules.Add(this.chartModule);
     this.Modules.Add(this.cloneObjectModule);
     this.Modules.Add(this.conditionalAppearanceModule);
     this.Modules.Add(this.dashboardsModule);
     this.Modules.Add(this.pivotChartModuleBase);
     this.Modules.Add(this.pivotGridModule);
     this.Modules.Add(this.reportsModuleV2);
     this.Modules.Add(this.treeListEditorsModuleBase);
     this.Modules.Add(this.validationModule);
     this.Modules.Add(this.viewVariantsModule);
     this.Modules.Add(this.module3);
     this.Modules.Add(this.cloneObjectMobileModule);
     this.Modules.Add(this.conditionalAppearanceMobileModule);
     this.Modules.Add(this.fileAttachmentsMobileModule);
     this.Modules.Add(this.reportsMobileModuleV2);
     this.Modules.Add(this.validationMobileModule);
     this.Modules.Add(this.module4);
     this.Security = this.securityStrategyComplex1;
     this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.BPIWABKMobileApplication_DatabaseVersionMismatch);
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }
 public OAuthProvider(Type userType, SecurityStrategyComplex security)
 {
     Guard.ArgumentNotNull(userType, "userType");
     this.userType = userType;
     this.security = security;
 }
        private void Login(SecurityStrategyComplex security, IObjectSpaceProvider objectSpaceProvider)
        {
            IObjectSpace objectSpace = objectSpaceProvider.CreateObjectSpace();

            security.Logon(objectSpace);
        }
Example #19
0
 void InitializeComponent() {
     module1 = new SystemModule();
     module2 = new SystemAspNetModule();
     module3 = new AuditTrailTesterModule();
     module4 = new AuditTrailTesterAspNetModule();
     sqlConnection1 = new SqlConnection();
     auditTrailModule1 = new AuditTrailModule();
     securityModule1 = new SecurityModule();
     validationModule1 = new ValidationModule();
     conditionalAppearanceModule1 = new ConditionalAppearanceModule();
     logicModule1 = new LogicModule();
     xpandAuditTrailModule1 = new XpandAuditTrailModule();
     securityStrategyComplex1 = new SecurityStrategyComplex();
     authenticationStandard1 = new AuthenticationStandard();
     ((ISupportInitialize) (this)).BeginInit();
     // 
     // sqlConnection1
     // 
     sqlConnection1.ConnectionString =
         "Integrated Security=SSPI;Pooling=false;Data Source=.\\SQLEXPRESS;Initial Catalog=A" +
         "uditTrailTester";
     sqlConnection1.FireInfoMessageEventOnUserErrors = false;
     // 
     // auditTrailModule1
     // 
     auditTrailModule1.AuditDataItemPersistentType = typeof (AuditDataItemPersistent);
     // 
     // validationModule1
     // 
     validationModule1.AllowValidationDetailsAccess = true;
     // 
     // securityStrategyComplex1
     // 
     securityStrategyComplex1.Authentication = authenticationStandard1;
     securityStrategyComplex1.RoleType = typeof (XpandRole);
     securityStrategyComplex1.UserType = typeof (SecuritySystemUser);
     // 
     // authenticationStandard1
     // 
     authenticationStandard1.LogonParametersType = typeof (AuthenticationStandardLogonParameters);
     // 
     // AuditTrailTesterAspNetApplication
     // 
     ApplicationName = "AuditTrailTester";
     Connection = sqlConnection1;
     Modules.Add(module1);
     Modules.Add(module2);
     Modules.Add(auditTrailModule1);
     Modules.Add(securityModule1);
     Modules.Add(validationModule1);
     Modules.Add(conditionalAppearanceModule1);
     Modules.Add(logicModule1);
     Modules.Add(xpandAuditTrailModule1);
     Modules.Add(module3);
     Modules.Add(module4);
     Security = securityStrategyComplex1;
     DatabaseVersionMismatch += AuditTrailTesterAspNetApplication_DatabaseVersionMismatch;
     ((ISupportInitialize) (this)).EndInit();
 }
Example #20
0
		private void InitializeComponent() {
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EFDemoWebApplication));
			this.systemModule1 = new DevExpress.ExpressApp.SystemModule.SystemModule();
			this.webSystemModule1 = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
			this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
			this.securityModule1 = new DevExpress.ExpressApp.Security.SecurityModule();
			this.securityStrategyComplex1 = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
			this.authenticationStandard1 = new DevExpress.ExpressApp.Security.AuthenticationStandard();
			this.fileAttachmentsWebModule1 = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
			this.validationModule1 = new DevExpress.ExpressApp.Validation.ValidationModule();
			this.viewVariantsModule1 = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
			this.conditionalAppearanceModule1 = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
			this.efDemoModule1 = new EFDemo.Module.EFDemoModule();
			this.efDemoWebModule1 = new EFDemo.Module.Web.EFDemoWebModule();
			this.schedulerAspNetModule1 = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
			this.reportsModule1 = new DevExpress.ExpressApp.Reports.ReportsModule();
			this.reportsWebModule1 = new DevExpress.ExpressApp.Reports.Web.ReportsAspNetModule();
			this.schedulerModuleBase1 = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
			this.pivotChartAspNetModule1 = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
			this.pivotChartModuleBase1 = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
			this.htmlPropertyEditorAspNetModule1 = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
			this.scriptRecorderModuleBase1 = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
			this.scriptRecorderAspNetModule1 = new DevExpress.ExpressApp.ScriptRecorder.Web.ScriptRecorderAspNetModule();
			((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
			// 
			// sqlConnection1
			// 
			this.sqlConnection1.ConnectionString = @"Integrated Security=True;Pooling=false;MultipleActiveResultSets=True;Data Source=.\SQLExpress;Initial Catalog=EFDemo_v12.2";
			this.sqlConnection1.FireInfoMessageEventOnUserErrors = false;
			// 
			// securityComplex1
			// 
			this.securityStrategyComplex1.Authentication = this.authenticationStandard1;
			this.securityStrategyComplex1.RoleType = typeof(EFDemo.Module.Data.Role);
			this.securityStrategyComplex1.UserType = typeof(EFDemo.Module.Data.User);
			// 
			// authenticationStandard1
			// 
			this.authenticationStandard1.LogonParametersType = typeof(DevExpress.ExpressApp.Security.AuthenticationStandardLogonParameters);
			this.authenticationStandard1.UserType = typeof(EFDemo.Module.Data.User);
			// 
			// reportsModule1
			// 
			this.reportsModule1.EnableInplaceReports = true;
			this.reportsModule1.ReportDataType = typeof(EFDemo.Module.Data.ReportData_EF);
			this.reportsModule1.ShowAdditionalNavigation = false;
			// 
			// validationModule1
			// 
			this.validationModule1.AllowValidationDetailsAccess = true;
			// 
			// viewVariantsModule1
			// 
			this.viewVariantsModule1.GenerateVariantsNode = false;
			this.viewVariantsModule1.ShowAdditionalNavigation = false;
			// 
			// pivotChartModuleBase1
			// 
			this.pivotChartModuleBase1.ShowAdditionalNavigation = false;
			// 
			// EFDemoWebApplication
			// 
			this.ApplicationName = "EFDemo";
			this.Connection = this.sqlConnection1;
			this.Modules.Add(this.systemModule1);
			this.Modules.Add(this.webSystemModule1);
			this.Modules.Add(this.securityModule1);
			this.Modules.Add(this.fileAttachmentsWebModule1);
			this.Modules.Add(this.validationModule1);
			this.Modules.Add(this.viewVariantsModule1);
			this.Modules.Add(this.conditionalAppearanceModule1);
			this.Modules.Add(this.efDemoModule1);
			this.Modules.Add(this.efDemoWebModule1);
			this.Modules.Add(this.schedulerModuleBase1);
			this.Modules.Add(this.schedulerAspNetModule1);
			this.Modules.Add(this.reportsModule1);
			this.Modules.Add(this.reportsWebModule1);
			this.Modules.Add(this.pivotChartModuleBase1);
			this.Modules.Add(this.pivotChartAspNetModule1);
			this.Modules.Add(this.htmlPropertyEditorAspNetModule1);
			this.Modules.Add(this.scriptRecorderModuleBase1);
			this.Modules.Add(this.scriptRecorderAspNetModule1);
			this.Security = this.securityStrategyComplex1;
			this.DatabaseVersionMismatch += new System.EventHandler<DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.EFDemoWebApplication_DatabaseVersionMismatch);
			((System.ComponentModel.ISupportInitialize)(this)).EndInit();

		}
Example #21
0
        private void initXAFServer()
        {
            string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

            ValueManager.ValueManagerType = typeof(MultiThreadValueManager <>).GetGenericTypeDefinition();

            SecurityAdapterHelper.Enable();
            ServerApplication serverApplication = new ServerApplication();

            serverApplication.ApplicationName        = "LogXExplorer";
            serverApplication.CheckCompatibilityType = CheckCompatibilityType.DatabaseSchema;
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && serverApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                serverApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif

            serverApplication.Modules.BeginInit();
            serverApplication.Modules.Add(new DevExpress.ExpressApp.Security.SecurityModule());
            serverApplication.Modules.Add(new LogXExplorer.Module.LogXExplorerModule());
            serverApplication.Modules.Add(new LogXExplorer.Module.Win.LogXExplorerWindowsFormsModule());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.AuditTrail.AuditTrailModule());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.CloneObject.CloneObjectModule());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.Dashboards.DashboardsModule()
            {
                DashboardDataType = typeof(DevExpress.Persistent.BaseImpl.DashboardData)
            });
            serverApplication.Modules.Add(new DevExpress.ExpressApp.Dashboards.Win.DashboardsWindowsFormsModule());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.FileAttachments.Win.FileAttachmentsWindowsFormsModule());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.Notifications.NotificationsModule());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.Notifications.Win.NotificationsWindowsFormsModule());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.ReportsV2.ReportsModuleV2()
            {
                ReportDataType = typeof(DevExpress.Persistent.BaseImpl.ReportDataV2)
            });
            serverApplication.Modules.Add(new DevExpress.ExpressApp.ReportsV2.Win.ReportsWindowsFormsModuleV2());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.ValidationModule());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.Win.ValidationWindowsFormsModule());
            serverApplication.Modules.Add(new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule());
            serverApplication.Modules.EndInit();

            serverApplication.DatabaseVersionMismatch         += new EventHandler <DatabaseVersionMismatchEventArgs>(serverApplication_DatabaseVersionMismatch);
            serverApplication.CreateCustomObjectSpaceProvider += (s, e) =>
            {
                e.ObjectSpaceProviders.Add(new XPObjectSpaceProvider(e.ConnectionString, e.Connection));
                e.ObjectSpaceProviders.Add(new NonPersistentObjectSpaceProvider(serverApplication.TypesInfo, null));
            };
            serverApplication.ConnectionString = connectionString;

            //System.Console.WriteLine("Setup...");
            serverApplication.Setup();
            //System.Console.WriteLine("CheckCompatibility...");
            serverApplication.CheckCompatibility();
            serverApplication.Dispose();

            //System.Console.WriteLine("Starting server...");
            Func <IDataServerSecurity> dataServerSecurityProvider = () =>
            {
                SecurityStrategyComplex security = new SecurityStrategyComplex(typeof(PermissionPolicyUser), typeof(PermissionPolicyRole), new AuthenticationStandard());
                security.SupportNavigationPermissionsForTypes = false;
                return(security);
            };

            //+++++ configból a connection stringet: net.tcp://127.0.0.1:1451/DataServer
            xafServiceHost = new WcfXafServiceHost(connectionString, dataServerSecurityProvider);
            xafServiceHost.AddServiceEndpoint(typeof(IWcfXafDataServer), WcfDataServerHelper.CreateNetTcpBinding(), "net.tcp://127.0.0.1:1451/DataServer");
            xafServiceHost.Open();
            System.Console.WriteLine("XAF service inited.");

            //test
            ConnectionHelper.Connect(DevExpress.Xpo.DB.AutoCreateOption.DatabaseAndSchema, true);
            System.Console.WriteLine("ConnectionHelper connected.");
        }
Example #22
0
        static void Main(string[] args)
        {
            try {
                string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

                ValueManager.ValueManagerType = typeof(MultiThreadValueManager <>).GetGenericTypeDefinition();

                SecurityAdapterHelper.Enable();
                ServerApplication serverApplication = new ServerApplication();
                serverApplication.ApplicationName        = "P3TEK";
                serverApplication.CheckCompatibilityType = CheckCompatibilityType.DatabaseSchema;
#if DEBUG
                if (System.Diagnostics.Debugger.IsAttached && serverApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
                {
                    serverApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
                }
#endif

                serverApplication.Modules.BeginInit();
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Security.SecurityModule());
                serverApplication.Modules.Add(new P3TEK.Module.P3TEKModule());
                serverApplication.Modules.Add(new P3TEK.Module.Win.P3TEKWindowsFormsModule());
                serverApplication.Modules.Add(new P3TEK.Module.Web.P3TEKAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.AuditTrail.AuditTrailModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Chart.ChartModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Chart.Win.ChartWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Chart.Web.ChartAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.CloneObject.CloneObjectModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Dashboards.DashboardsModule()
                {
                    DashboardDataType = typeof(DevExpress.Persistent.BaseImpl.DashboardData)
                });
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Dashboards.Win.DashboardsWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Dashboards.Web.DashboardsAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.FileAttachments.Win.FileAttachmentsWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.HtmlPropertyEditor.Win.HtmlPropertyEditorWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Kpi.KpiModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotChart.Win.PivotChartWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotGrid.PivotGridModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotGrid.Win.PivotGridWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotGrid.Web.PivotGridAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ReportsV2.ReportsModuleV2()
                {
                    ReportDataType = typeof(DevExpress.Persistent.BaseImpl.ReportDataV2)
                });
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ReportsV2.Win.ReportsWindowsFormsModuleV2());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ReportsV2.Web.ReportsAspNetModuleV2());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.TreeListEditors.TreeListEditorsModuleBase());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.TreeListEditors.Win.TreeListEditorsWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.TreeListEditors.Web.TreeListEditorsAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.ValidationModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.Win.ValidationWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.Web.ValidationAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule());
                serverApplication.Modules.EndInit();

                serverApplication.DatabaseVersionMismatch         += new EventHandler <DatabaseVersionMismatchEventArgs>(serverApplication_DatabaseVersionMismatch);
                serverApplication.CreateCustomObjectSpaceProvider += (s, e) => {
                    e.ObjectSpaceProviders.Add(new XPObjectSpaceProvider(e.ConnectionString, e.Connection));
                    e.ObjectSpaceProviders.Add(new NonPersistentObjectSpaceProvider(serverApplication.TypesInfo, null));
                };

                serverApplication.ConnectionString = connectionString;

                Console.WriteLine("Setup...");
                serverApplication.Setup();
                Console.WriteLine("CheckCompatibility...");
                serverApplication.CheckCompatibility();
                serverApplication.Dispose();

                Console.WriteLine("Starting server...");
                Func <IDataServerSecurity> dataServerSecurityProvider = () =>
                {
                    SecurityStrategyComplex security = new SecurityStrategyComplex(typeof(PermissionPolicyUser), typeof(PermissionPolicyRole), new AuthenticationStandard());
                    security.SupportNavigationPermissionsForTypes = false;
                    return(security);
                };

                WcfXafServiceHost serviceHost = new WcfXafServiceHost(connectionString, dataServerSecurityProvider);
                serviceHost.AddServiceEndpoint(typeof(IWcfXafDataServer), WcfDataServerHelper.CreateNetTcpBinding(), "net.tcp://127.0.0.1:1451/DataServer");
                serviceHost.Open();
                Console.WriteLine("Server is started. Press Enter to stop.");
                Console.ReadLine();
                Console.WriteLine("Stopping...");
                serviceHost.Close();
                Console.WriteLine("Server is stopped.");
            }
            catch (Exception e) {
                Console.WriteLine("Exception occurs: " + e.Message);
                Console.WriteLine("Press Enter to close.");
                Console.ReadLine();
            }
        }
Example #23
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EFDemoWebApplication));
     this.systemModule1                   = new DevExpress.ExpressApp.SystemModule.SystemModule();
     this.webSystemModule1                = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
     this.securityModule1                 = new DevExpress.ExpressApp.Security.SecurityModule();
     this.securityStrategyComplex1        = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
     this.authenticationStandard1         = new DevExpress.ExpressApp.Security.AuthenticationStandard();
     this.fileAttachmentsWebModule1       = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
     this.validationModule1               = new DevExpress.ExpressApp.Validation.ValidationModule();
     this.viewVariantsModule1             = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
     this.conditionalAppearanceModule1    = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
     this.efDemoModule1                   = new EFDemo.Module.EFDemoModule();
     this.efDemoWebModule1                = new EFDemo.Module.Web.EFDemoWebModule();
     this.schedulerAspNetModule1          = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
     this.reportsModule1                  = new DevExpress.ExpressApp.Reports.ReportsModule();
     this.reportsWebModule1               = new DevExpress.ExpressApp.Reports.Web.ReportsAspNetModule();
     this.schedulerModuleBase1            = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
     this.pivotChartAspNetModule1         = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
     this.pivotChartModuleBase1           = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
     this.htmlPropertyEditorAspNetModule1 = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
     this.scriptRecorderModuleBase1       = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
     this.scriptRecorderAspNetModule1     = new DevExpress.ExpressApp.ScriptRecorder.Web.ScriptRecorderAspNetModule();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // securityComplex1
     //
     this.securityStrategyComplex1.Authentication = this.authenticationStandard1;
     this.securityStrategyComplex1.RoleType       = typeof(EFDemo.Module.Data.Role);
     this.securityStrategyComplex1.UserType       = typeof(EFDemo.Module.Data.User);
     //
     // authenticationStandard1
     //
     this.authenticationStandard1.LogonParametersType = typeof(DevExpress.ExpressApp.Security.AuthenticationStandardLogonParameters);
     this.authenticationStandard1.UserType            = typeof(EFDemo.Module.Data.User);
     //
     // reportsModule1
     //
     this.reportsModule1.EnableInplaceReports     = true;
     this.reportsModule1.ReportDataType           = typeof(EFDemo.Module.Data.ReportData);
     this.reportsModule1.ShowAdditionalNavigation = false;
     //
     // validationModule1
     //
     this.validationModule1.AllowValidationDetailsAccess = true;
     //
     // viewVariantsModule1
     //
     this.viewVariantsModule1.GenerateVariantsNode     = false;
     this.viewVariantsModule1.ShowAdditionalNavigation = false;
     //
     // pivotChartModuleBase1
     //
     this.pivotChartModuleBase1.ShowAdditionalNavigation = false;
     //
     // EFDemoWebApplication
     //
     this.ApplicationName = "EFDemo";
     this.Modules.Add(this.systemModule1);
     this.Modules.Add(this.webSystemModule1);
     this.Modules.Add(this.securityModule1);
     this.Modules.Add(this.fileAttachmentsWebModule1);
     this.Modules.Add(this.validationModule1);
     this.Modules.Add(this.viewVariantsModule1);
     this.Modules.Add(this.conditionalAppearanceModule1);
     this.Modules.Add(this.efDemoModule1);
     this.Modules.Add(this.efDemoWebModule1);
     this.Modules.Add(this.schedulerModuleBase1);
     this.Modules.Add(this.schedulerAspNetModule1);
     this.Modules.Add(this.reportsModule1);
     this.Modules.Add(this.reportsWebModule1);
     this.Modules.Add(this.pivotChartModuleBase1);
     this.Modules.Add(this.pivotChartAspNetModule1);
     this.Modules.Add(this.htmlPropertyEditorAspNetModule1);
     this.Modules.Add(this.scriptRecorderModuleBase1);
     this.Modules.Add(this.scriptRecorderAspNetModule1);
     this.Security = this.securityStrategyComplex1;
     this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.EFDemoWebApplication_DatabaseVersionMismatch);
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }
Example #24
0
 private void InitializeComponent()
 {
     this.module1                        = new DevExpress.ExpressApp.SystemModule.SystemModule();
     this.module2                        = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
     this.objectsModule                  = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
     this.chartModule                    = new DevExpress.ExpressApp.Chart.ChartModule();
     this.chartAspNetModule              = new DevExpress.ExpressApp.Chart.Web.ChartAspNetModule();
     this.cloneObjectModule              = new DevExpress.ExpressApp.CloneObject.CloneObjectModule();
     this.conditionalAppearanceModule    = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
     this.dashboardsModule               = new DevExpress.ExpressApp.Dashboards.DashboardsModule();
     this.dashboardsAspNetModule         = new DevExpress.ExpressApp.Dashboards.Web.DashboardsAspNetModule();
     this.fileAttachmentsAspNetModule    = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
     this.htmlPropertyEditorAspNetModule = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
     this.kpiModule                      = new DevExpress.ExpressApp.Kpi.KpiModule();
     this.mapsAspNetModule               = new DevExpress.ExpressApp.Maps.Web.MapsAspNetModule();
     this.notificationsModule            = new DevExpress.ExpressApp.Notifications.NotificationsModule();
     this.notificationsAspNetModule      = new DevExpress.ExpressApp.Notifications.Web.NotificationsAspNetModule();
     this.reportsModuleV2                = new DevExpress.ExpressApp.ReportsV2.ReportsModuleV2();
     this.reportsAspNetModuleV2          = new DevExpress.ExpressApp.ReportsV2.Web.ReportsAspNetModuleV2();
     this.schedulerModuleBase            = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
     this.schedulerAspNetModule          = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
     this.scriptRecorderModuleBase       = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
     this.scriptRecorderAspNetModule     = new DevExpress.ExpressApp.ScriptRecorder.Web.ScriptRecorderAspNetModule();
     this.stateMachineModule             = new DevExpress.ExpressApp.StateMachine.StateMachineModule();
     this.validationModule               = new DevExpress.ExpressApp.Validation.ValidationModule();
     this.validationAspNetModule         = new DevExpress.ExpressApp.Validation.Web.ValidationAspNetModule();
     this.workflowModule                 = new DevExpress.ExpressApp.Workflow.WorkflowModule();
     this.module3                        = new GestParcAuto.Module.GestParcAutoModule();
     this.module4                        = new GestParcAuto.Module.Web.GestParcAutoAspNetModule();
     this.securityModule1                = new DevExpress.ExpressApp.Security.SecurityModule();
     this.gestParcAutoModule1            = new GestParcAuto.Module.GestParcAutoModule();
     this.gestParcAutoModule2            = new GestParcAuto.Module.GestParcAutoModule();
     this.authenticationStandard1        = new DevExpress.ExpressApp.Security.AuthenticationStandard();
     this.securityStrategyComplex1       = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // cloneObjectModule
     //
     this.cloneObjectModule.ClonerType = null;
     //
     // dashboardsModule
     //
     this.dashboardsModule.DashboardDataType = typeof(DevExpress.Persistent.BaseImpl.DashboardData);
     //
     // notificationsModule
     //
     this.notificationsModule.CanAccessPostponedItems      = false;
     this.notificationsModule.NotificationsRefreshInterval = System.TimeSpan.Parse("00:05:00");
     this.notificationsModule.NotificationsStartDelay      = System.TimeSpan.Parse("00:05:00");
     this.notificationsModule.ShowDismissAllAction         = false;
     this.notificationsModule.ShowNotificationsWindow      = true;
     this.notificationsModule.ShowRefreshAction            = false;
     //
     // reportsModuleV2
     //
     this.reportsModuleV2.EnableInplaceReports = true;
     this.reportsModuleV2.ReportDataType       = typeof(DevExpress.Persistent.BaseImpl.ReportDataV2);
     this.reportsModuleV2.ReportStoreMode      = DevExpress.ExpressApp.ReportsV2.ReportStoreModes.XML;
     //
     // reportsAspNetModuleV2
     //
     this.reportsAspNetModuleV2.ReportViewerType = DevExpress.ExpressApp.ReportsV2.Web.ReportViewerTypes.HTML5;
     //
     // stateMachineModule
     //
     this.stateMachineModule.StateMachineStorageType = typeof(DevExpress.ExpressApp.StateMachine.Xpo.XpoStateMachine);
     //
     // validationModule
     //
     this.validationModule.AllowValidationDetailsAccess     = true;
     this.validationModule.IgnoreWarningAndInformationRules = false;
     //
     // workflowModule
     //
     this.workflowModule.RunningWorkflowInstanceInfoType   = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoRunningWorkflowInstanceInfo);
     this.workflowModule.StartWorkflowRequestType          = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoStartWorkflowRequest);
     this.workflowModule.UserActivityVersionType           = typeof(DevExpress.ExpressApp.Workflow.Versioning.XpoUserActivityVersion);
     this.workflowModule.WorkflowControlCommandRequestType = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoWorkflowInstanceControlCommandRequest);
     this.workflowModule.WorkflowDefinitionType            = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoWorkflowDefinition);
     this.workflowModule.WorkflowInstanceKeyType           = typeof(DevExpress.Workflow.Xpo.XpoInstanceKey);
     this.workflowModule.WorkflowInstanceType = typeof(DevExpress.Workflow.Xpo.XpoWorkflowInstance);
     //
     // authenticationStandard1
     //
     this.authenticationStandard1.LogonParametersType = typeof(DevExpress.ExpressApp.Security.AuthenticationStandardLogonParameters);
     //
     // securityStrategyComplex1
     //
     this.securityStrategyComplex1.AllowAnonymousAccess = false;
     this.securityStrategyComplex1.Authentication       = this.authenticationStandard1;
     this.securityStrategyComplex1.RoleType             = typeof(DevExpress.Persistent.BaseImpl.PermissionPolicy.PermissionPolicyRole);
     this.securityStrategyComplex1.UserType             = typeof(DevExpress.Persistent.BaseImpl.PermissionPolicy.PermissionPolicyUser);
     //
     // GestParcAutoAspNetApplication
     //
     this.ApplicationName        = "GestParcAuto";
     this.CheckCompatibilityType = DevExpress.ExpressApp.CheckCompatibilityType.DatabaseSchema;
     this.Modules.Add(this.module1);
     this.Modules.Add(this.module2);
     this.Modules.Add(this.objectsModule);
     this.Modules.Add(this.chartModule);
     this.Modules.Add(this.cloneObjectModule);
     this.Modules.Add(this.conditionalAppearanceModule);
     this.Modules.Add(this.dashboardsModule);
     this.Modules.Add(this.validationModule);
     this.Modules.Add(this.kpiModule);
     this.Modules.Add(this.notificationsModule);
     this.Modules.Add(this.reportsModuleV2);
     this.Modules.Add(this.schedulerModuleBase);
     this.Modules.Add(this.scriptRecorderModuleBase);
     this.Modules.Add(this.stateMachineModule);
     this.Modules.Add(this.workflowModule);
     this.Modules.Add(this.module3);
     this.Modules.Add(this.chartAspNetModule);
     this.Modules.Add(this.dashboardsAspNetModule);
     this.Modules.Add(this.fileAttachmentsAspNetModule);
     this.Modules.Add(this.htmlPropertyEditorAspNetModule);
     this.Modules.Add(this.mapsAspNetModule);
     this.Modules.Add(this.notificationsAspNetModule);
     this.Modules.Add(this.reportsAspNetModuleV2);
     this.Modules.Add(this.schedulerAspNetModule);
     this.Modules.Add(this.scriptRecorderAspNetModule);
     this.Modules.Add(this.validationAspNetModule);
     this.Modules.Add(this.module4);
     this.Modules.Add(this.securityModule1);
     this.Security = this.securityStrategyComplex1;
     this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.GestParcAutoAspNetApplication_DatabaseVersionMismatch);
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }
Example #25
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainDemoWebApplication));
     this.systemModule1            = new DevExpress.ExpressApp.SystemModule.SystemModule();
     this.webSystemModule1         = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
     this.securityModule1          = new DevExpress.ExpressApp.Security.SecurityModule();
     this.securityStrategyComplex1 = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
     this.securityStrategyComplex1.SupportNavigationPermissionsForTypes = false;
     this.authenticationStandard1         = new DevExpress.ExpressApp.Security.AuthenticationStandard();
     this.objectsModule1                  = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
     this.auditTrailModule1               = new DevExpress.ExpressApp.AuditTrail.AuditTrailModule();
     this.fileAttachmentsWebModule1       = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
     this.reportsModuleV21                = new DevExpress.ExpressApp.ReportsV2.ReportsModuleV2();
     this.reportsAspNetModuleV21          = new DevExpress.ExpressApp.ReportsV2.Web.ReportsAspNetModuleV2();
     this.validationModule1               = new DevExpress.ExpressApp.Validation.ValidationModule();
     this.validationAspNetModule1         = new DevExpress.ExpressApp.Validation.Web.ValidationAspNetModule();
     this.viewVariantsModule1             = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
     this.conditionalAppearanceModule1    = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
     this.mainDemoModule1                 = new MainDemo.Module.MainDemoModule();
     this.mainDemoWebModule1              = new MainDemo.Module.Web.MainDemoWebModule();
     this.schedulerAspNetModule1          = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
     this.schedulerModuleBase1            = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
     this.pivotChartAspNetModule1         = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
     this.pivotChartModuleBase1           = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
     this.htmlPropertyEditorAspNetModule1 = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
     this.scriptRecorderModuleBase1       = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
     this.scriptRecorderAspNetModule1     = new DevExpress.ExpressApp.ScriptRecorder.Web.ScriptRecorderAspNetModule();
     this.notificationsModule             = new DevExpress.ExpressApp.Notifications.NotificationsModule();
     this.notificationsModuleWeb          = new DevExpress.ExpressApp.Notifications.Web.NotificationsAspNetModule();
     this.mapsModuleWeb = new DevExpress.ExpressApp.Maps.Web.MapsAspNetModule();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // securityComplex1
     //
     this.securityStrategyComplex1.Authentication = this.authenticationStandard1;
     this.securityStrategyComplex1.RoleType       = typeof(PermissionPolicyRole);
     this.securityStrategyComplex1.UserType       = typeof(PermissionPolicyUser);
     //
     // authenticationStandard1
     //
     this.authenticationStandard1.LogonParametersType = typeof(DevExpress.ExpressApp.Security.AuthenticationStandardLogonParameters);
     //
     // auditTrailModule1
     //
     this.auditTrailModule1.AuditDataItemPersistentType = typeof(DevExpress.Persistent.BaseImpl.AuditDataItemPersistent);
     //
     // reportsModuleV21
     //
     this.reportsModuleV21.EnableInplaceReports   = true;
     this.reportsModuleV21.ReportDataType         = typeof(DevExpress.Persistent.BaseImpl.ReportDataV2);
     this.reportsModuleV21.ReportStoreMode        = DevExpress.ExpressApp.ReportsV2.ReportStoreModes.XML;
     this.reportsAspNetModuleV21.ReportViewerType = DevExpress.ExpressApp.ReportsV2.Web.ReportViewerTypes.HTML5;
     //
     // validationModule1
     //
     this.validationModule1.AllowValidationDetailsAccess = true;
     //
     // viewVariantsModule1
     //
     this.viewVariantsModule1.ShowAdditionalNavigation = false;
     //
     // pivotChartModuleBase1
     //
     this.pivotChartModuleBase1.ShowAdditionalNavigation = false;
     //
     // mapsModule
     //
     this.mapsModuleWeb.GoogleApiKey            = "AIzaSyDk2m6n8ICK7FSmTHBLlapAWF3epiDdkHE";
     this.mapsModuleWeb.SetMapsEditorsAsDefault = false;
     //
     // MainDemoWebApplication
     //
     this.ApplicationName = "MainDemo";
     this.Modules.Add(this.systemModule1);
     this.Modules.Add(this.webSystemModule1);
     this.Modules.Add(this.securityModule1);
     this.Modules.Add(this.objectsModule1);
     this.Modules.Add(this.auditTrailModule1);
     this.Modules.Add(this.fileAttachmentsWebModule1);
     this.Modules.Add(this.reportsModuleV21);
     this.Modules.Add(this.reportsAspNetModuleV21);
     this.Modules.Add(this.validationModule1);
     this.Modules.Add(this.validationAspNetModule1);
     this.Modules.Add(this.viewVariantsModule1);
     this.Modules.Add(this.conditionalAppearanceModule1);
     this.Modules.Add(this.mainDemoModule1);
     this.Modules.Add(this.mainDemoWebModule1);
     this.Modules.Add(this.schedulerModuleBase1);
     this.Modules.Add(this.schedulerAspNetModule1);
     this.Modules.Add(this.pivotChartModuleBase1);
     this.Modules.Add(this.pivotChartAspNetModule1);
     this.Modules.Add(this.htmlPropertyEditorAspNetModule1);
     this.Modules.Add(this.scriptRecorderModuleBase1);
     this.Modules.Add(this.scriptRecorderAspNetModule1);
     this.Modules.Add(this.notificationsModule);
     this.Modules.Add(this.notificationsModuleWeb);
     this.Modules.Add(this.mapsModuleWeb);
     this.Security = this.securityStrategyComplex1;
     this.CheckCompatibilityType   = DevExpress.ExpressApp.CheckCompatibilityType.DatabaseSchema;
     this.LastLogonParametersRead += new System.EventHandler <DevExpress.ExpressApp.LastLogonParametersReadEventArgs>(this.MainDemoWebApplication_LastLogonParametersRead);
     this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.MainDemoWebApplication_DatabaseVersionMismatch);
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XCRMWebApplication));
            this.systemModule1           = new DevExpress.ExpressApp.SystemModule.SystemModule();
            this.webSystemModule1        = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
            this.securityModule1         = new DevExpress.ExpressApp.Security.SecurityModule();
            this.securityStrategyComplex = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
            this.securityStrategyComplex.SupportNavigationPermissionsForTypes = false;
            this.authenticationStandard1   = new DevExpress.ExpressApp.Security.AuthenticationStandard();
            this.objectsModule1            = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
            this.fileAttachmentsWebModule1 = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
            this.reportsModule1            = new DevExpress.ExpressApp.ReportsV2.ReportsModuleV2();
            this.reportsWebModule1         = new DevExpress.ExpressApp.ReportsV2.Web.ReportsAspNetModuleV2();
            this.validationModule1         = new DevExpress.ExpressApp.Validation.ValidationModule();
            this.validationAspNetModule1   = new DevExpress.ExpressApp.Validation.Web.ValidationAspNetModule();
            this.viewVariantsModule1       = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
            this.schedulerAspNetModule1    = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
            this.schedulerModuleBase1      = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
            this.kpiModule = new DevExpress.ExpressApp.Kpi.KpiModule();
            this.htmlPropertyEditorAspNetModule1 = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
            this.treeListEditorsAspNetModule     = new DevExpress.ExpressApp.TreeListEditors.Web.TreeListEditorsAspNetModule();
            this.pivotGridModule       = new DevExpress.ExpressApp.PivotGrid.PivotGridModule();
            this.pivotGridAspNetModule = new DevExpress.ExpressApp.PivotGrid.Web.PivotGridAspNetModule();
            this.XCRMFullAppModule1    = new XCRMModule();
            this.xcrmAspNetModule      = new XCRMAspNetModule();
            this.chartModule           = new DevExpress.ExpressApp.Chart.ChartModule();
            this.chartAspNetModule     = new DevExpress.ExpressApp.Chart.Web.ChartAspNetModule();
            this.dashboardsModule      = new DevExpress.ExpressApp.Dashboards.DashboardsModule();

            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            //
            // authenticationStandard1
            this.authenticationStandard1.LogonParametersType = typeof(DevExpress.ExpressApp.Security.AuthenticationStandardLogonParameters);
            this.authenticationStandard1.UserType            = typeof(MyAppUser);
            //
            // securityComplex
            //
            this.securityStrategyComplex.UserType       = typeof(MyAppUser);
            this.securityStrategyComplex.Authentication = this.authenticationStandard1;
            this.securityStrategyComplex.RoleType       = typeof(PersistentRole);
            this.Security = securityStrategyComplex;
            //
            // reportsModule1
            //
            this.reportsModule1.EnableInplaceReports     = true;
            this.reportsModule1.ReportDataType           = typeof(DevExpress.Persistent.BaseImpl.EF.ReportDataV2);
            this.reportsModule1.ShowAdditionalNavigation = false;
            this.reportsModule1.ReportStoreMode          = DevExpress.ExpressApp.ReportsV2.ReportStoreModes.XML;
            this.reportsWebModule1.ReportViewerType      = DevExpress.ExpressApp.ReportsV2.Web.ReportViewerTypes.HTML5;
            //
            // dashboardsModule1
            //
            this.dashboardsModule.DashboardDataType               = typeof(DevExpress.Persistent.BaseImpl.EF.DashboardData);
            this.dashboardsModule.GenerateNavigationItem          = false;
            this.dashboardsModule.HideDirectDataSourceConnections = true;
            //
            // validationModule1
            //
            this.validationModule1.AllowValidationDetailsAccess = true;
            //
            // viewVariantsModule1
            //
            this.viewVariantsModule1.ShowAdditionalNavigation = false;
            //
            // MainDemoWebApplication
            //
            this.ApplicationName        = "XCRM";
            this.CheckCompatibilityType = DevExpress.ExpressApp.CheckCompatibilityType.DatabaseSchema;
            this.Modules.Add(this.systemModule1);
            this.Modules.Add(this.webSystemModule1);
            this.Modules.Add(this.securityModule1);
            this.Modules.Add(this.objectsModule1);
            this.Modules.Add(this.fileAttachmentsWebModule1);
            this.Modules.Add(this.dashboardsModule);
            this.Modules.Add(this.reportsModule1);
            this.Modules.Add(this.reportsWebModule1);
            this.Modules.Add(this.validationModule1);
            this.Modules.Add(this.validationAspNetModule1);
            this.Modules.Add(this.viewVariantsModule1);
            this.Modules.Add(this.schedulerModuleBase1);
            this.Modules.Add(this.schedulerAspNetModule1);
            this.Modules.Add(this.kpiModule);
            this.Modules.Add(this.chartModule);
            this.Modules.Add(this.chartAspNetModule);
            this.Modules.Add(this.htmlPropertyEditorAspNetModule1);
            this.Modules.Add(this.treeListEditorsAspNetModule);
            this.Modules.Add(this.pivotGridModule);
            this.Modules.Add(this.pivotGridAspNetModule);
            this.Modules.Add(this.XCRMFullAppModule1);
            this.Modules.Add(this.xcrmAspNetModule);
            this.LastLogonParametersRead += new System.EventHandler <DevExpress.ExpressApp.LastLogonParametersReadEventArgs>(this.FullXCRMWebApplication_LastLogonParametersRead);
            this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.FullXCRMWebApplication_DatabaseVersionMismatch);
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
        }
 public LoginForm(SecurityStrategyComplex security, IObjectSpaceProvider objectSpaceProvider)
 {
     InitializeComponent();
     this.security            = security;
     this.objectSpaceProvider = objectSpaceProvider;
 }
Example #28
0
		private void InitializeComponent() {
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EFDemoWebApplication));
			this.systemModule1 = new DevExpress.ExpressApp.SystemModule.SystemModule();
			this.webSystemModule1 = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
			this.securityModule1 = new DevExpress.ExpressApp.Security.SecurityModule();
			this.securityStrategyComplex1 = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
			this.authenticationStandard1 = new DevExpress.ExpressApp.Security.AuthenticationStandard();
			this.fileAttachmentsWebModule1 = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
			this.validationModule1 = new DevExpress.ExpressApp.Validation.ValidationModule();
			this.viewVariantsModule1 = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
			this.conditionalAppearanceModule1 = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
			this.objectsModule1 = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
			this.efDemoModule1 = new EFDemo.Module.EFDemoModule();
			this.efDemoWebModule1 = new EFDemo.Module.Web.EFDemoWebModule();
			this.schedulerAspNetModule1 = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
			this.reportsModule1 = new DevExpress.ExpressApp.Reports.ReportsModule();
			this.reportsWebModule1 = new DevExpress.ExpressApp.Reports.Web.ReportsAspNetModule();
			this.schedulerModuleBase1 = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
			this.pivotChartAspNetModule1 = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
			this.pivotChartModuleBase1 = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
			this.htmlPropertyEditorAspNetModule1 = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
			this.scriptRecorderModuleBase1 = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
			this.scriptRecorderAspNetModule1 = new DevExpress.ExpressApp.ScriptRecorder.Web.ScriptRecorderAspNetModule();
			((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
			// 
			// securityComplex1
			// 
			this.securityStrategyComplex1.Authentication = this.authenticationStandard1;
			this.securityStrategyComplex1.RoleType = typeof(DevExpress.Persistent.BaseImpl.EF.Role);
			this.securityStrategyComplex1.UserType = typeof(DevExpress.Persistent.BaseImpl.EF.User);
			// 
			// authenticationStandard1
			// 
			this.authenticationStandard1.LogonParametersType = typeof(DevExpress.ExpressApp.Security.AuthenticationStandardLogonParameters);
			this.authenticationStandard1.UserType = typeof(DevExpress.Persistent.BaseImpl.EF.User);
			// 
			// reportsModule1
			// 
			this.reportsModule1.EnableInplaceReports = true;
			this.reportsModule1.ReportDataType = typeof(DevExpress.Persistent.BaseImpl.EF.ReportData);
			this.reportsModule1.ShowAdditionalNavigation = false;
			// 
			// validationModule1
			// 
			this.validationModule1.AllowValidationDetailsAccess = true;
			// 
			// viewVariantsModule1
			// 
			this.viewVariantsModule1.GenerateVariantsNode = false;
			this.viewVariantsModule1.ShowAdditionalNavigation = false;
			// 
			// pivotChartModuleBase1
			// 
			this.pivotChartModuleBase1.ShowAdditionalNavigation = false;
			// 
			// EFDemoWebApplication
			// 
			this.ApplicationName = "EFDemo";
			this.Modules.Add(this.systemModule1);
			this.Modules.Add(this.webSystemModule1);
			this.Modules.Add(this.securityModule1);
			this.Modules.Add(this.fileAttachmentsWebModule1);
			this.Modules.Add(this.validationModule1);
			this.Modules.Add(this.viewVariantsModule1);
			this.Modules.Add(this.conditionalAppearanceModule1);
			this.Modules.Add(this.objectsModule1);
			this.Modules.Add(this.efDemoModule1);
			this.Modules.Add(this.efDemoWebModule1);
			this.Modules.Add(this.schedulerModuleBase1);
			this.Modules.Add(this.schedulerAspNetModule1);
			this.Modules.Add(this.reportsModule1);
			this.Modules.Add(this.reportsWebModule1);
			this.Modules.Add(this.pivotChartModuleBase1);
			this.Modules.Add(this.pivotChartAspNetModule1);
			this.Modules.Add(this.htmlPropertyEditorAspNetModule1);
			this.Modules.Add(this.scriptRecorderModuleBase1);
			this.Modules.Add(this.scriptRecorderAspNetModule1);
			this.Security = this.securityStrategyComplex1;
			this.DatabaseVersionMismatch += new System.EventHandler<DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.EFDemoWebApplication_DatabaseVersionMismatch);
			((System.ComponentModel.ISupportInitialize)(this)).EndInit();

		}
Example #29
0
        static void Main(string[] args)
        {
            try
            {
                string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

                ValueManager.ValueManagerType = typeof(MultiThreadValueManager <>).GetGenericTypeDefinition();

                ServerApplication serverApplication = new ServerApplication();
                serverApplication.ApplicationName        = "BPIWABK";
                serverApplication.CheckCompatibilityType = CheckCompatibilityType.DatabaseSchema;
                if (System.Diagnostics.Debugger.IsAttached && serverApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
                {
                    serverApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
                }

                serverApplication.Modules.BeginInit();
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Security.SecurityModule());
                serverApplication.Modules.Add(new BPIWABK.Module.BPIWABKModule());
                serverApplication.Modules.Add(new BPIWABK.Module.Win.BPIWABKWindowsFormsModule());
                serverApplication.Modules.Add(new BPIWABK.Module.Web.BPIWABKAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.AuditTrail.AuditTrailModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Chart.ChartModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Chart.Win.ChartWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Chart.Web.ChartAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.CloneObject.CloneObjectModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Dashboards.DashboardsModule()
                {
                    DashboardDataType = typeof(DevExpress.Persistent.BaseImpl.DashboardData)
                });
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Dashboards.Win.DashboardsWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Dashboards.Web.DashboardsAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.FileAttachments.Win.FileAttachmentsWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.HtmlPropertyEditor.Win.HtmlPropertyEditorWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotChart.Win.PivotChartWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotGrid.PivotGridModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotGrid.Win.PivotGridWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.PivotGrid.Web.PivotGridAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ReportsV2.ReportsModuleV2()
                {
                    ReportDataType = typeof(DevExpress.Persistent.BaseImpl.ReportDataV2)
                });
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ReportsV2.Win.ReportsWindowsFormsModuleV2());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ReportsV2.Web.ReportsAspNetModuleV2());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.TreeListEditors.TreeListEditorsModuleBase());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.TreeListEditors.Win.TreeListEditorsWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.TreeListEditors.Web.TreeListEditorsAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.ValidationModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.Win.ValidationWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.Web.ValidationAspNetModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule());
                serverApplication.Modules.EndInit();

                serverApplication.DatabaseVersionMismatch         += new EventHandler <DatabaseVersionMismatchEventArgs>(serverApplication_DatabaseVersionMismatch);
                serverApplication.CreateCustomObjectSpaceProvider += new EventHandler <CreateCustomObjectSpaceProviderEventArgs>(serverApplication_CreateCustomObjectSpaceProvider);

                serverApplication.ConnectionString = connectionString;

                Console.WriteLine("Mempersiapkan...");
                serverApplication.Setup();
                Console.WriteLine("Memeriksa kompatibilitas...");
                serverApplication.CheckCompatibility();
                serverApplication.Dispose();
                WcfDataServerHelper.AddKnownType(typeof(ExportPermissionRequest));
                Console.WriteLine("Memulai layanan...");
                //ServerPermissionPolicyRequestProcessor.UseAutoAssociationPermission = true;
                QueryRequestSecurityStrategyHandler securityProviderHandler = delegate()
                {
                    SecurityStrategyComplex security = new SecurityStrategyComplex(
                        typeof(Pegawai), typeof(Peran), new AuthenticationStandard());
                    security.CustomizeRequestProcessors +=
                        delegate(object sender, CustomizeRequestProcessorsEventArgs e)
                    {
                        List <IOperationPermission> result = new List <IOperationPermission>();
                        if (security != null)
                        {
                            Pegawai user = security.User as Pegawai;
                            if (user != null)
                            {
                                foreach (Peran role in user.Roles)
                                {
                                    if (role.CanExport)
                                    {
                                        result.Add(new ExportPermission());
                                    }
                                }
                            }
                        }

                        IPermissionDictionary permissionDictionary = new PermissionDictionary((IEnumerable <IOperationPermission>)result);
                        e.Processors.Add(typeof(ExportPermissionRequest), new ExportPermissionRequestProcessor(permissionDictionary));
                    };
                    return(security);
                };
                SecuredDataServer dataServer = new SecuredDataServer(connectionString, XpoTypesInfoHelper.GetXpoTypeInfoSource().XPDictionary, securityProviderHandler);
                RemoteSecuredDataServer.Initialize(dataServer);

                //"Authentication with the TCP Channel" at http://msdn.microsoft.com/en-us/library/59hafwyt(v=vs.80).aspx

                IDictionary t = new Hashtable();
                t.Add("port", 8082);
                //t.Add("secure", true);
                //t.Add("impersonate", false);

                if (string.IsNullOrEmpty(ConfigurationManager.AppSettings["Test"]) == false)
                {
                    Console.WriteLine("Test");
                }

                TcpChannel channel = new TcpChannel(t, null, null);
                ChannelServices.RegisterChannel(channel, true);
                RemotingConfiguration.RegisterWellKnownServiceType(typeof(RemoteSecuredDataServer), "DataServer", WellKnownObjectMode.Singleton);
                Console.WriteLine("Layanan telah dimulai...");
                Console.WriteLine("");
                Console.WriteLine("PERINGATAN: aplikasi Analisis Beban Kerja tidak dapat digunakan apabila layanan di hentikan!");
                Console.WriteLine("Apabila layanan telah di hentikan, jalankan BPIWABK.Console.exe untuk kembali memulai layanan.");
                Console.WriteLine("Tekan tombol Enter untuk menghentikan layanan.");
                Console.ReadLine();
                Console.WriteLine("Menghetikan...");
                ChannelServices.UnregisterChannel(channel);
                Console.WriteLine("Layanan telah dihentikan.");
            }
            catch (Exception e)
            {
                Console.WriteLine("Kesalahan terjadi: " + e.Message);
                Console.WriteLine("Tekan tombol Enter untuk menutup.");
                Console.ReadLine();
            }
        }
Example #30
0
        static void Main(string[] args)
        {
            try {
                string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

                ValueManager.ValueManagerType = typeof(MultiThreadValueManager <>).GetGenericTypeDefinition();

                ServerApplication serverApplication = new ServerApplication();
                serverApplication.ApplicationName        = "HRM";
                serverApplication.CheckCompatibilityType = CheckCompatibilityType.DatabaseSchema;
#if DEBUG
                if (System.Diagnostics.Debugger.IsAttached && serverApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
                {
                    serverApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
                }
#endif

                serverApplication.Modules.BeginInit();
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Security.SecurityModule());
                serverApplication.Modules.Add(new HRM.Module.HRMModule());
                serverApplication.Modules.Add(new HRM.Module.Win.HRMWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.ValidationModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Validation.Win.ValidationWindowsFormsModule());
                serverApplication.Modules.EndInit();

                serverApplication.DatabaseVersionMismatch         += new EventHandler <DatabaseVersionMismatchEventArgs>(serverApplication_DatabaseVersionMismatch);
                serverApplication.CreateCustomObjectSpaceProvider += (s, e) => {
                    e.ObjectSpaceProviders.Add(new XPObjectSpaceProvider(e.ConnectionString, e.Connection));
                    e.ObjectSpaceProviders.Add(new NonPersistentObjectSpaceProvider(serverApplication.TypesInfo, null));
                };

                serverApplication.ConnectionString = connectionString;

                Console.WriteLine("Setup...");
                serverApplication.Setup();
                Console.WriteLine("CheckCompatibility...");
                serverApplication.CheckCompatibility();
                serverApplication.Dispose();

                Console.WriteLine("Starting server...");
                Func <IDataServerSecurity> dataServerSecurityProvider = () =>
                {
                    SecurityStrategyComplex security = new SecurityStrategyComplex(typeof(PermissionPolicyUser), typeof(PermissionPolicyRole), new AuthenticationStandard());
                    security.SupportNavigationPermissionsForTypes = false;
                    security.RegisterXPOAdapterProviders();
                    return(security);
                };

                WcfXafServiceHost serviceHost = new WcfXafServiceHost(connectionString, dataServerSecurityProvider);
                serviceHost.AddServiceEndpoint(typeof(IWcfXafDataServer), WcfDataServerHelper.CreateNetTcpBinding(), "net.tcp://127.0.0.1:61784/DataServer");
                serviceHost.Open();
                Console.WriteLine("Server is started. Press Enter to stop.");
                Console.ReadLine();
                Console.WriteLine("Stopping...");
                serviceHost.Close();
                Console.WriteLine("Server is stopped.");
            }
            catch (Exception e) {
                Console.WriteLine("Exception occurs: " + e.Message);
                Console.WriteLine("Press Enter to close.");
                Console.ReadLine();
            }
        }
Example #31
0
 private void InitializeComponent()
 {
     this._module1                        = new DevExpress.ExpressApp.SystemModule.SystemModule();
     this._module2                        = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
     this.module5                         = new DevExpress.ExpressApp.Validation.ValidationModule();
     this._module6                        = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
     this._securityModule1                = new DevExpress.ExpressApp.Security.SecurityModule();
     this._sqlConnection1                 = new System.Data.SqlClient.SqlConnection();
     this._securityComplex1               = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
     this._authenticationStandard1        = new Xpand.ExpressApp.Security.AuthenticationProviders.XpandAuthenticationStandard();
     this._featureCenterModule1           = new FeatureCenter.Module.FeatureCenterModule();
     this._cloneObjectModule1             = new DevExpress.ExpressApp.CloneObject.CloneObjectModule();
     this._viewVariantsModule1            = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
     this.pivotChartModuleBase1           = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
     this.scriptRecorderModuleBase1       = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
     this.featureCenterAspNetModule1      = new FeatureCenter.Module.Web.FeatureCenterAspNetModule();
     this.pivotChartAspNetModule1         = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
     this.fileAttachmentsAspNetModule1    = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
     this.conditionalAppearanceModule1    = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
     this.kpiModule1                      = new DevExpress.ExpressApp.Kpi.KpiModule();
     this.workflowModule1                 = new DevExpress.ExpressApp.Workflow.WorkflowModule();
     this.htmlPropertyEditorAspNetModule1 = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
     this.reportsModule1                  = new DevExpress.ExpressApp.Reports.ReportsModule();
     this.reportsAspNetModule1            = new DevExpress.ExpressApp.Reports.Web.ReportsAspNetModule();
     this.treeListEditorsAspNetModule1    = new DevExpress.ExpressApp.TreeListEditors.Web.TreeListEditorsAspNetModule();
     this.schedulerModuleBase1            = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
     this.schedulerAspNetModule1          = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
     this.stateMachineModule1             = new DevExpress.ExpressApp.StateMachine.StateMachineModule();
     this.treeListEditorsModuleBase2      = new DevExpress.ExpressApp.TreeListEditors.TreeListEditorsModuleBase();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // module5
     //
     this.module5.AllowValidationDetailsAccess     = true;
     this.module5.IgnoreWarningAndInformationRules = false;
     //
     // securityModule1
     //
     this._securityModule1.UserType = typeof(DevExpress.ExpressApp.Security.Strategy.SecuritySystemUser);
     //
     // sqlConnection1
     //
     this._sqlConnection1.ConnectionString = "Data Source=(local);Initial Catalog=XpandFeatureCenter;Integrated Security=SSPI;P" +
                                             "ooling=false";
     this._sqlConnection1.FireInfoMessageEventOnUserErrors = false;
     //
     // securityComplex1
     //
     this._securityComplex1.Authentication = this._authenticationStandard1;
     this._securityComplex1.RoleType       = typeof(Xpand.ExpressApp.Security.Core.XpandRole);
     this._securityComplex1.UserType       = typeof(DevExpress.ExpressApp.Security.Strategy.SecuritySystemUser);
     //
     // authenticationStandard1
     //
     this._authenticationStandard1.LogonParametersType = typeof(XpandLogonParameters);
     //
     // viewVariantsModule1
     //
     this._viewVariantsModule1.FrameVariantsEngine = null;
     this._viewVariantsModule1.VariantsProvider    = null;
     //
     // pivotChartModuleBase1
     //
     this.pivotChartModuleBase1.ShowAdditionalNavigation = false;
     //
     // workflowModule1
     //
     this.workflowModule1.RunningWorkflowInstanceInfoType   = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoRunningWorkflowInstanceInfo);
     this.workflowModule1.StartWorkflowRequestType          = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoStartWorkflowRequest);
     this.workflowModule1.UserActivityVersionType           = typeof(DevExpress.ExpressApp.Workflow.Versioning.XpoUserActivityVersion);
     this.workflowModule1.WorkflowControlCommandRequestType = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoWorkflowInstanceControlCommandRequest);
     this.workflowModule1.WorkflowDefinitionType            = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoWorkflowDefinition);
     this.workflowModule1.WorkflowInstanceKeyType           = typeof(DevExpress.Workflow.Xpo.XpoInstanceKey);
     this.workflowModule1.WorkflowInstanceType = typeof(DevExpress.Workflow.Xpo.XpoWorkflowInstance);
     //
     // reportsModule1
     //
     this.reportsModule1.EnableInplaceReports = true;
     this.reportsModule1.ReportDataType       = typeof(DevExpress.Persistent.BaseImpl.ReportData);
     //
     // stateMachineModule1
     //
     this.stateMachineModule1.StateMachineStorageType = typeof(DevExpress.ExpressApp.StateMachine.Xpo.XpoStateMachine);
     //
     // FeatureCenterAspNetApplication
     //
     this.ApplicationName = "FeatureCenter";
     this.Connection      = this._sqlConnection1;
     this.Modules.Add(this._module1);
     this.Modules.Add(this._module2);
     this.Modules.Add(this.module5);
     this.Modules.Add(this._module6);
     this.Modules.Add(this._securityModule1);
     this.Modules.Add(this._cloneObjectModule1);
     this.Modules.Add(this._viewVariantsModule1);
     this.Modules.Add(this.conditionalAppearanceModule1);
     this.Modules.Add(this.pivotChartModuleBase1);
     this.Modules.Add(this.scriptRecorderModuleBase1);
     this.Modules.Add(this.kpiModule1);
     this.Modules.Add(this.workflowModule1);
     this.Modules.Add(this.stateMachineModule1);
     this.Modules.Add(this._featureCenterModule1);
     this.Modules.Add(this.pivotChartAspNetModule1);
     this.Modules.Add(this.fileAttachmentsAspNetModule1);
     this.Modules.Add(this.htmlPropertyEditorAspNetModule1);
     this.Modules.Add(this.reportsModule1);
     this.Modules.Add(this.reportsAspNetModule1);
     this.Modules.Add(this.treeListEditorsModuleBase2);
     this.Modules.Add(this.treeListEditorsAspNetModule1);
     this.Modules.Add(this.schedulerModuleBase1);
     this.Modules.Add(this.schedulerAspNetModule1);
     this.Modules.Add(this.featureCenterAspNetModule1);
     this.Security = this._securityComplex1;
     this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.AspNetApplicationDatabaseVersionMismatch);
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }
Example #32
0
 private void InitializeComponent()
 {
     _module1                        = new SystemModule();
     _module2                        = new SystemAspNetModule();
     _module3                        = new Module.Module();
     _module4                        = new WebModule();
     _securityModule1                = new SecurityModule();
     _securityStrategyComplex1       = new SecurityStrategyComplex();
     _authenticationStandard1        = new AuthenticationStandard();
     _auditTrailModule               = new AuditTrailModule();
     _objectsModule                  = new BusinessClassLibraryCustomizationModule();
     _chartModule                    = new ChartModule();
     _chartAspNetModule              = new ChartAspNetModule();
     _cloneObjectModule              = new CloneObjectModule();
     _conditionalAppearanceModule    = new ConditionalAppearanceModule();
     _fileAttachmentsAspNetModule    = new FileAttachmentsAspNetModule();
     _htmlPropertyEditorAspNetModule = new HtmlPropertyEditorAspNetModule();
     _pivotChartModuleBase           = new PivotChartModuleBase();
     _pivotChartAspNetModule         = new PivotChartAspNetModule();
     _pivotGridModule                = new PivotGridModule();
     _pivotGridAspNetModule          = new PivotGridAspNetModule();
     _reportsModuleV2                = new ReportsModuleV2();
     _reportsAspNetModuleV2          = new ReportsAspNetModuleV2();
     _validationModule               = new ValidationModule();
     _validationAspNetModule         = new ValidationAspNetModule();
     _viewVariantsModule             = new ViewVariantsModule();
     ((ISupportInitialize)(this)).BeginInit();
     //
     // securityStrategyComplex1
     //
     _securityStrategyComplex1.Authentication = _authenticationStandard1;
     _securityStrategyComplex1.RoleType       = typeof(SecuritySystemRole);
     _securityStrategyComplex1.UserType       = typeof(SecuritySystemUser);
     //
     // securityModule1
     //
     _securityModule1.UserType = typeof(SecuritySystemUser);
     //
     // authenticationStandard1
     //
     _authenticationStandard1.LogonParametersType = typeof(AuthenticationStandardLogonParameters);
     //
     // auditTrailModule
     //
     _auditTrailModule.AuditDataItemPersistentType = typeof(AuditDataItemPersistent);
     //
     // pivotChartModuleBase
     //
     _pivotChartModuleBase.ShowAdditionalNavigation = true;
     //
     // reportsModuleV2
     //
     _reportsModuleV2.EnableInplaceReports     = true;
     _reportsModuleV2.ReportDataType           = typeof(ReportDataV2);
     _reportsModuleV2.ShowAdditionalNavigation = true;
     //
     // reportsAspNetModuleV2
     //
     _reportsAspNetModuleV2.ShowFormatSpecificExportActions = true;
     _reportsAspNetModuleV2.DefaultPreviewFormat            = ReportOutputType.Pdf;
     _reportsAspNetModuleV2.ReportViewerType = ReportViewerTypes.HTML5;
     _reportsModuleV2.ReportStoreMode        = ReportStoreModes.XML;
     //
     // viewVariantsModule
     //
     _viewVariantsModule.ShowAdditionalNavigation = true;
     //
     // FMAspNetApplication
     //
     ApplicationName = "CORE.PolizApp";
     LinkNewObjectToParentImmediately = false;
     CheckCompatibilityType           = CheckCompatibilityType.DatabaseSchema;
     Modules.Add(_module1);
     Modules.Add(_module2);
     Modules.Add(_module3);
     Modules.Add(_module4);
     Modules.Add(_securityModule1);
     Security = _securityStrategyComplex1;
     Modules.Add(_auditTrailModule);
     Modules.Add(_objectsModule);
     Modules.Add(_chartModule);
     Modules.Add(_chartAspNetModule);
     Modules.Add(_cloneObjectModule);
     Modules.Add(_conditionalAppearanceModule);
     Modules.Add(_fileAttachmentsAspNetModule);
     Modules.Add(_htmlPropertyEditorAspNetModule);
     Modules.Add(_pivotChartModuleBase);
     Modules.Add(_pivotChartAspNetModule);
     Modules.Add(_pivotGridModule);
     Modules.Add(_pivotGridAspNetModule);
     Modules.Add(_reportsModuleV2);
     Modules.Add(_reportsAspNetModuleV2);
     Modules.Add(_validationModule);
     Modules.Add(_validationAspNetModule);
     Modules.Add(_viewVariantsModule);
     DatabaseVersionMismatch += FMAspNetApplication_DatabaseVersionMismatch;
     ((ISupportInitialize)(this)).EndInit();
 }
Example #33
0
 public PermissionHelper(SecurityStrategyComplex security)
 {
     Security = security;
 }
Example #34
0
 public PermissionHelper(IObjectSpace objectSpace, SecurityStrategyComplex security)
 {
     ObjectSpace = objectSpace;
     Security    = security;
 }
        static void Main(string[] args)
        {
            try {
                ValueManager.ValueManagerType = typeof(MultiThreadValueManager <>).GetGenericTypeDefinition();
                InMemoryDataStoreProvider.Register();
                string connectionString = InMemoryDataStoreProvider.ConnectionString;

                Console.WriteLine("Starting...");

                ServerApplication serverApplication = new ServerApplication();
                // Change the ServerApplication.ApplicationName property value. It should be the same as your client application name.
                serverApplication.ApplicationName = "SecuredExportExample";

                // Add your client application's modules to the ServerApplication.Modules collection here.
                serverApplication.Modules.BeginInit();
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Win.SystemModule.SystemWindowsFormsModule());
                serverApplication.Modules.Add(new DevExpress.ExpressApp.Security.SecurityModule());
                serverApplication.Modules.Add(new SecuredExportExample.Module.SecuredExportExampleModule());
                serverApplication.Modules.EndInit();

                serverApplication.DatabaseVersionMismatch         += new EventHandler <DatabaseVersionMismatchEventArgs>(serverApplication_DatabaseVersionMismatch);
                serverApplication.CreateCustomObjectSpaceProvider += new EventHandler <CreateCustomObjectSpaceProviderEventArgs>(serverApplication_CreateCustomObjectSpaceProvider);

                serverApplication.ConnectionString = connectionString;

                Console.WriteLine("Setup...");
                serverApplication.Setup();
                Console.WriteLine("CheckCompatibility...");
                serverApplication.CheckCompatibility();
                serverApplication.Dispose();

                Console.WriteLine("Starting server...");
                Func <IDataServerSecurity> dataServerSecurityProvider = () => {
                    SecurityStrategyComplex security = new SecurityStrategyComplex(
                        typeof(Employee), typeof(ExtendedSecurityRole), new AuthenticationStandard());
                    security.CustomizeRequestProcessors +=
                        delegate(object sender, CustomizeRequestProcessorsEventArgs e) {
                        List <IOperationPermission> result = new List <IOperationPermission>();
                        if (security != null)
                        {
                            Employee user = security.User as Employee;
                            if (user != null)
                            {
                                foreach (ExtendedSecurityRole role in user.Roles)
                                {
                                    if (role.CanExport)
                                    {
                                        result.Add(new ExportPermission());
                                    }
                                }
                            }
                        }
                        IPermissionDictionary permissionDictionary = new PermissionDictionary((IEnumerable <IOperationPermission>)result);
                        e.Processors.Add(typeof(ExportPermissionRequest), new ExportPermissionRequestProcessor(permissionDictionary));
                    };
                    return(security);
                };

                WcfDataServerHelper.AddKnownType(typeof(ExportPermissionRequest));
                WcfXafServiceHost serviceHost = new WcfXafServiceHost(connectionString, dataServerSecurityProvider);
                serviceHost.AddServiceEndpoint(typeof(IWcfXafDataServer), WcfDataServerHelper.CreateNetTcpBinding(), "net.tcp://127.0.0.1:1451/DataServer");
                serviceHost.Open();
                Console.WriteLine("Server is started. Press Enter to stop.");
#if !EASYTEST
                Console.ReadLine();
#else
                // 20 seconds is enough to pass all tests:
                System.Threading.Thread.Sleep(20000);
#endif
                Console.WriteLine("Stopping...");
                serviceHost.Close();
                Console.WriteLine("Server is stopped.");
            }
            catch (Exception e) {
                Console.WriteLine("Exception occurs: " + e.Message);
                Console.WriteLine("Press Enter to close.");
                Console.ReadLine();
            }
        }
Example #36
0
        static void Main()
        {
            DevExpress.ExpressApp.FrameworkSettings.DefaultSettingsCompatibilityMode = DevExpress.ExpressApp.FrameworkSettingsCompatibilityMode.Latest;
#if EASYTEST
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            WindowsFormsSettings.LoadApplicationSettings();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            DevExpress.Utils.ToolTipController.DefaultController.ToolTipType = DevExpress.Utils.ToolTipType.SuperTip;
            EditModelPermission.AlwaysGranted = System.Diagnostics.Debugger.IsAttached;
            if (Tracing.GetFileLocationFromSettings() == DevExpress.Persistent.Base.FileLocation.CurrentUserApplicationDataFolder)
            {
                Tracing.LocalUserAppDataPath = Application.LocalUserAppDataPath;
            }
            Tracing.Initialize();
            OrdersManagementProjectWindowsFormsApplication winApplication = new OrdersManagementProjectWindowsFormsApplication();
            winApplication.GetSecurityStrategy().RegisterXPOAdapterProviders();
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                winApplication.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#endif
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached && winApplication.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema)
            {
                winApplication.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
            }
#endif

#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                string automaticDebugUser = System.Configuration.ConfigurationManager.AppSettings["AutomaticDebugUser"];
                if (!string.IsNullOrEmpty(automaticDebugUser))
                {
                    SecurityStrategyComplex securityStrategyComplex = winApplication.Security as SecurityStrategyComplex;
                    if (securityStrategyComplex != null)
                    {
                        securityStrategyComplex.Authentication = new Domain.Security.AuthenticationStandardForDebug();
                    }
                }
            }
#endif

            // Audit Trail security improvement
            AuditTrailService.Instance.CustomizeAuditTrailSettings += new CustomizeAuditSettingsEventHandler(Instance_CustomizeAuditTrailSettings);

            try
            {
                winApplication.Setup();
                winApplication.Start();
            }
            catch (Exception e)
            {
                winApplication.StopSplash();
                winApplication.HandleException(e);
            }
        }
Example #37
0
        private void InitializeComponent()
        {
            _module1                         = new SystemModule();
            _module2                         = new SystemAspNetModule();
            _module5                         = new ValidationModule();
            _module6                         = new BusinessClassLibraryCustomizationModule();
            _securityModule1                 = new SecurityModule();
            _sqlConnection1                  = new SqlConnection();
            _securityComplex1                = new SecurityStrategyComplex();
            _authenticationStandard1         = new XpandAuthenticationStandard();
            _featureCenterModule1            = new FeatureCenterModule();
            _cloneObjectModule1              = new CloneObjectModule();
            _viewVariantsModule1             = new ViewVariantsModule();
            _pivotChartModuleBase1           = new PivotChartModuleBase();
            _scriptRecorderModuleBase1       = new ScriptRecorderModuleBase();
            _featureCenterAspNetModule1      = new FeatureCenterAspNetModule();
            _pivotChartAspNetModule1         = new PivotChartAspNetModule();
            _fileAttachmentsAspNetModule1    = new FileAttachmentsAspNetModule();
            _conditionalAppearanceModule1    = new ConditionalAppearanceModule();
            _kpiModule1                      = new KpiModule();
            _workflowModule1                 = new WorkflowModule();
            _htmlPropertyEditorAspNetModule1 = new HtmlPropertyEditorAspNetModule();
            _treeListEditorsAspNetModule1    = new TreeListEditorsAspNetModule();
            _schedulerModuleBase1            = new SchedulerModuleBase();
            _schedulerAspNetModule1          = new SchedulerAspNetModule();
            _stateMachineModule1             = new StateMachineModule();
            _treeListEditorsModuleBase2      = new TreeListEditorsModuleBase();
            ((ISupportInitialize)this).BeginInit();
            //
            // module5
            //
            _module5.AllowValidationDetailsAccess     = true;
            _module5.IgnoreWarningAndInformationRules = false;
            //
            // securityModule1
            //
            _securityModule1.UserType = typeof(SecuritySystemUser);
            //
            // sqlConnection1
            //
            _sqlConnection1.ConnectionString =
                "Data Source=(local);Initial Catalog=XpandFeatureCenter;Integrated Security=SSPI;P" +
                "ooling=false";
            _sqlConnection1.FireInfoMessageEventOnUserErrors = false;
            //
            // securityComplex1
            //
            _securityComplex1.Authentication = _authenticationStandard1;
            _securityComplex1.RoleType       = typeof(XpandRole);
            _securityComplex1.UserType       = typeof(SecuritySystemUser);
            //
            // authenticationStandard1
            //
            _authenticationStandard1.LogonParametersType = typeof(XpandLogonParameters);
            //
            // viewVariantsModule1
            //
            _viewVariantsModule1.FrameVariantsEngine = null;
            _viewVariantsModule1.VariantsProvider    = null;
            //
            // pivotChartModuleBase1
            //
            _pivotChartModuleBase1.ShowAdditionalNavigation = false;
            //
            // workflowModule1
            //
            _workflowModule1.RunningWorkflowInstanceInfoType   = typeof(XpoRunningWorkflowInstanceInfo);
            _workflowModule1.StartWorkflowRequestType          = typeof(XpoStartWorkflowRequest);
            _workflowModule1.UserActivityVersionType           = typeof(XpoUserActivityVersion);
            _workflowModule1.WorkflowControlCommandRequestType = typeof(XpoWorkflowInstanceControlCommandRequest);
            _workflowModule1.WorkflowDefinitionType            = typeof(XpoWorkflowDefinition);
            _workflowModule1.WorkflowInstanceKeyType           = typeof(XpoInstanceKey);
            _workflowModule1.WorkflowInstanceType = typeof(XpoWorkflowInstance);
            //
            // reportsModule1
            //

            //
            // stateMachineModule1
            //
            _stateMachineModule1.StateMachineStorageType = typeof(XpoStateMachine);
            //
            // FeatureCenterAspNetApplication
            //
            ApplicationName = "FeatureCenter";
            Connection      = _sqlConnection1;
            Modules.Add(_module1);
            Modules.Add(_module2);
            Modules.Add(_module5);
            Modules.Add(_module6);
            Modules.Add(_securityModule1);
            Modules.Add(_cloneObjectModule1);
            Modules.Add(_viewVariantsModule1);
            Modules.Add(_conditionalAppearanceModule1);
            Modules.Add(_pivotChartModuleBase1);
            Modules.Add(_scriptRecorderModuleBase1);
            Modules.Add(_kpiModule1);
            Modules.Add(_workflowModule1);
            Modules.Add(_stateMachineModule1);
            Modules.Add(_featureCenterModule1);
            Modules.Add(_pivotChartAspNetModule1);
            Modules.Add(_fileAttachmentsAspNetModule1);
            Modules.Add(_htmlPropertyEditorAspNetModule1);

            Modules.Add(_treeListEditorsModuleBase2);
            Modules.Add(_treeListEditorsAspNetModule1);
            Modules.Add(_schedulerModuleBase1);
            Modules.Add(_schedulerAspNetModule1);
            Modules.Add(_featureCenterAspNetModule1);
            Security = _securityComplex1;
            DatabaseVersionMismatch += AspNetApplicationDatabaseVersionMismatch;
            ((ISupportInitialize)this).EndInit();
        }
Example #38
0
        private void InitializeComponent() {
            this._module1 = new DevExpress.ExpressApp.SystemModule.SystemModule();
            this._module2 = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
            this.module5 = new DevExpress.ExpressApp.Validation.ValidationModule();
            this._module6 = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
            this._securityModule1 = new DevExpress.ExpressApp.Security.SecurityModule();
            this._sqlConnection1 = new System.Data.SqlClient.SqlConnection();
            this._securityComplex1 = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
            this._authenticationStandard1 = new Xpand.ExpressApp.Security.AuthenticationProviders.XpandAuthenticationStandard();
            this._featureCenterModule1 = new FeatureCenter.Module.FeatureCenterModule();
            this._cloneObjectModule1 = new DevExpress.ExpressApp.CloneObject.CloneObjectModule();
            this._viewVariantsModule1 = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
            this.pivotChartModuleBase1 = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
            this.scriptRecorderModuleBase1 = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
            this.featureCenterAspNetModule1 = new FeatureCenter.Module.Web.FeatureCenterAspNetModule();
            this.pivotChartAspNetModule1 = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
            this.fileAttachmentsAspNetModule1 = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
            this.conditionalAppearanceModule1 = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
            this.kpiModule1 = new DevExpress.ExpressApp.Kpi.KpiModule();
            this.workflowModule1 = new DevExpress.ExpressApp.Workflow.WorkflowModule();
            this.htmlPropertyEditorAspNetModule1 = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
            this.reportsModule1 = new DevExpress.ExpressApp.Reports.ReportsModule();
            this.reportsAspNetModule1 = new DevExpress.ExpressApp.Reports.Web.ReportsAspNetModule();
            this.treeListEditorsAspNetModule1 = new DevExpress.ExpressApp.TreeListEditors.Web.TreeListEditorsAspNetModule();
            this.schedulerModuleBase1 = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
            this.schedulerAspNetModule1 = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
            this.stateMachineModule1 = new DevExpress.ExpressApp.StateMachine.StateMachineModule();
            this.treeListEditorsModuleBase2 = new DevExpress.ExpressApp.TreeListEditors.TreeListEditorsModuleBase();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            // 
            // module5
            // 
            this.module5.AllowValidationDetailsAccess = true;
            this.module5.IgnoreWarningAndInformationRules = false;
            // 
            // securityModule1
            // 
            this._securityModule1.UserType = typeof(DevExpress.ExpressApp.Security.Strategy.SecuritySystemUser);
            // 
            // sqlConnection1
            // 
            this._sqlConnection1.ConnectionString = "Data Source=(local);Initial Catalog=XpandFeatureCenter;Integrated Security=SSPI;P" +
    "ooling=false";
            this._sqlConnection1.FireInfoMessageEventOnUserErrors = false;
            // 
            // securityComplex1
            // 
            this._securityComplex1.Authentication = this._authenticationStandard1;
            this._securityComplex1.RoleType = typeof(Xpand.ExpressApp.Security.Core.XpandRole);
            this._securityComplex1.UserType = typeof(DevExpress.ExpressApp.Security.Strategy.SecuritySystemUser);
            // 
            // authenticationStandard1
            // 
            this._authenticationStandard1.LogonParametersType = typeof(XpandLogonParameters);
            // 
            // viewVariantsModule1
            // 
            this._viewVariantsModule1.FrameVariantsEngine = null;
            this._viewVariantsModule1.VariantsProvider = null;
            // 
            // pivotChartModuleBase1
            // 
            this.pivotChartModuleBase1.ShowAdditionalNavigation = false;
            // 
            // workflowModule1
            // 
            this.workflowModule1.RunningWorkflowInstanceInfoType = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoRunningWorkflowInstanceInfo);
            this.workflowModule1.StartWorkflowRequestType = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoStartWorkflowRequest);
            this.workflowModule1.UserActivityVersionType = typeof(DevExpress.ExpressApp.Workflow.Versioning.XpoUserActivityVersion);
            this.workflowModule1.WorkflowControlCommandRequestType = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoWorkflowInstanceControlCommandRequest);
            this.workflowModule1.WorkflowDefinitionType = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoWorkflowDefinition);
            this.workflowModule1.WorkflowInstanceKeyType = typeof(DevExpress.Workflow.Xpo.XpoInstanceKey);
            this.workflowModule1.WorkflowInstanceType = typeof(DevExpress.Workflow.Xpo.XpoWorkflowInstance);
            // 
            // reportsModule1
            // 
            this.reportsModule1.EnableInplaceReports = true;
            this.reportsModule1.ReportDataType = typeof(DevExpress.Persistent.BaseImpl.ReportData);
            // 
            // stateMachineModule1
            // 
            this.stateMachineModule1.StateMachineStorageType = typeof(DevExpress.ExpressApp.StateMachine.Xpo.XpoStateMachine);
            // 
            // FeatureCenterAspNetApplication
            // 
            this.ApplicationName = "FeatureCenter";
            this.Connection = this._sqlConnection1;
            this.Modules.Add(this._module1);
            this.Modules.Add(this._module2);
            this.Modules.Add(this.module5);
            this.Modules.Add(this._module6);
            this.Modules.Add(this._securityModule1);
            this.Modules.Add(this._cloneObjectModule1);
            this.Modules.Add(this._viewVariantsModule1);
            this.Modules.Add(this.conditionalAppearanceModule1);
            this.Modules.Add(this.pivotChartModuleBase1);
            this.Modules.Add(this.scriptRecorderModuleBase1);
            this.Modules.Add(this.kpiModule1);
            this.Modules.Add(this.workflowModule1);
            this.Modules.Add(this.stateMachineModule1);
            this.Modules.Add(this._featureCenterModule1);
            this.Modules.Add(this.pivotChartAspNetModule1);
            this.Modules.Add(this.fileAttachmentsAspNetModule1);
            this.Modules.Add(this.htmlPropertyEditorAspNetModule1);
            this.Modules.Add(this.reportsModule1);
            this.Modules.Add(this.reportsAspNetModule1);
            this.Modules.Add(this.treeListEditorsModuleBase2);
            this.Modules.Add(this.treeListEditorsAspNetModule1);
            this.Modules.Add(this.schedulerModuleBase1);
            this.Modules.Add(this.schedulerAspNetModule1);
            this.Modules.Add(this.featureCenterAspNetModule1);
            this.Security = this._securityComplex1;
            this.DatabaseVersionMismatch += new System.EventHandler<DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.AspNetApplicationDatabaseVersionMismatch);
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();

        }
 static void InitSecurity()
 {
     Authentication = new AuthenticationStandard();
     Security       = new SecurityStrategyComplex(typeof(PermissionPolicyUser), typeof(PermissionPolicyRole), Authentication);
     Security.RegisterXPOAdapterProviders();
 }
Example #40
0
 private void InitializeComponent()
 {
     this.module1                      = new DevExpress.ExpressApp.SystemModule.SystemModule();
     this.module2                      = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
     this.module3                      = new EastIPSystem.Module.EastIPInternalInvoiceSystemModule();
     this.module4                      = new EastIPSystem.Module.Web.EastIPInternalInvoiceSystemAspNetModule();
     this.securityModule1              = new DevExpress.ExpressApp.Security.SecurityModule();
     this.securityStrategyComplex1     = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
     this.authenticationStandard1      = new DevExpress.ExpressApp.Security.AuthenticationStandard();
     this.objectsModule                = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
     this.validationModule             = new DevExpress.ExpressApp.Validation.ValidationModule();
     this.validationAspNetModule       = new DevExpress.ExpressApp.Validation.Web.ValidationAspNetModule();
     this.auditTrailModule1            = new DevExpress.ExpressApp.AuditTrail.AuditTrailModule();
     this.dashboardsModule1            = new DevExpress.ExpressApp.Dashboards.DashboardsModule();
     this.fileAttachmentsAspNetModule1 = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
     this.dashboardsAspNetModule1      = new DevExpress.ExpressApp.Dashboards.Web.DashboardsAspNetModule();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // securityStrategyComplex1
     //
     this.securityStrategyComplex1.Authentication = this.authenticationStandard1;
     this.securityStrategyComplex1.RoleType       = typeof(DevExpress.Persistent.BaseImpl.PermissionPolicy.PermissionPolicyRole);
     this.securityStrategyComplex1.SupportNavigationPermissionsForTypes = false;
     this.securityStrategyComplex1.UserType = typeof(DevExpress.Persistent.BaseImpl.PermissionPolicy.PermissionPolicyUser);
     //
     // authenticationStandard1
     //
     this.authenticationStandard1.LogonParametersType = typeof(DevExpress.ExpressApp.Security.AuthenticationStandardLogonParameters);
     //
     // validationModule
     //
     this.validationModule.AllowValidationDetailsAccess     = true;
     this.validationModule.IgnoreWarningAndInformationRules = false;
     //
     // auditTrailModule1
     //
     this.auditTrailModule1.AuditDataItemPersistentType = typeof(DevExpress.Persistent.BaseImpl.AuditDataItemPersistent);
     //
     // dashboardsModule1
     //
     this.dashboardsModule1.DashboardDataType = typeof(DevExpress.Persistent.BaseImpl.DashboardData);
     //
     // EastIPInternalInvoiceSystemAspNetApplication
     //
     this.ApplicationName        = "EastIPInternalInvoiceSystem";
     this.CheckCompatibilityType = DevExpress.ExpressApp.CheckCompatibilityType.DatabaseSchema;
     this.Modules.Add(this.module1);
     this.Modules.Add(this.module2);
     this.Modules.Add(this.objectsModule);
     this.Modules.Add(this.validationModule);
     this.Modules.Add(this.auditTrailModule1);
     this.Modules.Add(this.dashboardsModule1);
     this.Modules.Add(this.module3);
     this.Modules.Add(this.validationAspNetModule);
     this.Modules.Add(this.fileAttachmentsAspNetModule1);
     this.Modules.Add(this.module4);
     this.Modules.Add(this.securityModule1);
     this.Modules.Add(this.dashboardsAspNetModule1);
     this.Security = this.securityStrategyComplex1;
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }
Example #41
0
 public MainForm(SecurityStrategyComplex security, IObjectSpaceProvider objectSpaceProvider)
 {
     InitializeComponent();
     Security            = security;
     ObjectSpaceProvider = objectSpaceProvider;
 }
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainDemoWebApplication));
     this.systemModule1                   = new DevExpress.ExpressApp.SystemModule.SystemModule();
     this.webSystemModule1                = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
     this.sqlConnection1                  = new System.Data.SqlClient.SqlConnection();
     this.securityModule1                 = new DevExpress.ExpressApp.Security.SecurityModule();
     this.securityStrategyComplex1        = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
     this.authenticationStandard1         = new DevExpress.ExpressApp.Security.AuthenticationStandard();
     this.objectsModule1                  = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
     this.auditTrailModule1               = new DevExpress.ExpressApp.AuditTrail.AuditTrailModule();
     this.fileAttachmentsWebModule1       = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
     this.reportsModule1                  = new DevExpress.ExpressApp.Reports.ReportsModule();
     this.reportsWebModule1               = new DevExpress.ExpressApp.Reports.Web.ReportsAspNetModule();
     this.validationModule1               = new DevExpress.ExpressApp.Validation.ValidationModule();
     this.viewVariantsModule1             = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
     this.conditionalAppearanceModule1    = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
     this.mainDemoModule1                 = new MainDemo.Module.MainDemoModule();
     this.mainDemoWebModule1              = new MainDemo.Module.Web.MainDemoWebModule();
     this.schedulerAspNetModule1          = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
     this.schedulerModuleBase1            = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
     this.pivotChartAspNetModule1         = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
     this.pivotChartModuleBase1           = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
     this.htmlPropertyEditorAspNetModule1 = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
     this.scriptRecorderModuleBase1       = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
     this.scriptRecorderAspNetModule1     = new DevExpress.ExpressApp.ScriptRecorder.Web.ScriptRecorderAspNetModule();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // sqlConnection1
     //
     this.sqlConnection1.ConnectionString = "Integrated Security=SSPI;Pooling=false;Data Source=(local);Initial Catalog=MainDe" +
                                            "mo_v13.1";
     this.sqlConnection1.FireInfoMessageEventOnUserErrors = false;
     //
     // securityComplex1
     //
     this.securityStrategyComplex1.Authentication = this.authenticationStandard1;
     this.securityStrategyComplex1.RoleType       = typeof(SecuritySystemRole);
     this.securityStrategyComplex1.UserType       = typeof(SecuritySystemUser);
     //
     // authenticationStandard1
     //
     this.authenticationStandard1.LogonParametersType = typeof(DevExpress.ExpressApp.Security.AuthenticationStandardLogonParameters);
     //
     // auditTrailModule1
     //
     this.auditTrailModule1.AuditDataItemPersistentType = typeof(DevExpress.Persistent.BaseImpl.AuditDataItemPersistent);
     //
     // reportsModule1
     //
     this.reportsModule1.EnableInplaceReports     = true;
     this.reportsModule1.ReportDataType           = typeof(DevExpress.Persistent.BaseImpl.ReportData);
     this.reportsModule1.ShowAdditionalNavigation = false;
     //
     // validationModule1
     //
     this.validationModule1.AllowValidationDetailsAccess = true;
     //
     // viewVariantsModule1
     //
     this.viewVariantsModule1.GenerateVariantsNode     = false;
     this.viewVariantsModule1.ShowAdditionalNavigation = false;
     //
     // pivotChartModuleBase1
     //
     this.pivotChartModuleBase1.ShowAdditionalNavigation = false;
     //
     // MainDemoWebApplication
     //
     this.ApplicationName = "MainDemo";
     this.Connection      = this.sqlConnection1;
     this.Modules.Add(this.systemModule1);
     this.Modules.Add(this.webSystemModule1);
     this.Modules.Add(this.securityModule1);
     this.Modules.Add(this.objectsModule1);
     this.Modules.Add(this.auditTrailModule1);
     this.Modules.Add(this.fileAttachmentsWebModule1);
     this.Modules.Add(this.reportsModule1);
     this.Modules.Add(this.reportsWebModule1);
     this.Modules.Add(this.validationModule1);
     this.Modules.Add(this.viewVariantsModule1);
     this.Modules.Add(this.conditionalAppearanceModule1);
     this.Modules.Add(this.mainDemoModule1);
     this.Modules.Add(this.mainDemoWebModule1);
     this.Modules.Add(this.schedulerModuleBase1);
     this.Modules.Add(this.schedulerAspNetModule1);
     this.Modules.Add(this.pivotChartModuleBase1);
     this.Modules.Add(this.pivotChartAspNetModule1);
     this.Modules.Add(this.htmlPropertyEditorAspNetModule1);
     this.Modules.Add(this.scriptRecorderModuleBase1);
     this.Modules.Add(this.scriptRecorderAspNetModule1);
     this.Security = this.securityStrategyComplex1;
     this.LastLogonParametersRead += new System.EventHandler <DevExpress.ExpressApp.LastLogonParametersReadEventArgs>(this.MainDemoWebApplication_LastLogonParametersRead);
     this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.MainDemoWebApplication_DatabaseVersionMismatch);
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }
Example #43
0
 public void Initialize(IObjectSpace objectSpace, SecurityStrategyComplex security)
 {
     throw new NotImplementedException();
 }
Example #44
0
        private static void Main()
        {
#if EASYTEST
            DevExpress.ExpressApp.Win.EasyTest.EasyTestRemotingRegistration.Register();
#endif
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var application = new SecurityDemoWindowsFormsApplication();
            application.CreateCustomTemplate += xafApplication_CreateCustomTemplate;
            application.CreateCustomLogonWindowObjectSpace += application_CreateCustomLogonWindowObjectSpace;
            application.CreateCustomLogonWindowControllers += application_CreateCustomLogonWindowControllers;
#if EASYTEST
            if (ConfigurationManager.ConnectionStrings["EasyTestConnectionString"] != null)
            {
                application.ConnectionString = ConfigurationManager.ConnectionStrings["EasyTestConnectionString"].ConnectionString;
            }
#else
            if (ConfigurationManager.ConnectionStrings["ConnectionString"] != null)
            {
                application.ConnectionString =
                    ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
            }
#endif
            try{
                var security = new SecurityStrategyComplex(typeof(SecuritySystemUser), typeof(SecuritySystemRole),
                                                           new SecurityDemoAuthentication());
                application.Security = security;

                //                This functionality is build in the XpandObjectSpaceProvider. To enable or disable use Model/Options/ClientSideSecurity. You can continue using the designer if you want.

                //                application.CreateCustomObjectSpaceProvider += delegate(object sender, CreateCustomObjectSpaceProviderEventArgs e) {
                //                    e.ObjectSpaceProvider = new SecuredObjectSpaceProvider(security, e.ConnectionString, e.Connection);
                //                };
                application.DatabaseVersionMismatch += delegate(object sender, DatabaseVersionMismatchEventArgs e){
                    try{
#if EASYTEST
                        e.Updater.Update();
                        e.Handled = true;
#else
                        if (Debugger.IsAttached)
                        {
                            e.Updater.Update();
                            e.Handled = true;
                        }
#endif
                    }
                    catch (CompatibilityException exception) {
                        if (exception.Error is CompatibilityUnableToOpenDatabaseError)
                        {
                            throw new UserFriendlyException(
                                      "The connection to the database failed. This demo requires the local instance of Microsoft SQL Server Express. To use another database server,\r\nopen the demo solution in Visual Studio and modify connection string in the \"app.config\" file.");
                        }
                    }
                };

                application.Setup();
                application.Start();
            }
            catch (Exception e) {
                application.HandleException(e);
            }
        }