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."); } } }
private void DatastepsBindingSource_AddingNew(object sender, AddingNewEventArgs e) { IDataWorkFlow w = (IDataWorkFlow)workFlowsBindingSource.Current; WorkFlowStep ws = new WorkFlowStep(); ws.ID = Guid.NewGuid().ToString(); //if (w.Datasteps == null) //{ // w.Datasteps = new List<WorkFlowStep>(); //} //w.Datasteps.Add(ws); e.NewObject = ws; }
private bool FindRecord(string name) { workFlowsBindingSource.MoveFirst(); bool found = false; while (!found) { IDataWorkFlow w = (IDataWorkFlow)workFlowsBindingSource.Current; if (w.DataWorkFlowName == name) { found = true; } else { workFlowsBindingSource.MoveNext(); } } return(found); // workFlowsBindingSource.DataSource = DMEEditor.ConfigEditor.WorkFlows[DMEEditor.ConfigEditor.WorkFlows.FindIndex(x => x.DataWorkFlowName == e.CurrentEntity)]; }