Exemplo n.º 1
0
        public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
        {
            Passedarg   = e;
            Logger      = plogger;
            ErrorObject = per;
            DMEEditor   = pbl;
            Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;

            branch        = (IBranch)e.Objects.Where(c => c.Name == "Branch").FirstOrDefault().obj;
            RootAppBranch = (IBranch)e.Objects.Where(c => c.Name == "RootAppBranch").FirstOrDefault().obj;

            dataViewDataSourceBindingSource.AddingNew += DataViewDataSourceBindingSource_AddingNew;

            entitiesBindingSource.AddingNew += EntitiesBindingSource_AddingNew;
            dataViewDataSourceBindingNavigatorSaveItem.Click += DataViewDataSourceBindingNavigatorSaveItem_Click;
            foreach (var item in Enum.GetValues(typeof(ViewType)))
            {
                this.ViewtypeComboBox.Items.Add(item);
            }

            ds = (DataViewDataSource)DMEEditor.GetDataSource(e.CurrentEntity);
            ds.LoadView();
            dataViewDataSourceBindingSource.DataSource = ds.DataView;
            this.viewNameTextBox.Enabled                 = false;
            this.dataSourcesBindingSource.DataSource     = DMEEditor.DataSources;
            this.dataConnectionsBindingSource.DataSource = DMEEditor.ConfigEditor.DataConnections;
            entitiesBindingSource.DataSource             = dataViewDataSourceBindingSource;
            this.entitiesDataGridView.DataError         += EntitiesDataGridView_DataError;
            this.ChangeDatasourceButton.Click           += ChangeDatasourceButton_Click;
        }
Exemplo n.º 2
0
        public void SetConfig(IDMEEditor pDMEEditor, IDMLogger plogger, IUtil putil, string[] args, PassedArgs obj, IErrorsInfo per)
        {
            Passedarg = obj;

            Logger          = plogger;
            util            = putil;
            ErrorObject     = per;
            DMEEditor       = pDMEEditor;
            vds             = (DataViewDataSource)DMEEditor.GetDataSource(obj.DMView.DataViewDataSourceID);
            Visutil         = (IVisUtil)obj.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
            branch          = (IBranch)obj.Objects.Where(c => c.Name == "Branch").FirstOrDefault().obj;
            EntityStructure = (EntityStructure)obj.Objects.Where(c => c.Name == "EntityStructure").FirstOrDefault().obj;
            if (obj.Objects.Where(c => c.Name == "ParentBranch").Any())
            {
                Parentbranch = (IBranch)obj.Objects.Where(c => c.Name == "ParentBranch").FirstOrDefault().obj;
                ParentEntity = vds.GetEntityStructure(Parentbranch.BranchText, true);
            }


            if (obj.CurrentEntity != null)
            {
                EntityName = obj.CurrentEntity;
            }
            else
            {
                EntityName = "";
            }
            this.entitiesBindingNavigatorSaveItem.Click += EntitiesBindingNavigatorSaveItem_Click;
            this.otherentitiesbindingSource.DataSource   = vds.Entities.Where(o => o.Id > 0 && o.Id != EntityStructure.Id);

            this.entitiesBindingSource.DataSource = EntityStructure;
            this.fieldsBindingSource.DataSource   = this.entitiesBindingSource;
            //this.otherentityfieldsbindingSource.ResetBindings(true);
            this.ParentEntitycomboBox.SelectedIndexChanged += ParentEntitycomboBox_SelectedIndexChanged;
        }
Exemplo n.º 3
0
 public WorkFlowStepEditor(IWorkFlowEditor pWorkEdit, IDMEEditor pDME, IDataWorkFlowStep step)
 {
     DMEEditor    = pDME;
     ErrorObject  = DMEEditor.ErrorObject;
     logger       = DMEEditor.Logger;
     WorkFlowStep = step;
 }
