public AssemblyComponentList(Assembly assembly) { InitializeComponent(); Assembly = assembly; SetVisibility(); //BaseApiResponse<IEnumerable<Assembly>> assemblies = null; //Task.Run(async () => //{ // assemblies = await APIContext.Assemblies.Get(); //}).Wait(); //foreach (var assembly in assemblies.Data) //{ // var assemblyView = new AssemblyView(assembly); // assemblyView.Deleted += AssemblyView_Deleted; // AssemblyListControl.Children.Add(assemblyView); //} CPUButton.Clicked += CPUButton_Clicked; RAMButton.Clicked += RAMButton_Clicked; GPUButton.Clicked += GPUButton_Clicked; PowerUnitButton.Clicked += PowerUnitButton_Clicked; MotherboardButton.Clicked += MotherboardButton_Clicked; HDDButton.Clicked += HDDButton_Clicked; SSDButton.Clicked += SSDButton_Clicked; foreach (var assemblyComponent in assembly.AssemblyComponents) { var componentView = new ComponentView(assembly, assemblyComponent.BaseComponent, assemblyComponent.Quantity); ComponentList.Children.Add(componentView); } }
private void SetDestinations(ComponentView component, List <StoreView> storeViews) { var lastTransfer = component.TransferRecords .OrderBy(i => i.TransferDate) .LastOrDefault(); if (lastTransfer == null) { var msg = $"Component {component.Id} has no transfer records"; //_logger.LogError(msg); throw new Exception(msg); } if (lastTransfer.DestinationType == SmartCoreType.Store) { var store = storeViews.FirstOrDefault(i => i.Id == lastTransfer.DestinationObjectID); if (store == null) { var msg = $"Destination object ID:{lastTransfer.DestinationObjectID} was not found"; // _logger.LogError(msg); throw new Exception(msg); } component.ParentStore = store; } }
private void FormComponenModify_Load(object sender, EventArgs e) { if (this.mode == FormMode.ALTER && this.componenID == -1) { throw new Exception("未设置源零件信息"); } Utilities.CreateEditPanel(this.tableLayoutPanelTextBoxes, ComponenViewMetaData.componenmodifykeyNames); if (this.mode == FormMode.ALTER) { try { ComponentView componenView = (from s in this.wmsEntities.ComponentView where s.ID == this.componenID select s).FirstOrDefault(); Utilities.CopyPropertiesToTextBoxes(componenView, this); } catch (Exception) { MessageBox.Show("修改失败,请检查网络连接", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); this.Close(); return; } } }
private static void AddComponents(IEnumerable <Component> components, ComponentView componentView) { foreach (var component in components) { componentView.Add(component); } }
/// <summary> /// Handles the Click event of the Link button. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void btnLink_Click(object sender, EventArgs e) { if (_mergeContactsStateInfo.SelectedRowTargetIndex != null && _mergeContactsStateInfo.SelectedRowSourceIndex != null) { IntegrationManager.MatchingInfoAddMatchedChildPair(_mergeContactsStateInfo.SelectedSourceId, _mergeContactsStateInfo.SelectedTargetId); IList <ComponentView> matchedContacts = IntegrationManager.MatchedContacts; string[] propertyNames = new[] { "sourceId", "targetId", "firstName", "lastName" }; object[] propertyValues = new[] { _mergeContactsStateInfo.SelectedSourceId, _mergeContactsStateInfo.SelectedTargetId, _mergeContactsStateInfo.FirstName, _mergeContactsStateInfo.LastName }; ComponentView view = new ComponentView(propertyNames, propertyValues); matchedContacts.Add(view); IntegrationManager.SourceContacts.RemoveAt((int)_mergeContactsStateInfo.SelectedRowSourceIndex); IntegrationManager.TargetContacts.RemoveAt((int)_mergeContactsStateInfo.SelectedRowTargetIndex); } else { throw new ApplicationException(GetLocalResourceObject("Error_SourceTargetNotSelected").ToString()); } }
public void test_writeComponentsView() { PopulateWorkspace(); ComponentView componentView = _workspace.Views.ComponentViews.First(); _plantUMLWriter.Write(componentView, _stringWriter); Assert.Equal("@startuml" + Environment.NewLine + "title Software System - Web Application - Components" + Environment.NewLine + "component \"Database\" <<Container>> as 8" + Environment.NewLine + "component \"E-mail System\" <<Software System>> as 4" + Environment.NewLine + "actor \"User\" <<Person>> as 1" + Environment.NewLine + "package WebApplication {" + Environment.NewLine + " component \"EmailComponent\" <<Component>> as 13" + Environment.NewLine + " component \"SomeController\" <<Spring MVC Controller>> as 12" + Environment.NewLine + " component \"SomeRepository\" <<Spring Data>> as 14" + Environment.NewLine + "}" + Environment.NewLine + "4 ..> 1 : Delivers e-mails to" + Environment.NewLine + "13 ..> 4 : Sends e-mails using <<SMTP>>" + Environment.NewLine + "12 ..> 13 : Sends e-mail using" + Environment.NewLine + "12 ..> 14 : Uses" + Environment.NewLine + "14 ..> 8 : Reads from and writes to <<JDBC>>" + Environment.NewLine + "1 ..> 12 : Uses <<HTTP>>" + Environment.NewLine + "@enduml" + Environment.NewLine + Environment.NewLine, _stringWriter.ToString()); }
public override void stop(StopContext context) { ManagedReference reference = null; try { // get the process application component ProcessApplicationInterface processApplication = null; ComponentView componentView = paComponentViewInjector.OptionalValue; if (componentView != null) { reference = componentView.createInstance(); processApplication = (ProcessApplicationInterface)reference.Instance; } else { processApplication = noViewProcessApplication.Value; } invokePreUndeploy(processApplication); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Exception while stopping process application", e); } finally { if (reference != null) { reference.release(); } } }
public void test_writeComponentsView() { PopulateWorkspace(); ComponentView componentView = _workspace.Views.ComponentViews.First(); _plantUMLWriter.Write(componentView, _stringWriter); Assert.Equal( @"@startuml title Software System - Web Application - Components component ""Database"" <<Container>> as 8 component ""E-mail System"" <<Software System>> as 4 actor ""User"" <<Person>> as 1 package WebApplication { component ""EmailComponent"" <<Component>> as 13 component ""SomeController"" <<Spring MVC Controller>> as 12 component ""SomeRepository"" <<Spring Data>> as 14 } 4 ..> 1 : Delivers e-mails to 13 ..> 4 : Sends e-mails using <<SMTP>> 12 ..> 13 : Sends e-mail using 12 ..> 14 : Uses 14 ..> 8 : Reads from and writes to <<JDBC>> 1 ..> 12 : Uses <<HTTP>> @enduml ".UnifyNewLine(), _stringWriter.ToString()); }
public AssemblyComponentList(Assembly assembly, int total) { Assembly = assembly; InitializeComponent(); SetVisibility(); NameLabel.Text = assembly.Name; CurrentLabel.Text = total.ToString(); TotalLabel.Text = assembly.ToPrice.ToString(); ProgressLabel.Text = GetReadyPercentage().ToString(); ProgressBar.Value = GetReadyPercentage(); BackButton.Click += BackButton_Click; RefreshButton.Click += RefreshButton_Click; CPUButton.Click += CPUButton_Clicked; RAMButton.Click += RAMButton_Clicked; GPUButton.Click += GPUButton_Clicked; PowerUnitButton.Click += PowerUnitButton_Clicked; MotherboardButton.Click += MotherboardButton_Clicked; HDDButton.Click += HDDButton_Clicked; SSDButton.Click += SSDButton_Clicked; foreach (var assemblyComponent in assembly.AssemblyComponents) { var componentView = new ComponentView(assembly, assemblyComponent.BaseComponent, assemblyComponent.Quantity); componentView.Deleted += (o, a) => { RefreshClicked?.Invoke(this, a); }; AssemblyComponentPanel.Controls.Add(componentView); } }
public override void OnInspectorGUI() { ComponentView componentView = (ComponentView)target; object component = componentView.Component; ComponentViewHelper.Draw(component); }
public void Test_WriteComponentsView() { PopulateWorkspace(); ComponentView componentView = _workspace.Views.ComponentViews.First(); _plantUMLWriter.Write(componentView, _stringWriter); Assert.AreEqual("@startuml" + Environment.NewLine + "title Software System - Web Application - Components" + Environment.NewLine + "[Database] <<Container>> as Database" + Environment.NewLine + "[E-mail System] <<Software System>> as EmailSystem" + Environment.NewLine + "actor User" + Environment.NewLine + "package WebApplication {" + Environment.NewLine + " [EmailComponent] <<Component>> as EmailComponent" + Environment.NewLine + " [SomeController] <<Spring MVC Controller>> as SomeController" + Environment.NewLine + " [SomeRepository] <<Spring Data>> as SomeRepository" + Environment.NewLine + "}" + Environment.NewLine + "EmailSystem ..> User : Delivers e-mails to" + Environment.NewLine + "EmailComponent ..> EmailSystem : Sends e-mails using <<SMTP>>" + Environment.NewLine + "SomeController ..> EmailComponent : Sends e-mail using" + Environment.NewLine + "SomeController ..> SomeRepository : Uses" + Environment.NewLine + "SomeRepository ..> Database : Reads from and writes to <<JDBC>>" + Environment.NewLine + "User ..> SomeController : Uses <<HTTP>>" + Environment.NewLine + "@enduml" + Environment.NewLine + "" + Environment.NewLine, _stringWriter.ToString()); }
public void Test_AddDefaultElements() { Model.ImpliedRelationshipsStrategy = new CreateImpliedRelationshipsUnlessAnyRelationshipExistsStrategy(); Person user1 = Model.AddPerson("User 1"); Person user2 = Model.AddPerson("User 2"); SoftwareSystem softwareSystem1 = Model.AddSoftwareSystem("Software System 1"); Container container1 = softwareSystem1.AddContainer("Container 1", "", ""); Component component1 = container1.AddComponent("Component 1", "", ""); SoftwareSystem softwareSystem2 = Model.AddSoftwareSystem("Software System 2"); Container container2 = softwareSystem2.AddContainer("Container 2", "", ""); Component component2 = container2.AddComponent("Component 2", "", ""); user1.Uses(component1, "Uses"); user2.Uses(component2, "Uses"); component1.Uses(component2, "Uses"); view = new ComponentView(container1, "components", "Description"); view.AddDefaultElements(); Assert.Equal(3, view.Elements.Count); Assert.True(view.Elements.Contains(new ElementView(user1))); Assert.False(view.Elements.Contains(new ElementView(user2))); Assert.False(view.Elements.Contains(new ElementView(softwareSystem1))); Assert.True(view.Elements.Contains(new ElementView(softwareSystem2))); Assert.False(view.Elements.Contains(new ElementView(container1))); Assert.False(view.Elements.Contains(new ElementView(container2))); Assert.True(view.Elements.Contains(new ElementView(component1))); Assert.False(view.Elements.Contains(new ElementView(component2))); }
private void Start() { GameEntity entity = ComponentView.LinkGame(gameObject); int index = GameComponentsLookup.DrivableBody; entity.ReplaceComponent(index, m_Component); }
private void Write(ComponentView view, TextWriter writer) { try { writer.WriteLine("@startuml"); writer.WriteLine("title " + view.Name); view.Elements .Select(ev => ev.Element) .Where(e => !(e is Component)) .OrderBy(e => e.Name).ToList() .ForEach(e => Write(e, writer, false)); writer.WriteLine("package " + NameOf(view.Container) + " {"); view.Elements .Select(ev => ev.Element) .Where(e => e is Component) .OrderBy(e => e.Name).ToList() .ForEach(e => Write(e, writer, true)); writer.WriteLine("}"); Write(view.Relationships, writer); writer.WriteLine("@enduml"); writer.WriteLine(""); } catch (IOException e) { Console.WriteLine(e.StackTrace); } }
private void FilterCollection() { if (ComponentView != null) { ComponentView.Refresh(); } }
public void Test_AddNearestNeighbours_AddsNearestNeighbours_WhenThereAreSomeNearestNeighbours() { SoftwareSystem softwareSystemA = Model.AddSoftwareSystem("System A", "Description"); SoftwareSystem softwareSystemB = Model.AddSoftwareSystem("System B", "Description"); Person userA = Model.AddPerson("User A", "Description"); Person userB = Model.AddPerson("User B", "Description"); // userA -> systemA -> system -> systemB -> userB userA.Uses(softwareSystemA, ""); softwareSystemA.Uses(softwareSystem, ""); softwareSystem.Uses(softwareSystemB, ""); softwareSystemB.Delivers(userB, ""); // userA -> systemA -> web application -> systemB -> userB // web application -> database Container database = softwareSystem.AddContainer("Database", "", ""); softwareSystemA.Uses(webApplication, ""); webApplication.Uses(softwareSystemB, ""); webApplication.Uses(database, ""); // userA -> systemA -> controller -> service -> repository -> database Component controller = webApplication.AddComponent("Controller", ""); Component service = webApplication.AddComponent("Service", ""); Component repository = webApplication.AddComponent("Repository", ""); softwareSystemA.Uses(controller, ""); controller.Uses(service, ""); service.Uses(repository, ""); repository.Uses(database, ""); // userA -> systemA -> controller -> service -> systemB -> userB service.Uses(softwareSystemB, ""); view = new ComponentView(webApplication, "components", "Description"); view.AddNearestNeighbours(softwareSystemA); Assert.Equal(3, view.Elements.Count); Assert.True(view.Elements.Contains(new ElementView(userA))); Assert.True(view.Elements.Contains(new ElementView(softwareSystemA))); Assert.True(view.Elements.Contains(new ElementView(controller))); view = new ComponentView(webApplication, "components", "Description"); view.AddNearestNeighbours(controller); Assert.Equal(3, view.Elements.Count); Assert.True(view.Elements.Contains(new ElementView(softwareSystemA))); Assert.True(view.Elements.Contains(new ElementView(controller))); Assert.True(view.Elements.Contains(new ElementView(service))); view = new ComponentView(webApplication, "components", "Description"); view.AddNearestNeighbours(service); Assert.Equal(4, view.Elements.Count); Assert.True(view.Elements.Contains(new ElementView(controller))); Assert.True(view.Elements.Contains(new ElementView(service))); Assert.True(view.Elements.Contains(new ElementView(repository))); Assert.True(view.Elements.Contains(new ElementView(softwareSystemB))); }
public Photo(Core RennderCore, ComponentView c) : base(RennderCore, c) { scaffold.Setup(new string[] { "helpicon-hover", "helpicon-link", "helpicon-alt", "helpicon-window" }); scaffold.Data["helpicon-hover"] = ""; scaffold.Data["helpicon-link"] = ""; scaffold.Data["helpicon-alt"] = ""; scaffold.Data["helpicon-window"] = ""; }
private static string getComponentGroupString(ComponentView component) { var last = component.TransferRecords.GetLast(); var bc = GlobalObject.BaseComponent.FirstOrDefault(i => i.Id == last.DestinationObjectID); var currentDestination = GetDestinationStringFromAircraft(bc.ParentAircraftId, false, null); return(bc != null ? $"{currentDestination} | {bc} | Components" : "Components"); }
private void PopulateWorkspace() { Model model = _workspace.Model; model.Enterprise = new Enterprise("Some Enterprise"); Person user = model.AddPerson(Location.Internal, "User", ""); SoftwareSystem softwareSystem = model.AddSoftwareSystem(Location.Internal, "Software System", ""); user.Uses(softwareSystem, "Uses"); SoftwareSystem emailSystem = model.AddSoftwareSystem(Location.External, "E-mail System", ""); softwareSystem.Uses(emailSystem, "Sends e-mail using"); emailSystem.Delivers(user, "Delivers e-mails to"); Container webApplication = softwareSystem.AddContainer("Web Application", "", ""); Container database = softwareSystem.AddContainer("Database", "", ""); user.Uses(webApplication, "Uses", "HTTP"); webApplication.Uses(database, "Reads from and writes to", "JDBC"); webApplication.Uses(emailSystem, "Sends e-mail using"); Component controller = webApplication.AddComponent("SomeController", "", "Spring MVC Controller"); Component emailComponent = webApplication.AddComponent("EmailComponent", ""); Component repository = webApplication.AddComponent("SomeRepository", "", "Spring Data"); user.Uses(controller, "Uses", "HTTP"); controller.Uses(repository, "Uses"); controller.Uses(emailComponent, "Sends e-mail using"); repository.Uses(database, "Reads from and writes to", "JDBC"); emailComponent.Uses(emailSystem, "Sends e-mails using", "SMTP"); EnterpriseContextView enterpriseContextView = _workspace.Views.CreateEnterpriseContextView("enterpriseContext", ""); enterpriseContextView.AddAllElements(); SystemContextView systemContextView = _workspace.Views.CreateSystemContextView(softwareSystem, "systemContext", ""); systemContextView.AddAllElements(); ContainerView containerView = _workspace.Views.CreateContainerView(softwareSystem, "containers", ""); containerView.AddAllElements(); ComponentView componentView = _workspace.Views.CreateComponentView(webApplication, "components", ""); componentView.AddAllElements(); DynamicView dynamicView = _workspace.Views.CreateDynamicView(webApplication, "dynamic", ""); dynamicView.Add(user, "Requests /something", controller); dynamicView.Add(controller, repository); dynamicView.Add(repository, "select * from something", database); }
public override void OnInspectorGUI() { ComponentView componentView = (ComponentView)target; object component = componentView.Component; if (component.GetType() == typeof(ILTypeInstance)) { return; } ComponentViewHelper.Draw(component); }
/// <summary> /// 得到命中的其它cube的脚本实体 /// </summary> private OtherCube GetHitOtherCubeEntity(GameObject hitObj) { ComponentView componentView = hitObj.GetComponent <ComponentView>(); if (componentView != null) { return(componentView.Component as OtherCube); } else { return(GetHitOtherCubeEntity(hitObj.transform.parent.gameObject)); } }
public SearchComponentList(Assembly assembly, IEnumerable <BaseComponent> baseComponents) { InitializeComponent(); if (baseComponents?.Count() > 0) { foreach (var component in baseComponents) { var componentView = new ComponentView(assembly, component); ComponentList.Children.Add(componentView); } } }
private Component ToComponent(ComponentView view) { return(new Component { ComponentId = view.ComponentId, Email = view.Email, FirstName = view.FirstName, Foto = view.Foto, Foto500 = view.Foto500, LastName = view.LastName, Telephone = view.Telephone, }); }
private void Start() { TimerView timerView = GetComponent <TimerView>(); if (timerView.model == null) { timerView.model = new Timer(); } m_Component.timer = timerView.model; GameEntity entity = ComponentView.LinkGame(gameObject); int index = GameComponentsLookup.AirSupply; entity.AddComponent(index, m_Component); }
protected override void Write(ComponentView view, TextWriter writer) { var nonComponents = view.Elements .Select(ev => ev.Element) .Where(e => !(e is Component)); var nonContainedComponents = from ev in view.Elements let e = ev.Element where e is Component && e.Parent?.Id != view.Container.Id group e by e.Parent; var showBoundary = nonComponents.Any() || nonContainedComponents.Any(); WriteProlog(view, writer); nonComponents .OrderBy(e => e.Name).ToList() .ForEach(e => Write(e, writer, 0)); if (showBoundary) { Write(view.Container, writer, 0, true); } view.Elements .Select(ev => ev.Element) .Where(e => e is Component && e.Parent?.Id == view.Container.Id) .OrderBy(e => e.Name).ToList() .ForEach(e => Write(e, writer, showBoundary ? 1 : 0)); if (showBoundary) { writer.WriteLine("}"); } foreach (var container in nonContainedComponents) { Write(container.Key, writer, 0, true); container .OrderBy(e => e.Name).ToList() .ForEach(e => Write(e, writer, 1)); writer.WriteLine("}"); } Write(view.Relationships, writer); WriteEpilog(view, writer); }
public void SetUpCompositeInformationProperly() { var cvm = new ComponentViewModel(); var cm = new ComponentModel(); var mvm = new MainViewModel { ComponentViewModel = cvm, ComponentModel = cm }; var cv = new ComponentView(); // ReSharper disable once UnusedVariable => variable needed to correctly create the connector that will set up the MVVM components. var conn = new TConnector(cv, mvm, ComponentViewModel, ComponentModel); Assert.AreSame(cm, cvm.Model); Assert.AreSame(cvm, cv.GetViewModel()); }
/// <summary> /// Loads the budget. /// </summary> /// <param name="stage">The stage.</param> private void LoadBudget(ICampaignStage stage) { try { ComponentView budget = Rules.CalculateBudget(stage); slxCurActualCost.Text = budget.GetProperties()["ActualCosts"].GetValue(budget).ToString(); slxCurEstimatedCost.Text = budget.GetProperties()["EstCosts"].GetValue(budget).ToString(); txtActualHours.Text = string.Format("{0:n}", budget.GetProperties()["ActualHours"].GetValue(budget)); txtEstimatedHours.Text = string.Format("{0:n}", budget.GetProperties()["EstHours"].GetValue(budget)); } catch { //Error Calculatig Budget. } }
public void Test_AddContainer_ThrowsAnException_WhenTheContainerIsTheScopeOfTheView() { SoftwareSystem softwareSystem = Model.AddSoftwareSystem("Software System"); Container container = softwareSystem.AddContainer("Container"); view = new ComponentView(container, "components", "Description"); try { view.Add(container); throw new TestFailedException(); } catch (ElementNotPermittedInViewException e) { Assert.Equal("The container in scope cannot be added to a component view.", e.Message); } }
private void DoAddResponse(List <String> targetIds, ICampaign campaign) { string stage = ddlStage.Text; string comment = txtComment.Text; string responseMethod = ddlResponseMethods.Text; string leadSource = luLeadSource.Text; string responseInterest = ddlResponseInterests.Text; string responseInterestLevel = ddlResponseInterestLevels.Text; DateTime?responseDate = dtpResponseDate.DateTimeValue; String[] propNames = { "Stage", "Comment", "ResponseMethod", "LeadSource", "ResponseDate", "Interest", "InterestLevel" }; object[] propValues = { stage, comment, responseMethod, leadSource, responseDate, responseInterest, responseInterestLevel }; ComponentView responseData = new ComponentView(propNames, propValues); Helpers.AddTargetResponses(targetIds, campaign, responseData); }
public void Test_Add_DoesNothing_WhenTheSpecifiedComponentIsInADifferentContainer() { SoftwareSystem softwareSystemA = Model.AddSoftwareSystem("System A", "Description"); Container containerA1 = softwareSystemA.AddContainer("Container A1", "Description", "Tec"); Component componentA1_1 = containerA1.AddComponent("Component A1-1", "Description"); Container containerA2 = softwareSystemA.AddContainer("Container A2", "Description", "Tec"); Component componentA2_1 = containerA2.AddComponent("Component A2-1", "Description"); view = new ComponentView(containerA1, "components", "Description"); view.Add(componentA1_1); view.Add(componentA2_1); Assert.Equal(1, view.Elements.Count); Assert.True(view.Elements.Contains(new ElementView(componentA1_1))); }
private void DoAddResponse(List<String> targetIds, ICampaign campaign) { string stage = ddlStage.Text; string comment = txtComment.Text; string responseMethod = ddlResponseMethods.Text; string leadSource = luLeadSource.Text; string responseInterest = ddlResponseInterests.Text; string responseInterestLevel = ddlResponseInterestLevels.Text; DateTime? responseDate = dtpResponseDate.DateTimeValue; String[] propNames = { "Stage", "Comment", "ResponseMethod", "LeadSource", "ResponseDate", "Interest", "InterestLevel" }; object[] propValues = { stage, comment, responseMethod, leadSource, responseDate, responseInterest, responseInterestLevel }; ComponentView responseData = new ComponentView(propNames, propValues); Helpers.AddTargetResponses(targetIds, campaign, responseData); }
/// <summary> /// Does the add response. /// </summary> /// <param name="targetIds">The target ids.</param> /// <param name="campaign">The campaign.</param> private void DoAddResponse(object[] targetIds, ICampaign campaign) { string stage = Request.Form[ddlStage.ClientID.Replace("_", "$")]; string comment = txtComment.Text; string responseMethod = Request.Form[ddlResponseMethods.ClientID.Replace("_", "$")]; string Id = luLeadSource.ClientID + "_LookupText"; string leadSource = Request.Form[Id.Replace("_", "$")]; string responseInterest = Request.Form[ddlResponseInterests.ClientID.Replace("_", "$")]; string responseInterestLevel = Request.Form[ddlResponseInterestLevels.ClientID.Replace("_", "$")]; DateTime? responseDate = dtpResponseDate.DateTimeValue; String[] propNames = { "Stage", "Comment", "ResponseMethod", "LeadSource", "ResponseDate", "Interest", "InterestLevel" }; object[] propValues = { stage, comment, responseMethod, leadSource, responseDate, responseInterest, responseInterestLevel }; ComponentView responseData = new ComponentView(propNames, propValues); Sage.SalesLogix.CampaignTarget.Helpers.AddTargetResponses(targetIds, campaign, responseData); }
/// <summary> /// Handles the Click event of the Link button. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void btnLink_Click(object sender, EventArgs e) { if (_mergeContactsStateInfo.SelectedRowTargetIndex != null && _mergeContactsStateInfo.SelectedRowSourceIndex != null) { IntegrationManager.MatchingInfoAddMatchedChildPair(_mergeContactsStateInfo.SelectedSourceId, _mergeContactsStateInfo.SelectedTargetId); IList<ComponentView> matchedContacts = IntegrationManager.MatchedContacts; string[] propertyNames = new[] { "sourceId", "targetId", "firstName", "lastName" }; object[] propertyValues = new[] { _mergeContactsStateInfo.SelectedSourceId, _mergeContactsStateInfo.SelectedTargetId, _mergeContactsStateInfo.FirstName, _mergeContactsStateInfo.LastName }; ComponentView view = new ComponentView(propertyNames, propertyValues); matchedContacts.Add(view); IntegrationManager.SourceContacts.RemoveAt((int)_mergeContactsStateInfo.SelectedRowSourceIndex); IntegrationManager.TargetContacts.RemoveAt((int)_mergeContactsStateInfo.SelectedRowTargetIndex); } else { throw new Sage.Platform.Application.ValidationException(GetLocalResourceObject("Error_SourceTargetNotSelected").ToString()); } }