private void ObjectSpace_ObjectSaving(object sender, ObjectManipulatingEventArgs e) { if (this.Employee.EmployeeType == Ignyt.BusinessInterface.EmployeeType.SystemUser) { MultiTenantHelper.CreateUser(this.Employee); } }
private void MyWorkbenchAspNetApplication_DatabaseVersionMismatch(object sender, DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs e) { e.Updater.Update(); MultiTenantHelper.CreateUser(this.ObjectSpaceProvider.CreateUpdatingObjectSpace(true)); e.Handled = true; }
protected override void OnLoggingOn(LogonEventArgs args) { MultiTenantHelper.Authenticate((args.LogonParameters as AuthenticationStandardLogonParameters).UserName, (args.LogonParameters as AuthenticationStandardLogonParameters).Password); this.ConnectionString = MultiTenantHelper.ConnectionString(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString()); MultiTenantHelper.CreateUser(this.ObjectSpaceProvider.CreateUpdatingObjectSpace(true)); if (!MyWorkbench.BaseObjects.Constants.Constants.HasAccessToSettings(((XPObjectSpace)WebApplication.Instance.CreateObjectSpace()).Session)) { throw new Exception("User does not have access to read the settings. Please rectify in user roles by allowing access to Settings."); } base.OnLoggingOn(args); }