Exemplo n.º 1
0
 public WorkFlowStepEditor(IWorkFlowEditor pWorkEdit, IDMEEditor pDME, IDataWorkFlowStep step)
 {
     DMEEditor    = pDME;
     ErrorObject  = DMEEditor.ErrorObject;
     logger       = DMEEditor.Logger;
     WorkFlowStep = step;
 }
        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.");
                }
            }
        }