Exemplo n.º 4
0
        public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
        {
            Passedarg   = e;
            Logger      = plogger;
            ErrorObject = per;
            DMEEditor   = pbl;
            DMEEditor.ConfigEditor.LoadAppFieldPropertiesValues(e.DatasourceName);
            this.appfieldPropertiesBindingSource.AddingNew += AppfieldPropertiesBindingSource_AddingNew;
            dsname     = e.DatasourceName;
            EntityName = e.CurrentEntity;
            this.appfieldPropertiesBindingSource.DataSource = DMEEditor.ConfigEditor.AppfieldProperties;

            if (appfieldPropertiesBindingSource.Count == 0 && appfieldPropertiesBindingSource.Current == null)
            {
                this.appfieldPropertiesBindingSource.AddNew();
            }
            else
            {
                FindDSRecord(dsname);
            }
            FillEntities();
            if (e.CurrentEntity != null)
            {
                FindEntityRecord(e.CurrentEntity);
            }
            foreach (var item in Enum.GetValues(typeof(DisplayFieldTypes)))
            {
                this.fieldTypesComboBox.Items.Add(item);
            }

            Visutil = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;

            this.Savebutton.Click += FieldPropertiesBindingNavigatorSaveItem_Click;
        }
Exemplo n.º 5
0
        // MongoDBReader Reader;
        public MongoDBDataSource(string datasourcename, IDMLogger logger, IDMEEditor pDMEEditor, DataSourceType databasetype, IErrorsInfo per)
        {
            DatasourceName = datasourcename;
            Logger         = logger;
            ErrorObject    = per;
            DMEEditor      = pDMEEditor;
            DatasourceType = databasetype;
            Category       = DatasourceCategory.NOSQL;

            Dataconnection = new WebAPIDataConnection
            {
                Logger      = logger,
                ErrorObject = ErrorObject
            };
            Dataconnection.ConnectionProp              = DMEEditor.ConfigEditor.DataConnections.Where(c => c.ConnectionName == datasourcename).FirstOrDefault();
            Dataconnection.ConnectionProp.Category     = DatasourceCategory.NOSQL;
            Dataconnection.ConnectionProp.DatabaseType = DataSourceType.MongoDB;

            CurrentDatabase = Dataconnection.ConnectionProp.Database;
            if (CurrentDatabase != null)
            {
                if (CurrentDatabase.Length > 0)
                {
                    GetEntitesList();
                }
            }
        }
Exemplo n.º 6
0
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     Passedarg   = e;
     Logger      = plogger;
     ErrorObject = per;
     DMEEditor   = pbl;
     Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
     ob          = (object)e.Objects.Where(c => c.Name == e.CurrentEntity).FirstOrDefault().obj;
     EntitybindingSource.DataSource = ob;
     EntitybindingSource.AllowNew   = false;
     SaveEntitybutton.Click        += SaveEntitybutton_Click;
     ds = DMEEditor.GetDataSource(e.DatasourceName);
     //  ds.Dataconnection.OpenConnection();
     DMEEditor.OpenDataSource(e.DatasourceName);
     if (ds != null && ds.ConnectionStatus == ConnectionState.Open)
     {
         EntityStructure = ds.GetEntityStructure(e.CurrentEntity, true);
         if (EntityStructure != null)
         {
             if (EntityStructure.Fields != null)
             {
                 if (EntityStructure.Fields.Count > 0)
                 {
                     EntityNamelabel.Text = EntityStructure.EntityName;
                     subtitlelabel.Text   = $"From Data Source {EntityStructure.DataSourceID}";
                     EntityName           = EntityStructure.EntityName;
                     Visutil.controlEditor.GenerateEntityonControl(EntityName, ref panel1, GetObjectType(), ref EntitybindingSource, 150, EntityStructure.DataSourceID);
                 }
             }
         }
     }
 }
Exemplo n.º 7
0
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     Passedarg   = e;
     Logger      = plogger;
     ErrorObject = per;
     DMEEditor   = pbl;
     Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
     if (e.Objects.Where(c => c.Name == "Branch").Any())
     {
         branch = (IBranch)e.Objects.Where(c => c.Name == "Branch").FirstOrDefault().obj;
     }
     foreach (ConnectionProperties c in DMEEditor.ConfigEditor.DataConnections)
     {
         var t = dataSourceIDComboBox.Items.Add(c.ConnectionName);
     }
     foreach (var item in Enum.GetValues(typeof(DataSourceType)))
     {
         var t = databaseTypeComboBox.Items.Add(item);
     }
     foreach (var item in Enum.GetValues(typeof(DatasourceCategory)))
     {
         var t = categoryComboBox.Items.Add(item);
     }
     ds = DMEEditor.GetDataSource(e.DatasourceName);
     if (!string.IsNullOrEmpty(e.CurrentEntity))
     {
         this.entitiesBindingSource.DataSource = ds.Entities[ds.Entities.FindIndex(p => string.Equals(p.EntityName, e.CurrentEntity, StringComparison.OrdinalIgnoreCase))];
     }
 }
