private void PopUp_AddNewCustomer(object sender, RoutedEventArgs e) { //Window win = new Window(); //ProductAddNew eDoc = new ProductAddNew(); //win.Content = eDoc; //win.Title = "Add Product"; //win.Width = 350; //win.Height = 450; //win.WindowStartupLocation = WindowStartupLocation.CenterScreen; //win.Show(); //ProductAddNew userControl1 = new ProductAddNew(); //this.InitializeComponent(); // UserControl win = new UserControl(); //CompanyAddNew eDoc = new CompanyAddNew(); //win.Content = eDoc; //win.Title = "Add Product"; //win.Width = 350; //win.Height = 450; //win.WindowStartupLocation = WindowStartupLocation.CenterScreen; //win.Show(); //CompanyList complist = new CompanyList(); TextBlock_TitleName.Visibility = Visibility.Collapsed; DataGrid.Visibility = Visibility.Collapsed; PopupBox.Visibility = Visibility.Collapsed; CustomerAddNew x = new CustomerAddNew(); UserPages.Children.Clear(); UserPages.Children.Add(x); PopupBoxWithClose.Visibility = Visibility.Visible; }
private void TreeItem_CustomerAdd_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { CustomerAddNew x = new CustomerAddNew(); UserPages.Children.Clear(); UserPages.Children.Add(x); }
private void ButtonAddCustomer_Click(object sender, RoutedEventArgs e) { this.topgrid.Visibility = Visibility.Collapsed; this.mainscrollviewer.Visibility = Visibility.Collapsed; CustomerAddNew x = new CustomerAddNew(); UserPages.Children.Clear(); UserPages.Children.Add(x); }