void DocumentsReport_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         vm = DataContext as ProductTransactionsViewModel;
         string _productId = NavigationService.Source.OriginalString.ParseQueryString("ProductId");
         if (!string.IsNullOrWhiteSpace(_productId))
             _productId = PresentationUtility.ParseQueryString(NavigationService.CurrentSource, "ProductId");
         if (!string.IsNullOrEmpty(_productId))
         {
             string ProductId = _productId;
             vm.ProductId = Guid.Parse(ProductId);
             vm.LoadDocumentsCommand.Execute(null);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Provides a deterministic way to create the ProductTransactionsViewModel property.
 /// </summary>
 public static void CreateProductTransactionsViewModel()
 {
     if (_ProductTransactionsViewModel == null)
     {
         _ProductTransactionsViewModel = new ProductTransactionsViewModel();
     }
 }
Beispiel #3
0
 /// <summary>
 /// Provides a deterministic way to delete the ProductTransactionsViewModel property.
 /// </summary>
 public static void ClearProductTransactionsViewModel()
 {
     _ProductTransactionsViewModel.Cleanup();
     _ProductTransactionsViewModel = null;
 }