private void AddOwnerButton_click(object sender, RoutedEventArgs e) { var Apw = new AddPersonWindow(); Apw.AddType = "Owner"; Apw.Title = "Add new Owner to the Database"; Apw.Show(); }
/// <summary> /// Add a new Buyer instance to the DB and attach it to a new or existing Person instance, regardless of Search results. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MenuAddBuyer_Click(object sender, RoutedEventArgs e) { try { ClearSearchResultsViews(); var apw = new AddPersonWindow(); apw.AddType = "Buyer"; apw.Title = "Add New Buyer Person"; apw.Show(); } catch (Exception ex) { DisplayStatusMessage("Unable to display Add Buyer window."); logger.Data(System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message); logger.Flush(); } finally { } }