Exemplo n.º 8
0
        public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
        {
            Passedarg   = e;
            Logger      = plogger;
            ErrorObject = per;
            DMEEditor   = pbl;
            Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;

            branch        = (IBranch)e.Objects.Where(c => c.Name == "Branch").FirstOrDefault().obj;
            RootAppBranch = (IBranch)e.Objects.Where(c => c.Name == "RootAppBranch").FirstOrDefault().obj;

            dataViewDataSourceNameComboBox.Items.Clear();
            foreach (var item in DMEEditor.ConfigEditor.DataConnections.Where(x => x.Category == DatasourceCategory.VIEWS).ToList())
            {
                dataViewDataSourceNameComboBox.Items.Add(item.ConnectionName);
            }
            this.FolderLocationbutton.Click    += FolderLocationbutton_Click;
            this.SaveAppDefinitionbutton.Click += SaveAppDefinitionbutton_Click;
            this.Generatebutton.Click          += Generatebutton_Click;
            this.appsBindingSource.DataSource   = DMEEditor.ConfigEditor.Apps;
            appsBindingSource.AddingNew        += AppsBindingSource_AddingNew;
            if (string.IsNullOrEmpty(e.CurrentEntity))
            {
                appsBindingSource.AddNew();
            }
            else
            {
                appsBindingSource.DataSource = DMEEditor.ConfigEditor.Apps[DMEEditor.ConfigEditor.Apps.FindIndex(x => x.ID == e.ParameterString1)];
                //this.appNameTextBox.Enabled=false;
            }
            if (e.ObjectType == "MISSINGVIEW" && e.EventType == "EDITAPP")
            {
                MessageBox.Show("Missing View, Please update Selected View ");
            }
        }
Exemplo n.º 9
0
        public void SetConfig(IDMEEditor pDMEEditor, IDMLogger plogger, IUtil putil, string[] args, PassedArgs obj, IErrorsInfo per)
        {
            Passedarg = obj;
            // SourceConnection = pdataSource;
            Logger = plogger;
            // Visutil = new VisUtil(Logger,putil,per);
            util        = putil;
            MyDataView  = (DMDataView)Passedarg.DMView;
            DMEEditor   = pDMEEditor;
            ErrorObject = per;
            Visutil     = (IVisUtil)obj.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
            rdb         = (RDBSource)DMEEditor.GetDataSource(Passedarg.DatasourceName);
            switch (obj.ObjectType)
            {
            case "RDBMSTABLE":
                EntityName       = obj.CurrentEntity;
                SourceConnection = (IRDBSource)Passedarg.DataSource;

                break;

            case "CRUDENTITY":
                EntityName       = obj.CurrentEntity;
                SourceConnection = DMEEditor.GetDataSource(Passedarg.DatasourceName);
                break;

            default:
                break;
            }



            LoadTable(EntityName);
        }
Exemplo n.º 10
0
        public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
        {
            Passedarg   = e;
            Logger      = plogger;
            ErrorObject = per;
            DMEEditor   = pbl;
            Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
            this.function2FunctionsBindingSource.DataSource        = DMEEditor.ConfigEditor.Function2Functions;
            this.function2FunctionsBindingNavigatorSaveItem.Click += Function2FunctionsBindingNavigatorSaveItem_Click;
            this.fromClassComboBox.SelectedValueChanged           += FromClassComboBox_SelectedValueChanged;
            this.toClassComboBox.SelectedValueChanged             += ToClassComboBox_SelectedValueChanged;
            foreach (var item in DMEEditor.ConfigEditor.BranchesClasses)
            {
                toClassComboBox.Items.Add(item.className);
                fromClassComboBox.Items.Add(item.className);
            }
            foreach (var item in DMEEditor.ConfigEditor.Events)
            {
                eventComboBox.Items.Add(item.EventName);
            }

            this.actionTypeComboBox.Items.Add("Event");
            this.actionTypeComboBox.Items.Add("Function");
            this.actionTypeComboBox.SelectedValueChanged += ActionTypeComboBox_SelectedValueChanged;
        }
