Community
Showing results for 
Search instead for 
Do you mean 
Reply

Custom Control/Tab on Company view, needs to be also viewable on the contact details view

Avid Listener
Posts: 12
Country: United States

Custom Control/Tab on Company view, needs to be also viewable on the contact details view

Hey guys,

 

I am new to this ACT Development thing, I have replaced an employee who was a C# developer and has created numerous custom controls for our company in ACT 2010. I have some C# skills, but not an expert (taking classes now) to better hone my skills. For the most part i understand the code and what it is doing, but, I dont know how to display the custom tab and its data on the contact views for each contact linked to the specific company. It seems to me, it would be simple to add this control to the contact and have it display in both places. The only thing changing is adding it to another view.

 

I have attached the cs file for review if someone can point me in the right direction? I just dont understand the SDK fully.

 

Thanks in advance,

Chris

[Act.Shared.ComponentModel.CustomControl(true), Act.Shared.ComponentModel.LayoutToolboxItemFriendlyName()] class CompanyOverview : System.Windows.Forms.Panel, Act.Framework.ComponentModel.IMutableEntityListBoundControl { private Act.Framework.ComponentModel.MutableEntityListComponent CompanyDatasource; private System.Windows.Forms.CurrencyManager listManager; private System.Windows.Forms.ToolStrip _profileToolStrip; private System.Windows.Forms.ToolStripButton _tsbCreateProfile; private System.Windows.Forms.ToolStripButton _tsbPrintProfile; private System.Windows.Forms.ToolStripButton _tsbSaveOwnerInfo; private System.Windows.Forms.ToolStripButton _tsbSaveCompanyIssuesInfo; private System.Windows.Forms.TabControl _additionalInfoTab; private System.Windows.Forms.TabPage _ownerOverview; private System.Windows.Forms.TabPage _estimatorsOverview; private System.Windows.Forms.TabPage _accountingOverview; private System.Windows.Forms.TabPage _companyIssues; private System.Windows.Forms.TabPage _estimatingProcess; private System.Windows.Forms.TabPage _linksTab; private System.Windows.Forms.WebBrowser _rtbOwnerOverview; private System.Windows.Forms.WebBrowser _txtEstimatorsOverview; private System.Windows.Forms.WebBrowser _txtAccountingOverview; private System.Windows.Forms.WebBrowser _rtbCompanyIssues; private System.Windows.Forms.WebBrowser _rtbEstimatingProcess; private System.Windows.Forms.WebBrowser _linksContent; //UserControl1 a = null; private string _selectedCompanyID = null; aesITSiteLists.Lists _listWebService = null; private bool _isDirty = false; public CompanyOverview() { this.Dock = System.Windows.Forms.DockStyle.Fill; this._profileToolStrip = new System.Windows.Forms.ToolStrip(); this._profileToolStrip.Name = "tsCompanyProfile"; this._profileToolStrip.Dock = System.Windows.Forms.DockStyle.Top; //this.Controls.Add(this._profileToolStrip); this._tsbCreateProfile = new System.Windows.Forms.ToolStripButton(); this._tsbCreateProfile.Name = "tsbCreateProfile"; this._tsbCreateProfile.Text = "Create Profile"; this._profileToolStrip.Items.Add(this._tsbCreateProfile); this._tsbCreateProfile.Click += new EventHandler(_tsbCreateProfile_Click); this._tsbPrintProfile = new System.Windows.Forms.ToolStripButton(); this._tsbPrintProfile.Name = "tsbPrintProfile"; this._tsbPrintProfile.Text = "View Profile"; this._profileToolStrip.Items.Add(this._tsbPrintProfile); this._tsbPrintProfile.Click += new EventHandler(_tsbPrintProfile_Click); //this._tsbSaveOwnerInfo = new System.Windows.Forms.ToolStripButton(); //this._tsbSaveOwnerInfo.Name = "tsbSaveOwnerInfo"; //this._tsbSaveOwnerInfo.Text = "Save Owner Info"; //this._profileToolStrip.Items.Add(this._tsbSaveOwnerInfo); //this._tsbSaveOwnerInfo.Click += new EventHandler(_tsbSaveOwnerInfo_Click); //this._tsbSaveCompanyIssuesInfo = new System.Windows.Forms.ToolStripButton(); //this._tsbSaveCompanyIssuesInfo.Name = "tsbSaveCompanyIssuesInfo"; //this._tsbSaveCompanyIssuesInfo.Text = "Save Company Issues"; //this._profileToolStrip.Items.Add(this._tsbSaveCompanyIssuesInfo); //this._tsbSaveCompanyIssuesInfo.Click += new EventHandler(_tsbSaveCompanyIssuesInfo_Click); this._additionalInfoTab = new System.Windows.Forms.TabControl(); this._additionalInfoTab.Name = "tcAdditionalInfo"; this._additionalInfoTab.Dock = System.Windows.Forms.DockStyle.Fill; this._additionalInfoTab.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; this._additionalInfoTab.SelectedIndexChanged += new EventHandler(_additionalInfoTab_SelectedIndexChanged); this._additionalInfoTab.DrawItem += new System.Windows.Forms.DrawItemEventHandler(_additionalInfoTab_DrawItem); //this.Controls.Add(this._additionalInfoTab); this._ownerOverview = new System.Windows.Forms.TabPage(); this._ownerOverview.Name = "tpOwnerOverview"; this._ownerOverview.Text = "Owner"; this._ownerOverview.Tag = "owner"; //this._ownerOverview.Click += new EventHandler(_ownerOverview_Click); this._estimatorsOverview = new System.Windows.Forms.TabPage(); this._estimatorsOverview.Name = "tpEstimatorsOverview"; this._estimatorsOverview.Text = "Estimators"; this._estimatorsOverview.Tag = "estimator"; //this._estimatorsOverview.Click += new EventHandler(_estimatorsOverview_Click); this._accountingOverview = new System.Windows.Forms.TabPage(); this._accountingOverview.Name = "tpAccountingOverview"; this._accountingOverview.Text = "Accounting"; this._accountingOverview.Tag = "accounting"; //this._accountingOverview.Click += new EventHandler(_accountingOverview_Click); this._companyIssues = new System.Windows.Forms.TabPage(); this._companyIssues.Name = "tpCompanyIssues"; this._companyIssues.Text = "Company Issues"; this._companyIssues.Tag = "companyissues"; //create the estimating process tab this._estimatingProcess = new System.Windows.Forms.TabPage(); this._estimatingProcess.Name = "tpEstimatingProcess"; this._estimatingProcess.Text = "Estimating Process"; this._estimatingProcess.Tag = "estimatingprocess"; this._linksTab = new System.Windows.Forms.TabPage(); this._linksTab.Name = "tpLinks"; this._linksTab.Text = "Links"; this._linksTab.Tag = "links"; this._additionalInfoTab.TabPages.Add(this._companyIssues); this._additionalInfoTab.TabPages.Add(this._ownerOverview); this._additionalInfoTab.TabPages.Add(this._linksTab); this._additionalInfoTab.TabPages.Add(this._estimatingProcess); this._additionalInfoTab.TabPages.Add(this._estimatorsOverview); this._additionalInfoTab.TabPages.Add(this._accountingOverview); this._linksTab.Hide(); this._estimatorsOverview.Hide(); this._rtbCompanyIssues = new System.Windows.Forms.WebBrowser(); this._rtbCompanyIssues.Name = "rtbCompanyIssues"; this._rtbCompanyIssues.Dock = System.Windows.Forms.DockStyle.Fill; this._rtbOwnerOverview = new System.Windows.Forms.WebBrowser(); this._rtbOwnerOverview.Name = "rtbOwnerInformation"; this._rtbOwnerOverview.Dock = System.Windows.Forms.DockStyle.Fill; this._txtEstimatorsOverview = new System.Windows.Forms.WebBrowser(); this._txtEstimatorsOverview.Dock = System.Windows.Forms.DockStyle.Fill; this._txtEstimatorsOverview.Name = "txtEstimatorsInformation"; this._txtAccountingOverview = new System.Windows.Forms.WebBrowser(); this._txtAccountingOverview.Name = "txtAccountingInformation"; this._txtAccountingOverview.Dock = System.Windows.Forms.DockStyle.Fill; this._rtbEstimatingProcess = new System.Windows.Forms.WebBrowser(); this._rtbEstimatingProcess.Name = "rtbEstimatingProcess"; this._rtbEstimatingProcess.Dock = System.Windows.Forms.DockStyle.Fill; this._linksContent = new System.Windows.Forms.WebBrowser(); this._linksContent.Name = "wbLinksContent"; this._linksContent.Dock = System.Windows.Forms.DockStyle.Fill; this._companyIssues.Controls.Add(this._rtbCompanyIssues); this._ownerOverview.Controls.Add(this._rtbOwnerOverview); //this._estimatorsOverview.Controls.Add(this._txtEstimatorsOverview); //this._estimatorsOverview.Controls.Add(this.contactWPFHost); this._accountingOverview.Controls.Add(this._txtAccountingOverview); this._estimatingProcess.Controls.Add(this._rtbEstimatingProcess); this._linksTab.Controls.Add(this._linksContent); this.Controls.Add(this._additionalInfoTab); this.Controls.Add(this._profileToolStrip);


Chris