internal override void OnSaveData(CommandInteractionHandler interactionHandler)
        {
            AutomatedDataHandlerBase automatedDataHandlerBase = this.parentContext.DataHandler as AutomatedDataHandlerBase;

            automatedDataHandlerBase.DataObjectStore = base.DataObjectStore;
            automatedDataHandlerBase.RefreshDataObjectStoreWithNewTable();
            this.parentContext.IsDirty = true;
        }
 public override bool HasPermission()
 {
     if (!string.IsNullOrEmpty(this.Schema) && null != this.Assembly)
     {
         PageConfigurableProfile pageConfigurableProfile = AutomatedDataHandlerBase.BuildProfile(this.Assembly, this.Schema) as PageConfigurableProfile;
         return(pageConfigurableProfile.HasPermission());
     }
     return(base.HasPermission());
 }
Esempio n. 3
0
 private void EnableBulkEditingOnDemand()
 {
     if (!this.enabledBulkEditors)
     {
         AutomatedDataHandlerBase automatedDataHandlerBase = this.DataHandler as AutomatedDataHandlerBase;
         if (automatedDataHandlerBase != null)
         {
             if (automatedDataHandlerBase.EnableBulkEdit)
             {
                 this.EnableBulkEditingBindingSource(automatedDataHandlerBase);
             }
             else if (!(automatedDataHandlerBase is AutomatedDataHandler) || (automatedDataHandlerBase as AutomatedDataHandler).SaverExecutionContextFactory is MonadCommandExecutionContextForPropertyPageFactory)
             {
                 this.EnableRbacBindingSource(automatedDataHandlerBase);
             }
         }
         this.enabledBulkEditors = true;
     }
 }
Esempio n. 4
0
        private void EnableBulkEditingBindingSource(AutomatedDataHandlerBase dataHandler)
        {
            BindingManagerBase bindingManagerBase = this.BindingContext[base.BindingSource];
            object             dataSource         = base.BindingSource.DataSource;

            foreach (object obj in bindingManagerBase.Bindings)
            {
                Binding     binding    = (Binding)obj;
                IBulkEditor bulkEditor = binding.Control as IBulkEditor;
                if (bulkEditor != null)
                {
                    BulkEditorState bulkEditorState = 0;
                    if (!dataHandler.IsBulkEditingModifiedParameterName(dataSource, binding.BindingMemberInfo.BindingMember))
                    {
                        bulkEditorState = (dataHandler.IsBulkEditingSupportedParameterName(dataSource, binding.BindingMemberInfo.BindingMember) ? 1 : 2);
                    }
                    bulkEditor.BulkEditorAdapter[binding.PropertyName] = bulkEditorState;
                }
            }
        }
Esempio n. 5
0
        private void EnableRbacBindingSource(AutomatedDataHandlerBase dataHandler)
        {
            if (dataHandler != null)
            {
                BindingManagerBase bindingManagerBase = this.BindingContext[base.BindingSource];
                foreach (object obj in bindingManagerBase.Bindings)
                {
                    Binding     binding    = (Binding)obj;
                    IBulkEditor bulkEditor = binding.Control as IBulkEditor;
                    if (bulkEditor != null && !dataHandler.HasPermissionForProperty(binding.BindingMemberInfo.BindingMember, binding.DataSourceUpdateMode != DataSourceUpdateMode.Never))
                    {
                        bulkEditor.BulkEditorAdapter[binding.PropertyName] = 3;
                    }
                }
            }
            EventHandler setActived = this.SetActived;

            if (setActived != null)
            {
                setActived(this, EventArgs.Empty);
            }
        }
 public AutomatedDataHandlerBase(Assembly assembly, string schema) : this(AutomatedDataHandlerBase.BuildProfile(assembly, schema))
 {
     this.Assembly        = assembly;
     this.SchemaName      = schema;
     this.Table.TableName = schema;
 }