Exemplo n.º 11
0
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     Passedarg   = e;
     Logger      = plogger;
     ErrorObject = per;
     DMEEditor   = pbl;
 }
Exemplo n.º 12
0
        public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
        {
            Passedarg   = e;
            Logger      = plogger;
            ErrorObject = per;
            DMEEditor   = pbl;
            Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
            if (e.Objects.Where(c => c.Name == "Branch").Any())
            {
                branch = (IBranch)e.Objects.Where(c => c.Name == "Branch").FirstOrDefault().obj;
            }
            if (e.Objects.Where(c => c.Name == "RootBranch").Any())
            {
                RootAppBranch = (IBranch)e.Objects.Where(c => c.Name == "RootBranch").FirstOrDefault().obj;
            }

            this.dataConnectionsBindingSource.DataSource = DMEEditor.ConfigEditor.DataConnections;
            scriptBindingSource.DataSource = DMEEditor.ETL.script.Entities;

            this.RunScriptbutton.Click          += RunScriptbutton_Click;
            this.StopButton.Click               += StopButton_Click;
            this.ErrorsAllowdnumericUpDown.Value = 10;
            // this.CreateScriptButton.Click += CreateScriptButton_Click;
            // this.scriptBindingSource.DataSource = DMEEditor.ETL.trackingHeader;
        }
Exemplo n.º 13
0
        public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
        {
            Passedarg = e;

            DMEEditor = pbl;

            Visutil = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
            branch  = (IBranch)e.Objects.Where(c => c.Name == "Branch").FirstOrDefault().obj;
            if (e.Objects.Where(c => c.Name == "ParentBranch").Any())
            {
                Parentbranch = (IBranch)e.Objects.Where(c => c.Name == "ParentBranch").FirstOrDefault().obj;
            }
            scripHeader = new SyncDataSource();
            Srcds       = DMEEditor.GetDataSource(branch.BranchText);
            if (Srcds != null)
            {
                Srcds.Openconnection();
                if (Srcds.ConnectionStatus == ConnectionState.Open)
                {
                }
                else
                {
                    MessageBox.Show($"Error Cannot Connect to Source  {branch.BranchText}");
                    DMEEditor.AddLogMessage("Fail", $"Error Cannot Connext to Source {branch.BranchText}", DateTime.Now, 0, null, Errors.Failed);
                }
            }
            else
            {
                DMEEditor.AddLogMessage("Fail", $"Error Cannot get Source {branch.BranchText}", DateTime.Now, 0, null, Errors.Failed);
                MessageBox.Show($"Error Cannot get Source  {branch.BranchText}");
            }
        }
Exemplo n.º 14
0
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     Passedarg   = e;
     Logger      = plogger;
     DMEEditor   = pbl;
     ErrorObject = per;
     foreach (ConnectionProperties c in DMEEditor.ConfigEditor.DataConnections.Where(c => c.Category == DatasourceCategory.RDBMS))
     {
         var t = databaseTypeComboBox.Items.Add(c.ConnectionName);
     }
     //   DMEEditor.ConfigEditor.LoadTablesEntities();
     fieldtypeDataGridViewTextBoxColumn.DataSource = dataTypesMapBindingSource;
     //fieldtypeDataGridViewTextBoxColumn.DataSource = DMEEditor.typesHelper.GetNetDataTypes2();
     this.entitiesBindingNavigatorSaveItem.Click += EntitiesBindingNavigatorSaveItem_Click;
     entitiesBindingSource.DataSource             = DMEEditor.ConfigEditor.EntityCreateObjects;
     this.entitiesBindingSource.AddingNew        += EntitiesBindingSource_AddingNew;
     this.fieldsBindingSource.AddingNew          += FieldsBindingSource_AddingNew;
     this.CreateinDBbutton.Click       += CreateinDBbutton_Click1;
     this.fieldsDataGridView.DataError += FieldsDataGridView_DataError;
     this.databaseTypeComboBox.SelectedIndexChanged += DatabaseTypeComboBox_SelectedIndexChanged;
     // this.fieldsDataGridView.RowValidated += FieldsDataGridView_RowValidated;
     this.fieldsDataGridView.RowValidating += FieldsDataGridView_RowValidating;
     this.fieldsDataGridView.CellEndEdit   += FieldsDataGridView_CellEndEdit;
     // this.databaseTypeComboBox.SelectedIndexChanged += DatabaseTypeComboBox_SelectedIndexChanged;
 }
