private void RunOnceOnActivationManual()
        {
            // Stop changes from ever being detected. We do not want to save the data on this screen.
            FPetraUtilsObject.DisableSaveButton();
            FPetraUtilsObject.UnhookControl(this, true);

            cmbFromAccountCode.AttachedLabel.Text      = TFinanceControls.SELECT_VALID_ACCOUNT;
            cmbFromCostCentreCode.AttachedLabel.Text   = TFinanceControls.SELECT_VALID_COST_CENTRE;
            cmbDetailAccountCode.AttachedLabel.Text    = TFinanceControls.SELECT_VALID_ACCOUNT;
            cmbDetailCostCentreCode.AttachedLabel.Text = TFinanceControls.SELECT_VALID_COST_CENTRE;
        }
Esempio n. 2
0
        /// <summary>
        /// Refreshes position in Uni Hierarchy
        /// </summary>
        /// <param name="AUnitHierarchyChange">All Unit Hierarchies that have been changed.</param>
        public void RefreshUnitHierarchy(Tuple <string, Int64, Int64> AUnitHierarchyChange)
        {
            if (AUnitHierarchyChange.Item2 == FMainDS.PPartner[0].PartnerKey)
            {
                FPetraUtilsObject.UnhookControl(txtParentKey, false); // I don't want this change to cause SetChangedFlag.
                txtParentKey.Text = AUnitHierarchyChange.Item3.ToString("D10");

                FPetraUtilsObject.UnhookControl(lblParentName, false); // I don't want this change to cause SetChangedFlag.
                lblParentName.Text = AUnitHierarchyChange.Item1;

                btnOrganise.Enabled = true;
            }
        }
        private void RunOnceOnActivationManual()
        {
            // AlanP March 2013:  Use a try/catch block because nUnit testing on this screen does not support Drag/Drop in multi-threaded model
            // It is easier to do this than to configure all the different test execution methods to use STA
            try
            {
                trvUnits.AllowDrop = true;
                trvUnits.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(treeView_ItemDrag);
                trvUnits.DragOver += new System.Windows.Forms.DragEventHandler(treeView_DragOver);
                trvUnits.DragDrop += new System.Windows.Forms.DragEventHandler(treeView_DragDrop);
            }
            catch (InvalidOperationException)
            {
                // ex.Message is: DragDrop registration did not succeed.
                // Inner exception is: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made.
            }

            trvUnits.Click           += new EventHandler(UnitsClick);
            trvUnits.ShowNodeToolTips = true;
            trvUnits.MouseWheel      += new MouseEventHandler(treeView_MouseWheel);
            trvUnits.Focus();

            txtChild.TextChanged  += new EventHandler(EvaluateParentChange);
            txtParent.TextChanged += new EventHandler(EvaluateParentChange);

            FPetraUtilsObject.UnhookControl(pnlDetails, true); // I don't want changes in these values to cause SetChangedFlag.
            FPetraUtilsObject.UnhookControl(txtStatus, false);

            ArrayList UnitNodes = TRemote.MPersonnel.WebConnectors.GetUnitHeirarchy();
            //
            // The list of nodes returned by the above call are ordered to the extent that:
            //  * The root node appears first,
            //  * a parent appears before its child.
            UnitHierarchyNode RootData = (UnitHierarchyNode)UnitNodes[0];
            TreeNode          RootNode = new TreeNode(RootData.Description);

            RootNode.Tag         = RootData;
            RootNode.ToolTipText = RootData.TypeCode;
            UnitNodes.RemoveAt(0);
            trvUnits.Nodes.Add(RootNode);
            AddChildren(RootNode, UnitNodes);
            Int64 MySiteKey = Convert.ToInt64(TSystemDefaults.GetSystemDefault(SharedConstants.SYSDEFAULT_SITEKEY, ""));

            ShowThisUnit(MySiteKey);
        }
Esempio n. 4
0
 private void RunOnceOnActivationManual()
 {
     // Stop changes from ever being detected. We do not want to save the data on this screen.
     FPetraUtilsObject.DisableSaveButton();
     FPetraUtilsObject.UnhookControl(this, true);
 }