Esempio n. 1
0
 public void Refresh()
 {
     filter = ClientRequests.getFilters();
     TypeList.ItemsSource     = filter.types.Select(x => x.type);
     CatagoryList.ItemsSource = filter.categories.Select(x => x.category);
     ServicesList.ItemsSource = filter.services.Select(x => x.name);
 }
Esempio n. 2
0
 public void addCatagory(object sender, RoutedEventArgs arg)
 {
     if (NewCatagory.Text == "")
     {
         MessageBox.Show("Cannot add blank name");
         return;
     }
     ClientRequests.addCatagory(NewCatagory.Text);
     filter = ClientRequests.getFilters();
     CatagoryList.ItemsSource = filter.categories.Select(x => x.category);
 }
Esempio n. 3
0
 public void addService(object sender, RoutedEventArgs arg)
 {
     if (NewService.Text == "")
     {
         MessageBox.Show("Cannot add blank name");
         return;
     }
     ClientRequests.addService(NewService.Text);
     filter = ClientRequests.getFilters();
     ServicesList.ItemsSource = filter.services.Select(x => x.name);
 }
Esempio n. 4
0
 public FilteView()
 {
     InitializeComponent();
     dt          = new DispatcherTimer();
     dt.Tick    += new EventHandler(AutoRefresh);
     dt.Interval = new TimeSpan(0, 5, 0);
     dt.Start();
     filter = ClientRequests.getFilters();
     TypeList.ItemsSource     = filter.types.Select(x => x.type);
     CatagoryList.ItemsSource = filter.categories.Select(x => x.category);
     ServicesList.ItemsSource = filter.services.Select(x => x.name);
     DataContext = this;
 }
Esempio n. 5
0
 public void modifyType(object sender, RoutedEventArgs arg)
 {
     if (TypeList.SelectedItem == null)
     {
         MessageBox.Show("Please select Type to change");
         return;
     }
     if (ModifyType.Text == "")
     {
         MessageBox.Show("Cannot add blank name");
         return;
     }
     ClientRequests.modifyType((String)TypeList.SelectedItem, ModifyType.Text);
     filter = ClientRequests.getFilters();
     TypeList.ItemsSource = filter.types.Select(x => x.type);
 }
Esempio n. 6
0
 public void modifyCategory(object sender, RoutedEventArgs arg)
 {
     if (CatagoryList.SelectedItem == null)
     {
         MessageBox.Show("Please select Catagory to change");
         return;
     }
     if (ModifyCategory.Text == "")
     {
         MessageBox.Show("Cannot add blank name");
         return;
     }
     ClientRequests.modifyCategory((String)CatagoryList.SelectedItem, ModifyCategory.Text);
     filter = ClientRequests.getFilters();
     CatagoryList.ItemsSource = filter.categories.Select(x => x.category);
 }