Exemplo n.º 1
0
        private void AddCalamity(object sender, RoutedEventArgs e)
        {
            Device d = (Device)this.dg_DevicesList.SelectedItem;

            AddCalamityView acv = new AddCalamityView(this, d.Name);

            if (acv.ShowDialog() == true)
            {
                DatabaseController.AddCalamity(d.DeviceId, acv.NewCalamity);
                UpdateDeviceListView();
                UpdateCalamityListView();
                UpdateLogbookView();
                liveChartsController.UpdateDistinctYears();
            }
        }
Exemplo n.º 2
0
        private void EditCalamity(object sender, RoutedEventArgs e)
        {
            Calamity d = (Calamity)this.dg_CalamityList.SelectedItem;

            AddCalamityView acv = new AddCalamityView(this, d);

            if (acv.ShowDialog() == true)
            {
                DatabaseController.EditCalamity(acv.NewCalamity);
                UpdateDeviceListView();
                UpdateCalamityListView();
                UpdateLogbookView();
                liveChartsController.UpdateDistinctYears();
            }
        }