private void BtnSaveSupplierDetails(object sender, RoutedEventArgs e) { Supplier s = new Supplier(); s.SupplierID = Int32.Parse(txtSuppId.Text); s.CompanyName = txtCompanyName.Text; s.Address = txtAddress.Text; s.City = txtCity.Text; s.Region = txtRegion.Text; s.PostalCode = txtPostalCode.Text; s.Country = txtCountry.Text; s.Phone = txtPhoneNum.Text; s.Email = txtEmailAddress.Text; da.EditSuppliers(s); MessageBox.Show("Supplier Details Updated"); MainWindow mw = Application.Current.Windows.OfType <MainWindow>().FirstOrDefault(); if (mw != null) { mw.MainFrame.Content = new ManageSuppliers(); } }