Exemplo n.º 1
0
        public void AddInspection(object e)
        {
            InspectionWindow    inspectionWindow    = new InspectionWindow();
            InspectionViewModel inspectionViewModel = new InspectionViewModel();

            inspectionViewModel.Inspection       = null;
            inspectionViewModel.Inspectors       = Inspectors;
            inspectionViewModel.InspectionWindow = inspectionWindow;
            inspectionViewModel.Init();
            inspectionWindow.DataContext = inspectionViewModel;
            if (inspectionWindow.ShowDialog() != true)
            {
                Init();
            }
        }
Exemplo n.º 2
0
 public void EditInspection(object e)
 {
     if (SelectedInspection == null)
     {
         MessageBox.Show("Не выбрана инспекция");
     }
     else
     {
         InspectionWindow    inspectionWindow    = new InspectionWindow();
         InspectionViewModel inspectionViewModel = new InspectionViewModel();
         inspectionViewModel.Inspection       = SelectedInspection;
         inspectionViewModel.Inspectors       = Inspectors;
         inspectionViewModel.InspectionWindow = inspectionWindow;
         inspectionViewModel.Init();
         inspectionWindow.DataContext = inspectionViewModel;
         if (inspectionWindow.ShowDialog() != true)
         {
             Init();
         }
     }
 }