|
@@ -4,6 +4,7 @@ using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
using Comal.Classes;
|
|
|
+using Comal.Classes.SecurityDescriptors;
|
|
|
using InABox.Core;
|
|
|
using InABox.Mobile;
|
|
|
using Xamarin.Essentials;
|
|
@@ -106,14 +107,14 @@ namespace PRS.Mobile
|
|
|
|
|
|
private void SearchLocationID(Guid id)
|
|
|
{
|
|
|
- App.Data.StockLocations.Refresh(false);
|
|
|
- var location = App.Data.StockLocations.FirstOrDefault(x => Guid.Equals(x.ID,id));
|
|
|
- if (location != null)
|
|
|
- {
|
|
|
+ //App.Data.StockLocations.Refresh(false);
|
|
|
+ //var location = App.Data.StockLocations.FirstOrDefault(x => Guid.Equals(x.ID,id));
|
|
|
+ //if (location != null)
|
|
|
+ //{
|
|
|
_viewModel.Holdings.Filter = () =>
|
|
|
- new Filter<StockHolding>(x => x.Location.ID).IsEqualTo(location.ID);
|
|
|
+ new Filter<StockHolding>(x => x.Location.ID).IsEqualTo(id).Or(x=>x.Product.ID).IsEqualTo(id);
|
|
|
_viewModel.Holdings.Refresh(true);
|
|
|
- }
|
|
|
+ //}
|
|
|
}
|
|
|
|
|
|
private void SelectFromHolding_Click(object sender, EventArgs e)
|
|
@@ -196,6 +197,12 @@ namespace PRS.Mobile
|
|
|
|
|
|
private async void SaveList_Click(object sender, MobileMenuButtonClickedEventArgs args)
|
|
|
{
|
|
|
+ if (_viewModel.Job.ID == Guid.Empty && !Security.IsAllowed<AllowMobileQuickPickWithoutJob>())
|
|
|
+ {
|
|
|
+ await MaterialDialog.Instance.AlertAsync("Please select a Job before saving!", "Error");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
using (await MaterialDialog.Instance.LoadingDialogAsync(message: "Saving"))
|
|
|
{
|
|
|
try
|