Пример #1
0
 private void lvClientList_Selected(object sender, RoutedEventArgs e)
 {
     int index = lvClientList.SelectedIndex;
     Client selectedClient = new Client();
     selectedClient = clientList[index];
     lblClient.Content = selectedClient.getName();
     String name = selectedClient.getName();
     if ((selectedClient.getName()) == "NPR")
     {
         setNPRshowList();
     }
     else
     {
         MessageBox.Show("Under Construction");
     }
 }
Пример #2
0
        //Return all clients from XML
        private void setClientLists()
        {
            //ADD EXCEPTION HANDLING!!!!!!!!!!!!!!!!
            XDocument xmldoc = XDocument.Load("clientList.xml");
            var clients = from client in xmldoc.Descendants("client")
                          select new
                          {
                              Title = client.Element("title").Value.ToString()
                          };

            foreach (var client_x in clients)
            {
                Client client = new Client(client_x.Title);
                clientList.Add(client);
                lvClientList.Items.Add(client.getName());
            }
            return;
        }