Esempio n. 1
0
        /// <summary>
        /// Setzt die Informationen in die GridView anhand der User
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="lastName"></param>
        /// <param name="firstName"></param>
        public void SetOutputByUser(String userID, String lastName, String firstName)
        {
            getUser  getUser  = new getUser();
            getPhone getPhone = new getPhone();

            getUser.setUserID(userID);
            getUser.setfirstName(firstName);
            getUser.setlastName(lastName);
            List <User> users = getUser.getUsers();

            list = new List <DataGrid_Device_Entry>();

            foreach (User user in users)
            {
                String name     = getPhone.getSinglePhone(user.UserID.ToString()).name;
                String line1    = getPhone.getSinglePhone(user.UserID.ToString()).line1;
                String ipAdress = getPhone.getSinglePhone(user.UserID.ToString()).ipAadress;

                list.Add(new DataGrid_Device_Entry()
                {
                    UserID = user.UserID, firstName = user.FirstName, lastName = user.LastName, IPAddress = ipAdress, DeviceName = name
                });
            }

            Network_Callmanager_DeviceMgmt_Output_Data.ItemsSource = list;
        }
Esempio n. 2
0
        /// <summary>
        /// Setzt die informationen in die GridView anhand der Telefone
        /// </summary>
        /// <param name="FilterText"></param>
        public void SetOutputByPhones(String FilterText)
        {
            getUser  getUser  = new getUser();
            getPhone getPhone = new getPhone();

            getPhone.setDirectoryNumber(FilterText);
            List <Phone> phones = getPhone.getPhones();

            list = new List <DataGrid_Device_Entry>();

            foreach (Phone phone in phones)
            {
                String lastName  = getUser.getSingleUser(phone.line1.ToString()).LastName;
                String firstName = getUser.getSingleUser(phone.line1.ToString()).FirstName;

                list.Add(new DataGrid_Device_Entry()
                {
                    UserID = phone.line1, firstName = firstName, lastName = lastName, IPAddress = phone.ipAadress, DeviceName = phone.name
                });
            }

            Network_Callmanager_DeviceMgmt_Output_Data.ItemsSource = list;
        }