Exemplo n.º 15
0
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     DMEEditor       = pbl;
     ErrorObject     = pbl.ErrorObject;
     Logger          = pbl.Logger;
     Logger.Onevent += Logger_Onevent;
     //  TextBox1.TextChanged += TextBox1_TextChanged;
 }
Exemplo n.º 16
0
 public MongoDBReader(string datasourcename, string databasename, IDMEEditor pDMEEditor, IDataConnection pConn, List <EntityField> pfields = null) : base(datasourcename, pDMEEditor, pConn, pfields)
 {
     CurrentDatabase = databasename;
     if (string.IsNullOrWhiteSpace(CurrentDatabase) == false)
     {
         OpenStore(ConnProp.Url);
     }
 }
Exemplo n.º 17
0
 public RavenDBReader(string datasourcename, IDMEEditor pDME_editor, IDataConnection pConn, List <EntityField> pfields = null) : base(datasourcename, pDME_editor, pConn, pfields)
 {
     Store = OpenStore(ConnProp.Url, 10, true);
     if (Store != null)
     {
         Databases = GetDatabaseNames();
     }
 }
Exemplo n.º 18
0
        public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
        {
            Passedarg   = e;
            Logger      = plogger;
            ErrorObject = per;
            DMEEditor   = pbl;
            this.mappingSchemaBindingSource.AddingNew   += MappingSchemaBindingSource_AddingNew;
            this.mapsBindingSource.AddingNew            += MapsBindingSource_AddingNew;
            this.fldMappingBindingSource.AddingNew      += FldMappingBindingSource_AddingNew;
            this.dataConnectionsBindingSource.DataSource = DMEEditor.ConfigEditor.DataConnections;
            Visutil = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
            foreach (var item in Enum.GetValues(typeof(DatasourceCategory)))
            {
                SrcFiltercomboBox.Items.Add(item);
                DestTypeFiltercomboBox.Items.Add(item);
            }
            if (e.Objects.Where(c => c.Name == "Branch").Any())
            {
                branch = (IBranch)e.Objects.Where(c => c.Name == "Branch").FirstOrDefault().obj;
            }
            foreach (ConnectionProperties i in DMEEditor.ConfigEditor.DataConnections)
            {
                entity1DataSourceComboBox.Items.Add(i.ConnectionName);
                entity2DataSourceComboBox.Items.Add(i.ConnectionName);
            }
            if (string.IsNullOrEmpty(e.CurrentEntity))
            {
                this.mappingSchemaBindingSource.DataSource = DMEEditor.ConfigEditor.MappingSchema;
                this.mappingSchemaBindingSource.AddNew();
            }
            else
            {
                this.schemaNameTextBox.Enabled             = false;
                this.mappingSchemaBindingSource.DataSource = DMEEditor.ConfigEditor.MappingSchema[DMEEditor.ConfigEditor.MappingSchema.FindIndex(i => i.SchemaName == e.CurrentEntity)];
            }
            this.entity1DataSourceComboBox.SelectedValueChanged += Entity1DataSourceComboBox_SelectedValueChanged;
            this.entity2DataSourceComboBox.SelectedValueChanged += Entity2DataSourceComboBox_SelectedValueChanged;
            this.entityName1ComboBox.SelectedValueChanged       += EntityName1ComboBox_SelectedValueChanged;
            this.entityName2ComboBox.SelectedValueChanged       += EntityName2ComboBox_SelectedValueChanged;

            this.mappingSchemaBindingNavigatorSaveItem.Click += MappingSchemaBindingNavigatorSaveItem_Click;

            this.fldMappingDataGridView.DataError += FldMappingDataGridView_DataError;
            this.mappingsDataGridView.DataError   += MappingsDataGridView_DataError;


            this.SrcDataSourcelistBox1.MouseDown += ListBox1_MouseDown;
            this.DestDatasourelistBox.MouseDown  += DestDatasourelistBox_MouseDown;
            this.mappingsDataGridView.DragEnter  += MappingsDataGridView_DragEnter;
            this.mappingsDataGridView.DragDrop   += MappingsDataGridView_DragDrop;

            this.SrcFiltercomboBox.SelectedValueChanged      += SrcFiltercomboBox_SelectedValueChanged;
            this.DestTypeFiltercomboBox.SelectedValueChanged += DestTypeFiltercomboBox_SelectedValueChanged;

            this.CreateMapButton.Click += CreateMapButton_Click;
        }
