示例#1
0
 private void ObjectSpace_ObjectSaving(object sender, ObjectManipulatingEventArgs e)
 {
     if (this.Employee.EmployeeType == Ignyt.BusinessInterface.EmployeeType.SystemUser)
     {
         MultiTenantHelper.CreateUser(this.Employee);
     }
 }
示例#2
0
        private void MyWorkbenchAspNetApplication_DatabaseVersionMismatch(object sender, DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs e)
        {
            e.Updater.Update();

            MultiTenantHelper.CreateUser(this.ObjectSpaceProvider.CreateUpdatingObjectSpace(true));

            e.Handled = true;
        }
示例#3
0
        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);
        }