Пример #1
0
        private void btnSelectServiceMethod_Click(object sender, EventArgs e)
        {
            using (FindServiceMethodForm findServiceMethod = new FindServiceMethodForm())
            {
                findServiceMethod.Owner = this;
                findServiceMethod.FrontendApplication = FrontendApplication;
                findServiceMethod.BackendApplication  = BackendApplication;

                if (findServiceMethod.ShowDialog() == DialogResult.OK)
                {
                    // Create the Datasource with maps
                    DataSource = dialogService.CreateDataSourceMaps(DataSource, View, findServiceMethod.ServiceMethod.Id);

                    // Set the text for the ServiceMethod
                    SetServiceMethodText();

                    // Set a defaultname if name isn't set yet
                    if (string.IsNullOrEmpty(tbName.Text))
                    {
                        tbName.Text = DataSource.ServiceMethod.Name;
                    }

                    // Enable buttons
                    EnableDisableButtons();
                }
            }
        }
Пример #2
0
        private void addServiceMethodBtn_Click(object sender, EventArgs e)
        {
            FindServiceMethodForm form = new FindServiceMethodForm();

            form.FrontendApplication = FrontendApplication;
            form.BackendApplication  = BackendApplication;

            if (form.ShowDialog() == DialogResult.OK)
            {
                ServiceMethod serviceMethod = MetaManagerServices.GetApplicationService().GetServiceMethodMapsById(form.ServiceMethod.Id);

                foreach (WorkflowServiceMethod wfServiceMethod in Workflow.ServiceMethods)
                {
                    if (wfServiceMethod.ServiceMethod.Id == serviceMethod.Id)
                    {
                        MessageBox.Show("The selected Service Method is already present in the Workflow.", "MetaManager");
                        return;
                    }
                }

                WorkflowServiceMethod workflowServiceMethod = new WorkflowServiceMethod();
                workflowServiceMethod.ServiceMethod = serviceMethod;
                workflowServiceMethod.Workflow      = Workflow;
                Workflow.ServiceMethods.Add(workflowServiceMethod);

                Type activityType = WorkflowTypeFactory.CreateActivities(Workflow, this.BackendApplication, new Dialog[0], new ServiceMethod[] { serviceMethod }, new DataAccess.Domain.Workflow[0]).Last();

                TypeProvider typeProvider = workflowControl.GetService(typeof(ITypeProvider)) as TypeProvider;
                typeProvider.AddAssembly(activityType.Assembly);
                workflowControl.ToolBox.AddToolBoxItem(new SelfHostToolboxItem(activityType));
            }
        }
Пример #3
0
        private void leftServiceMethodFindBtn_Click(object sender, EventArgs e)
        {
            using (FindServiceMethodForm form = new FindServiceMethodForm())
            {
                form.BackendApplication = BackendApplication;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    ListBox.LeftFindServiceMethod = form.ServiceMethod;
                    PopulateComboBoxes(ListBox.LeftFindServiceMethod, leftFindServiceMethodTbx, leftDisplayProperty1Cbx, leftDisplayProperty2Cbx);

                    if (ListBox.LeftFindServiceMethodMap != null)
                    {
                        ListBox.LeftFindServiceMethodMap = modelService.GetInitializedDomainObject <PropertyMap>(ListBox.LeftFindServiceMethodMap.Id);
                        ListBox.LeftFindServiceMethodMap.MappedProperties.Clear();
                    }

                    if (ListBox.AddServiceMethodMap != null)
                    {
                        ListBox.AddServiceMethodMap = modelService.GetInitializedDomainObject <PropertyMap>(ListBox.AddServiceMethod.Id);
                        ListBox.AddServiceMethodMap.MappedProperties.Clear();
                    }
                }
            }
        }
        private void fintBtn_Click(object sender, EventArgs e)
        {
            using (FindServiceMethodForm form = new FindServiceMethodForm())
            {
                form.BackendApplication = BackendApplication;
                form.AutoSearchName     = UXServiceComponent.ServiceMethod == null ? string.Empty : UXServiceComponent.ServiceMethod.Name;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    UXServiceComponent.ServiceMethod = form.ServiceMethod;
                    PopulateComboxBoxes();
                }
            }

            EnableDisableButtons();
        }
Пример #5
0
        private void deleteServiceMethodFindBtn_Click(object sender, EventArgs e)
        {
            using (FindServiceMethodForm form = new FindServiceMethodForm())
            {
                form.BackendApplication = BackendApplication;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    ListBox.RemoveServiceMethod = form.ServiceMethod;
                    UpdateSelectedValues();
                }
            }

            if (ListBox.RemoveServiceMethodMap != null)
            {
                ListBox.RemoveServiceMethodMap = modelService.GetInitializedDomainObject <PropertyMap>(ListBox.RemoveServiceMethodMap.Id);
                ListBox.RemoveServiceMethodMap.MappedProperties.Clear();
            }
        }
Пример #6
0
        private void btnSelectServiceMethod_Click(object sender, EventArgs e)
        {
            using (FindServiceMethodForm findServiceMethod = new FindServiceMethodForm())
            {
                findServiceMethod.Owner = this;
                findServiceMethod.FrontendApplication = FrontendApplication;
                findServiceMethod.BackendApplication  = BackendApplication;

                if (findServiceMethod.ShowDialog() == DialogResult.OK)
                {
                    NewView.ServiceMethod = findServiceMethod.ServiceMethod;

                    // Set the text for the ServiceMethod
                    tbServiceMethod.Text = string.Format("({0}) {1}", NewView.ServiceMethod.Id, NewView.ServiceMethod.Name);

                    // Enable buttons
                    EnableDisableButtons();
                }
            }
        }