Exemplo n.º 19
0
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     Passedarg   = e;
     Logger      = plogger;
     ErrorObject = per;
     DMEEditor   = pbl;
     Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
     this.eventsBindingSource.DataSource        = DMEEditor.ConfigEditor.Events;
     this.eventsBindingNavigatorSaveItem.Click += EventsBindingNavigatorSaveItem_Click;
 }
Exemplo n.º 20
0
 public TxtXlsCSVReader(string datasourcename, IDMLogger logger, IDMEEditor pDMEEditor, FileTypes pFileType, IErrorsInfo per, string pFilePath, List <EntityField> pfields = null)
 {
     Logger           = logger;
     ErrorObject      = per;
     FilePath         = pFilePath;
     FileName         = datasourcename;
     ErrorObject.Flag = Errors.Ok;
     DMEEditor        = pDMEEditor;
     SetupConfig();
 }
Exemplo n.º 21
0
        public void   SetConfig(IDMEEditor pDMEEditor, IDMLogger plogger, IUtil putil, string[] args, PassedArgs obj, IErrorsInfo per)
        {
            Passedarg = obj;

            Logger           = plogger;
            this.Width       = 430;
            ErrorObject      = per;
            DMEEditor        = pDMEEditor;
            Visutil          = (IVisUtil)obj.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
            SourceConnection = Passedarg.DataSource;
            if (SourceConnection.Category == DatasourceCategory.RDBMS)
            {
                rdb = (RDBSource)SourceConnection;
                string schemaname = rdb.GetSchemaName();
            }
            switch (obj.ObjectType)
            {
            case "RDBMSTABLE":
                EntityName = obj.CurrentEntity;


                t = (DataTable)rdb.GetEntity(EntityName, null);
                break;

            case "CRUDENTITY":
                EntityName = obj.CurrentEntity;


                t = (DataTable)rdb.GetEntity(EntityName, null);

                break;

            default:
                break;
            }



            bindingSource1.DataSource = t;
            bindingSource1.ResetBindings(true);
            Visutil.controlEditor.GenerateTableViewOnControl(EntityName, ref panel1, t, ref bindingSource1, 200, SourceConnection.DatasourceName);
            this.Controls.Add(panel1);
            panel1.Dock       = DockStyle.Fill;
            panel1.AutoScroll = true;
            //Form a = (Form)Parent;
            //a.FormBorderStyle = FormBorderStyle.FixedToolWindow;
            EntityNameLabel.Text            = EntityName;
            bindingNavigator1.BindingSource = bindingSource1;
            bindingNavigator1.SendToBack();
            // Savebutton.SendToBack();



            this.SavetoolStripButton.Click += Savebutton_Click;
        }
Exemplo n.º 22
0
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     Passedarg   = e;
     Logger      = plogger;
     ErrorObject = per;
     DMEEditor   = pbl;
     Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
     this.objectTypesBindingNavigatorSaveItem.Click += ObjectTypesBindingNavigatorSaveItem_Click;
     this.objectTypesBindingSource.DataSource        = DMEEditor.ConfigEditor.objectTypes;
     // this.objectTypesDataGridView.Sort(this.ObjectTypeinGrid, ListSortDirection.Ascending);
 }
Exemplo n.º 23
0
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     Passedarg   = e;
     Logger      = plogger;
     ErrorObject = per;
     DMEEditor   = pbl;
     Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
     //this.webView21 = new Microsoft.Web.WebView2.WinForms.WebView2();
     InitializeAsync();
     Url = e.CurrentEntity;
     ShowReport();
 }
