Browse Source

DESKTOP - improvement to select default location for PO items

Nick-PRSDigital@bitbucket.org 2 years ago
parent
commit
a0db9b576f
1 changed files with 6 additions and 6 deletions
  1. 6 6
      prs.desktop/Panels/Suppliers/SupplierPurchaseOrderItems.cs

+ 6 - 6
prs.desktop/Panels/Suppliers/SupplierPurchaseOrderItems.cs

@@ -90,21 +90,21 @@ namespace PRSDesktop
                 return false;
             }
 
-            if (MessageBox.Show("Create new location?", "Confirm", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
+            var menu = new ContextMenu();
+            menu.AddItem("Create New Location", null, () =>
             {
                 var grid = new StockLocationGrid();
                 var location = new StockLocation();
                 if (grid.EditItems(new StockLocation[] { location }))
                     AssignLocationToItems(location.ID, rows);
-            }
-            else
+            });
+            menu.AddItem("Choose Existing", null, () =>
             {
                 var popup = new PopupList(typeof(StockLocation), Guid.Empty, new string[] { });
-
                 if (popup.ShowDialog() == true)
                     AssignLocationToItems(popup.ID, rows);
-
-            }
+            });
+            menu.IsOpen = true;
             return true;
         }