Ejemplo n.º 1
0
        public void Show(string accountUUID)
        {
            _currentAccountUUID = accountUUID;
            trvLocations.Nodes.Clear();

            LocationManager lm        = new LocationManager(_connectionKey, _sessionKey);
            List <Location> locations = lm.GetAccountLocations(accountUUID);

            if (locations.Count == 0)
            {
                return;
            }

            List <INode> nodes = locations.ConvertAll(new Converter <Location, INode>(NodeEx.ObjectToNode));

            trvLocations.Load(nodes, null);
            trvLocations.SelectedNode = this.trvLocations.Nodes[0];
            _currentNode           = trvLocations.SelectedNode;
            _currentNode.BackColor = Color.LightSteelBlue;

            _nodeControl = new ctlNode(_connectionKey, _sessionKey);


            pnlNodeLocation.Controls.Add(_nodeControl);

            _selectedLocation = locations[0];
            ShowDetails(locations[0]);
            LoadCountries();
            LoadStates(_selectedLocation.Country);
            LoadCities(_selectedLocation.State);
        }
Ejemplo n.º 2
0
        //AccountUUID is passed in because the home control displays accounts.
        //As an account is selected we'll show the users for that account..
        //
        public void Show(string accountUUID)
        {
            lstAccountMembers.Items.Clear();

            AccountManager am    = new AccountManager(_connectionKey, _sessionKey);
            List <User>    users = am.GetAccountMembers(accountUUID, false);

            if (users.Count == 0)
            {
                return;
            }


            List <INode> nodes = users.ConvertAll(new Converter <User, INode>(NodeEx.ObjectToNode));

            lstAccountMembers.Load(nodes);

            _nodeControl = new ctlNode(_connectionKey, _sessionKey);

            pnlNodeUser.Controls.Add(_nodeControl);

            _selectedUser = users[0];
            ShowDetails(users[0]);
        }