Exemplo n.º 24
0
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     Passedarg   = e;
     Logger      = plogger;
     ErrorObject = per;
     DMEEditor   = pbl;
     Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
     EntityName  = e.DatasourceName;
     this.headersBindingNavigatorSaveItem.Click += HeadersBindingNavigatorSaveItem_Click;
     this.headersBindingSource.AddingNew        += HeadersBindingSource_AddingNew;
     this.headersBindingSource.DataSource        = DMEEditor.ConfigEditor.DataConnections[DMEEditor.ConfigEditor.DataConnections.FindIndex(x => x.ConnectionName == EntityName)].Headers;
 }
Exemplo n.º 25
0
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     Passedarg   = e;
     Logger      = plogger;
     ErrorObject = per;
     DMEEditor   = pbl;
     Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
     this.entitiesBindingNavigatorSaveItem.Click += EntitiesBindingNavigatorSaveItem_Click;
     EntityName = e.DatasourceName;
     ds         = DMEEditor.GetDataSource(e.DatasourceName);
     this.entitiesBindingSource.AddingNew += EntitiesBindingSource_AddingNew;
     this.entitiesBindingSource.DataSource = ds.Entities;
 }
Exemplo n.º 26
0
        public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
        {
            Passedarg   = e;
            Logger      = plogger;
            ErrorObject = per;
            DMEEditor   = pbl;

            List <Icon> icons = new List <Icon>();

            Visutil = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
            driverDefinitionsBindingSource.DataSource             = DMEEditor.ConfigEditor.DriverDefinitionsConfig;
            this.dataDriversDataGridView.DataError               += DataDriversDataGridView_DataError;
            this.driverDefinitionsBindingNavigatorSaveItem.Click += DriverDefinitionsBindingNavigatorSaveItem_Click;
        }
Exemplo n.º 27
0
        public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
        {
            Passedarg   = e;
            Logger      = plogger;
            ErrorObject = per;
            DMEEditor   = pbl;
            Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;

            branch     = (IBranch)e.Objects.Where(c => c.Name == "Branch").FirstOrDefault().obj;
            RootBranch = (IBranch)e.Objects.Where(c => c.Name == "RootReportBranch").FirstOrDefault().obj;
            this.reportWritersClassesBindingSource.DataSource = DMEEditor.ConfigEditor.ReportWritersClasses;
            this.reportsBindingSource.DataSource = DMEEditor.ConfigEditor.ReportsDefinition;
            this.reportsBindingSource.AddingNew += ReportsBindingSource_AddingNew;
            this.blocksBindingSource.DataSource  = reportsBindingSource;
            blockColumnsBindingSource.DataSource = blocksBindingSource;
            this.blocksBindingSource.AddingNew  += BlocksBindingSource_AddingNew;
            this.AddBlockbutton.Click           += AddBlockbutton_Click;
            if (string.IsNullOrEmpty(e.CurrentEntity))
            {
                reportsBindingSource.AddNew();
                blocksBindingSource.AddNew();
                this.nameTextBox.Enabled = true;
            }
            else
            {
                reportsBindingSource.DataSource = DMEEditor.ConfigEditor.ReportsDefinition[DMEEditor.ConfigEditor.ReportsDefinition.FindIndex(x => x.Name == e.CurrentEntity)];
                this.nameTextBox.Enabled        = false;
            }
            foreach (ConnectionProperties item in DMEEditor.ConfigEditor.DataConnections.Where(x => x.Category == DatasourceCategory.VIEWS))
            {
                this.viewIDComboBox.Items.Add(item.ConnectionName);
            }
            this.viewIDComboBox.SelectedValueChanged += ViewIDComboBox_SelectedValueChanged;
            this.Savebutton.Click      += Savebutton_Click;
            this.RunReportbutton.Click += RunReportbutton_Click;
            this.blocksBindingSource.CurrentChanged       += BlocksBindingSource_CurrentChanged;
            this.packageNameComboBox.SelectedValueChanged += PackageNameComboBox_SelectedValueChanged;
            this.RemoveBlockbutton.Click += RemoveBlockbutton_Click;

            //this.blockColumnsDataGridView.CellClick += BlockColumnsDataGridView_CellClick;

            //this.blockColumnsDataGridView.CellContentClick += BlockColumnsDataGridView_CellContentClick;

            #region "Drag and Drop events"
            this.titleTextBox.DragLeave     += TitleTextBox_DragLeave;
            this.subTitleTextBox.DragLeave  += SubTitleTextBox_DragLeave;
            this.HeaderpictureBox.DragEnter += HeaderpictureBox_DragEnter;

            #endregion
        }
