private void BSaveClick(object sender, RoutedEventArgs e) { if (RepositoryProduct.Products.Count > 0) { RepositoryProduct.AddRange(RepositoryProduct.Products); Close(); } }