|
@@ -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;
|
|
|
}
|
|
|
|