private void RunOnceOnActivationManual() { TRemote.MFinance.Setup.WebConnectors.LoadCostCentrePartnerLinks(FLedgerNumber, 0, out FPartnerCostCentreTbl); FLocalCostCentres = TRemote.MFinance.Setup.WebConnectors.LoadLocalCostCentres(FLedgerNumber); //Setup Cost Centre combo TFinanceControls.InitialiseLocalCostCentreList(ref cmbCostCentre, FLedgerNumber, false, FLocalCostCentres); cmbCostCentre.Width = 300; cmbCostCentre.AttachedLabel.Width = 150; //Setup Reports To combo TFinanceControls.InitialiseLocalCostCentreList(ref cmbReportsTo, FLedgerNumber, true, FLocalCostCentres); cmbReportsTo.Width = 300; cmbReportsTo.AttachedLabel.Width = 150; lblInvisible.Visible = false; FLinkedView = new DataView(FPartnerCostCentreTbl); FLinkedView.RowFilter = "IsLinked <> '0'"; FLinkedView.AllowNew = false; FUnlinkedView = new DataView(FPartnerCostCentreTbl); FUnlinkedView.RowFilter = "IsLinked = '0'"; FUnlinkedView.AllowNew = false; grdLinkedCCs.DataSource = new DevAge.ComponentModel.BoundDataView(FLinkedView); grdUnlinkedCCs.DataSource = new DevAge.ComponentModel.BoundDataView(FUnlinkedView); grdLinkedCCs.Columns.Clear(); grdLinkedCCs.AddTextColumn("Partner Name", FPartnerCostCentreTbl.Columns["ShortName"], 240); grdLinkedCCs.AddTextColumn("Partner Key", FPartnerCostCentreTbl.Columns["PartnerKey"], 90); grdLinkedCCs.AddTextColumn("Cost Centre", FPartnerCostCentreTbl.Columns["IsLinked"], 90); grdLinkedCCs.AddTextColumn("Reports To", FPartnerCostCentreTbl.Columns["ReportsTo"], 90); grdUnlinkedCCs.Enter += new EventHandler(grdLinkedCCs_Enter); grdLinkedCCs.Selection.FocusRowEntered += new SourceGrid.RowEventHandler(grdLinkedCCs_Click); grdUnlinkedCCs.Columns.Clear(); grdUnlinkedCCs.AddTextColumn("Partner Name", FPartnerCostCentreTbl.Columns["ShortName"], 240); grdUnlinkedCCs.AddTextColumn("Partner Key", FPartnerCostCentreTbl.Columns["PartnerKey"], 90); grdUnlinkedCCs.Enter += new EventHandler(grdUnlinkedCCs_Enter); grdUnlinkedCCs.Selection.FocusRowEntered += new SourceGrid.RowEventHandler(grdUnlinkedCCs_Click); btnLink.Text = "\u25B2 Link"; btnLink.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; btnLink.Enabled = false; btnUnlink.Text = "\u25BC Unlink"; btnUnlink.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; btnUnlink.Enabled = false; btnRemove.Enabled = false; }