Exemplo n.º 28
0
 public NPOIExcelDataSource(string datasourcename, IDMLogger logger, IDMEEditor pDMEEditor, DataSourceType pDatasourceType, IErrorsInfo per)
 {
     DatasourceName = datasourcename;
     Logger         = logger;
     ErrorObject    = per;
     DMEEditor      = pDMEEditor;
     DatasourceType = pDatasourceType;
     Dataconnection = new FileConnection(DMEEditor)
     {
         Logger      = logger,
         ErrorObject = ErrorObject,
     };
     Dataconnection.ConnectionProp = DMEEditor.ConfigEditor.DataConnections.Where(c => c.FileName == datasourcename).FirstOrDefault();
 }
Exemplo n.º 29
0
        public DataViewDataSource(string datasourcename, IDMLogger logger, IDMEEditor pDMEEditor, DataSourceType pDatasourceType, IErrorsInfo per)
        {
            DatasourceName = datasourcename;
            Logger         = logger;
            ErrorObject    = per;
            DMEEditor      = pDMEEditor;
            DatasourceType = DataSourceType.Text;
            Category       = DatasourceCategory.VIEWS;
            Dataconnection = new DataViewConnection
            {
                Logger      = logger,
                ErrorObject = ErrorObject,
            };
            string filename = Path.GetFileName(datasourcename);
            List <ConnectionProperties> cnlist = DMEEditor.ConfigEditor.DataConnections.Where(p => p.FileName != null && p.Category == DatasourceCategory.VIEWS).ToList();
            string filepath; //= DMEEditor.ConfigEditor.Config.Folders.Where(c => c.FolderFilesType == FolderFileTypes.DataView).FirstOrDefault().FolderPath;

            if (cnlist.Where(c => c.FileName.Equals(filename, StringComparison.OrdinalIgnoreCase)).Any())
            {
                Dataconnection.ConnectionProp = cnlist.Where(c => c.FileName.Equals(filename, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
                filepath = Dataconnection.ConnectionProp.FilePath;
            }
            else
            {
                filepath = DMEEditor.ConfigEditor.Config.Folders.Where(c => c.FolderFilesType == FolderFileTypes.DataView).FirstOrDefault().FolderPath;
                Dataconnection.ConnectionProp                = new ConnectionProperties();
                Dataconnection.ConnectionProp.FileName       = filename;
                Dataconnection.ConnectionProp.FilePath       = filepath;
                Dataconnection.ConnectionProp.Category       = DatasourceCategory.VIEWS;
                Dataconnection.ConnectionProp.DatabaseType   = DataSourceType.Json;
                Dataconnection.ConnectionProp.DriverVersion  = "1";
                Dataconnection.ConnectionProp.DriverName     = "DataViewReader";
                Dataconnection.ConnectionProp.ConnectionName = filename;
                DMEEditor.ConfigEditor.DataConnections.Add((ConnectionProperties)Dataconnection.ConnectionProp);
                DMEEditor.ConfigEditor.SaveDataconnectionsValues();
            }
            DataViewFile = Path.Combine(filepath, filename);
            //   DMEEditor.OpenDataSource(filename);
            //  Dataconnection.OpenConnection();
            //if (Dataconnection.ConnectionStatus== ConnectionState.Open)
            //{
            //    LoadView();
            //}
            //else
            //{
            //    DataView = GenerateView(filename, filepath);
            //    WriteDataViewFile(DataViewFile);
            //}
        }
Exemplo n.º 30
0
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     Passedarg   = e;
     Logger      = plogger;
     ErrorObject = per;
     DMEEditor   = pbl;
     foreach (var item in Enum.GetValues(typeof(FolderFileTypes)))
     {
         this.folderFilesTypeDataGridViewTextBoxColumn.Items.Add(item);
     }
     this.foldersBindingSource.DataSource = DMEEditor.ConfigEditor.Config.Folders;
     this.bindingNavigator1.BindingSource = foldersBindingSource;
     addinFoldersDataGridView.DataSource  = foldersBindingSource;
     this.Savebutton.Click += Savebutton_Click;
 }