/// <summary> /// Add a new Home instance to the DB and a attach it to new or existing Agent or Owner instance, regardless of Search results. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MenuAddHome_Click(object sender, RoutedEventArgs e) { try { ClearSearchResultsViews(); var ahw = new AddHomeWindow("Home", "Add New Home"); ahw.Show(); } catch (Exception ex) { DisplayStatusMessage("Unable to display Add Home window."); logger.Data(System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message); logger.Flush(); } finally { } }
private void MenuUpdateHome_Click(object sender, RoutedEventArgs e) { try { ClearSearchResultsViews(); HomeSearchModel selectedHome = FoundHomesView.SelectedItem as HomeSearchModel; var homeID = selectedHome.HomeID; var ahw = new AddHomeWindow(); ahw.Show(); } catch (Exception ex) { DisplayStatusMessage("Select a Home first, then click Menu, Update Home."); logger.Data(System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message); logger.Flush(); } finally { } }