Beispiel #1
0
        private void ShowReport(string htmlfile)
        {
            List <ObjectItem> ob = new List <ObjectItem>();;
            ObjectItem        it = new ObjectItem();

            it.obj  = this;
            it.Name = "Branch";
            ob.Add(it);
            string[]   args            = new string[] { htmlfile, null };
            PassedArgs Passedarguments = new PassedArgs
            {
                Addin         = null,
                AddinName     = null,
                AddinType     = "",
                DMView        = null,
                CurrentEntity = htmlfile,

                ObjectType = "HTMLREPORT",

                ObjectName = htmlfile,
                Objects    = ob,

                EventType = "HTMLREPORT"
            };


            Visutil.ShowUserControlInContainer("uc_Webview", Visutil.DisplayPanel, DMEEditor, args, Passedarguments);
        }
Beispiel #2
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;
        }
 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))];
     }
 }
Beispiel #4
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;
        }
Beispiel #5
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 ");
            }
        }
        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}");
            }
        }
 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;
 }
Beispiel #8
0
        public PassedArgs ExecuteRule(PassedArgs args)
        {
            try
            {
                IDataSource ds = DMEEditor.GetDataSource(args.DatasourceName);
                var         v  = ds.Dataconnection.ConnectionProp.DatasourceDefaults;;
                // string outv;
                var        v1 = v.Where(o => o.propertyName == args.CurrentEntity);
                ObjectItem it = new ObjectItem();
                it.obj  = v1;
                it.Name = "GetDefaultValue";

                if (args.Objects == null)
                {
                    args.Objects = new List <ObjectItem>();
                }
                args.Objects.Add(it);
            }

            catch (Exception ex)
            {
                string mes = "Could not Execute Rule " + RuleName;
                DMEEditor.AddLogMessage("Fail", mes + ex.Message, DateTime.Now, -1, mes, Errors.Failed);
            };
            return(args);
        }
 public BackgroundWorkerThread(PassedArgs passedArgs)
 {
     backgroundWorker1 = new BackgroundWorker();
     InitializeBackgroundWorker();
     backgroundWorker1.WorkerReportsProgress      = true;
     backgroundWorker1.WorkerSupportsCancellation = true;
 }
Beispiel #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;
            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;
        }
Beispiel #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;
     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);
                 }
             }
         }
     }
 }
Beispiel #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;
            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;
        }
        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);
        }
Beispiel #14
0
        public PassedArgs ExecuteRule(PassedArgs args)
        {
            try
            {
                IDataSource ds = DMEEditor.GetDataSource(args.DatasourceName);
                object      tb = ds.RunQuery(args.ParameterString1);
                dynamic     v1 = null;
                //if (tb != null)
                //{
                //    if (tb.Rows.Count > 0)
                //    {
                //       v1  = tb.Rows[0].ItemArray[0].ToString();
                //    }
                //}
                ObjectItem it = new ObjectItem();
                it.obj  = v1;
                it.Name = "GetDefaultValue";

                if (args.Objects == null)
                {
                    args.Objects = new List <ObjectItem>();
                }
                args.Objects.Add(it);
            }

            catch (Exception ex)
            {
                string mes = "Could not Execute Rule " + RuleName;
                DMEEditor.AddLogMessage("Fail", mes + ex.Message, DateTime.Now, -1, mes, Errors.Failed);
            };
            return(args);
        }
 public void SetConfig(IDMEEditor pbl, IDMLogger plogger, IUtil putil, string[] args, PassedArgs e, IErrorsInfo per)
 {
     Passedarg   = e;
     Logger      = plogger;
     ErrorObject = per;
     DMEEditor   = pbl;
 }
Beispiel #16
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;
        }
        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;
        }
Beispiel #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;
     Visutil     = (IVisUtil)e.Objects.Where(c => c.Name == "VISUTIL").FirstOrDefault().obj;
     this.eventsBindingSource.DataSource        = DMEEditor.ConfigEditor.Events;
     this.eventsBindingNavigatorSaveItem.Click += EventsBindingNavigatorSaveItem_Click;
 }
Beispiel #19
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;
        }
        private void ShowParameters(string parametertype)
        {
            if (datastepsBindingSource.Count > 0)
            {
                string[]          args = { "New Query Entity", null, null };
                List <ObjectItem> ob   = new List <ObjectItem>();;
                ObjectItem        it   = new ObjectItem();
                it.obj  = this;
                it.Name = "Addin";
                ob.Add(it);
                IDataWorkFlowStep step = (IDataWorkFlowStep)datastepsBindingSource.Current;
                IDataWorkFlow     wk   = (IDataWorkFlow)workFlowsBindingSource.Current;
                if (!string.IsNullOrEmpty(step.StepName) && !string.IsNullOrWhiteSpace(step.StepName))
                {
                    if (!string.IsNullOrEmpty(this.dataWorkFlowNameTextBox.Text) && !string.IsNullOrWhiteSpace(this.dataWorkFlowNameTextBox.Text))
                    {
                        if (wk.Datasteps != null)
                        {
                            int        stepidx         = wk.Datasteps.FindIndex(i => i.StepName == step.StepName);
                            PassedArgs Passedarguments = new PassedArgs
                            {
                                Addin         = null,
                                AddinName     = null,
                                AddinType     = "",
                                DMView        = null,
                                CurrentEntity = this.dataWorkFlowNameTextBox.Text,
                                Id            = stepidx,
                                ObjectType    = "PARAMETERS",
                                DataSource    = null,
                                ObjectName    = this.dataWorkFlowNameTextBox.Text,

                                Objects = ob,

                                DatasourceName = BranchText,
                                EventType      = parametertype
                            };
                            Vis.ShowUserControlPopUp("uc_workflowParameters", DMEEditor, args, Passedarguments);
                        }
                        else
                        {
                            MessageBox.Show("Please Save Data.");
                        }
                    }
                    else
                    {
                        MessageBox.Show("Please Enter the name for the schema and Save.");
                    }
                }
                else
                {
                    MessageBox.Show("Please Enter the name for Step and Save.");
                }
            }
        }
 public IErrorsInfo RunWorker(PassedArgs passedArgs)
 {
     args = passedArgs;
     DME  = (DMEEditor)args.Objects.Where(c => c.Name == "DMEEDITOR").FirstOrDefault().obj;
     // Reset the variable for percentage tracking.
     highestPercentageReached = 0;
     args = passedArgs;
     // Start the asynchronous operation.
     backgroundWorker1.RunWorkerAsync(args);
     return(DME.ErrorObject);
 }
