private void Execute_editor(object o) { try { Editor edit_window = new Editor(); View_Model_Editor model = new View_Model_Editor(my_profile, myDB); edit_window.DataContext = model; edit_window.ShowDialog(); // myDB = new CashDB(); Set_new_items(); }catch (Exception e) { OpenMessege(e.Message, "Error"); } }
private void Execute_editor(object o) { try { Editor edit_window = new Editor(); View_Model_Editor model = new View_Model_Editor(myProfile, myDB); edit_window.DataContext = model; edit_window.ShowDialog(); List_product = myDB.Products.ToList(); OnPropertyChanged(nameof(List_product)); } catch (Exception e) { OpenMessege(e.Message, "Error"); } }