private void bAddModule_Click(object sender, RoutedEventArgs e) { Windows.selectModuleWindow w = new selectModuleWindow(); w.ShowDialog(); if (w.DialogResult == true) { w.currentURmodule.clientDevice = currentDevice; w.currentURmodule.employee = currentEmployee; UR.Add(w.currentURmodule); updateModulesList(); } }
private void bEdit_Click(object sender, RoutedEventArgs e) { Windows.selectModuleWindow w = new selectModuleWindow(dgModules.SelectedItem as upgradeReplacement); w.ShowDialog(); if (w.DialogResult == true) { UR.Remove(dgModules.SelectedItem as upgradeReplacement); w.currentURmodule.clientDevice = currentDevice; w.currentURmodule.employee = currentEmployee; UR.Add(w.currentURmodule); updateModulesList(); } }