Beispiel #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);
 }
Beispiel #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();
 }
        public void RaiseEvent(object sender, EventArgs e, Type SenderType)
        {
            Control tx = null;

            switch (SenderType.Name)
            {
            case "TextBox":

                tx = (TextBox)sender;
                break;

            case "ComboBox":

                tx = (ComboBox)sender;
                break;

            case "CheckBox":

                tx = (CheckBox)sender;
                break;

            case "DateTimePicker":

                tx = (DateTimePicker)sender;
                break;

            default:
                break;
            }

            string[]          args = { "TextBox", tx.Name, tx.Text };
            List <ObjectItem> ob   = new List <ObjectItem>();;
            ObjectItem        it   = new ObjectItem();

            it.obj  = tx;
            it.Name = "TextBox";
            ob.Add(it);

            PassedArgs Passedarguments = new PassedArgs
            {
                Addin         = null,
                AddinName     = null,
                AddinType     = "",
                DMView        = null,
                CurrentEntity = tx.Name,
                ObjectType    = "TEXTBOXCHANGED",
                DataSource    = null,
                ObjectName    = tx.Name,
                Objects       = ob,
                EventType     = "TEXTBOXCHANGED"
            };
            // ActionNeeded?.Invoke(this, Passedarguments);
        }
Beispiel #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;
     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;
 }
        private void InTableParametersBindingSource_AddingNew(object sender, AddingNewEventArgs e)
        {
            WorkFlowStep s = (WorkFlowStep)datastepsBindingSource.Current;
            PassedArgs   x = new PassedArgs();

            //if (s.InParameters == null)
            //{
            //    s.InParameters = new List<PassedArgs>();
            //}
            //s.InParameters.Add(x);
            e.NewObject = x;
        }
Beispiel #27
0
        //-----------------------
        public async Task <IErrorsInfo> RunChildScriptAsync(SyncEntity ParentScript, IDataSource srcds, IDataSource destds, IProgress <PassedArgs> progress, CancellationToken token)
        {
            if (ParentScript.CopyDataScripts.Count > 0)
            {
                //foreach (LScript sc in ParentScript.CopyDataScripts.Where(p=>p.scriptType==DDLScriptType.CopyData).ToList())
                for (int i = 0; i < ParentScript.CopyDataScripts.Count; i++)
                {
                    SyncEntity sc = ParentScript.CopyDataScripts[i];
                    destds = DMEEditor.GetDataSource(sc.destinationdatasourcename);
                    srcds  = DMEEditor.GetDataSource(sc.sourcedatasourcename);

                    if (destds != null && srcds != null)
                    {
                        DMEEditor.OpenDataSource(sc.destinationdatasourcename);
                        DMEEditor.OpenDataSource(sc.sourcedatasourcename);
                        if (destds.ConnectionStatus == System.Data.ConnectionState.Open)
                        {
                            if (sc.scriptType == DDLScriptType.CopyData)
                            {
                                await Task.Run(() =>
                                {
                                    sc.errorsInfo = RunCopyEntityScript(ref sc, srcds, destds, sc.sourceDatasourceEntityName, sc.destinationentityname, progress, token, true);  //t1.Result;//DMEEditor.ETL.CopyEntityData(srcds, destds, ScriptHeader.Scripts[i], true);
                                });

                                if (DMEEditor.ErrorObject.Flag == Errors.Failed)
                                {
                                    sc.errormessage = DMEEditor.ErrorObject.Message;
                                    sc.errorsInfo   = DMEEditor.ErrorObject;
                                    sc.Active       = false;

                                    if (progress != null)
                                    {
                                        PassedArgs ps = new PassedArgs {
                                            EventType = "Update", ParameterInt1 = CurrentScriptRecord, ParameterInt2 = ScriptCount, ParameterString3 = DMEEditor.ErrorObject.Message
                                        };
                                        progress.Report(ps);
                                    }
                                }
                            }
                            else
                            {
                                DMEEditor.ErrorObject.Flag    = Errors.Failed;
                                DMEEditor.ErrorObject.Message = $" Could not Connect to on the Data Dources {sc.destinationdatasourcename} or {sc.sourcedatasourcename}";
                            }
                            // Report progress as a percentage of the total task.
                            //    UpdateEvents(sc, highestPercentageReached, CurrentRecord, numberToCompute, destds);
                        }
                    }
                }
            }
            return(DMEEditor.ErrorObject);
        }
Beispiel #28
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;
 }
Beispiel #29
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
        }
Beispiel #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;

            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;
        }