Пример #1
0
        //populate the drop down list of user of type EndUser
        public void updateDdlist()
        {
            ddlAdminSelects.Items.Clear();
            EndUserList.Clear();

            ListOfUsersXMLHandler userHandler = new ListOfUsersXMLHandler();
            string filename = "ListOfUsers.xml"; // FILENAME OF LIST OF USERS XML

            EndUserList = userHandler.ReadFile(filename);
            //reload the drop down list with student names
            for (int i = 0; i < EndUserList.Count; i++)
            {
                try
                {
                    ddlAdminSelects.Items.Insert(i, EndUserList[i + 1].ScreenName);
                }
                catch (ArgumentOutOfRangeException x)
                {
                    //do nothing if no user exits
                }
            }
        }
        //populate the drop down list of user of type EndUser
        public void updateDdlist()
        {
            ddlAdminSelects.Items.Clear();
            EndUserList.Clear();

            ListOfUsersXMLHandler userHandler = new ListOfUsersXMLHandler();
            string filename = "ListOfUsers.xml"; // FILENAME OF LIST OF USERS XML
            EndUserList = userHandler.ReadFile(filename);
            //reload the drop down list with student names
            for (int i = 0; i < EndUserList.Count; i++)
            {
                try
                {
                    ddlAdminSelects.Items.Insert(i, EndUserList[i + 1].ScreenName);
                }
                catch (ArgumentOutOfRangeException x)
                {
                    //do nothing if no user exits
                }
            }

        }