internal async Task ManuallyAllocate(AsycudaSalesAllocationsEx callo, PreviousDocumentItem previousEntry) { if (callo.ItemNumber != previousEntry.ItemNumber) //BaseViewModel.Instance.CurrentAsycudaSalesAllocationsEx { var res = MessageBox.Show( string.Format("The Sales ItemNumber '{0}' is not the same as Previous Entry ItemNumber '{1}' do you want to continue?" , callo.ItemNumber, previousEntry.ItemNumber) , "Inventory Item Mis-match", MessageBoxButton.YesNo); if (res == MessageBoxResult.No) { return; } } if (Convert.ToDouble(callo.SalesQuantity) > (previousEntry.ItemQuantity - previousEntry.QtyAllocated)) { var res = MessageBox.Show( string.Format("The Sales Quantity '{0}' is larger than Previous Entry Quantity Available to allocate '{1}' do you want to continue with partial fill?" , callo.SalesQuantity.ToString(), (previousEntry.ItemQuantity - previousEntry.QtyAllocated).ToString()) , "Partial Allocation", MessageBoxButton.YesNo); if (res == MessageBoxResult.No) { return; } } await AsycudaSalesAllocationsExRepository.Instance.ManuallyAllocate(callo.AllocationId, previousEntry.Item_Id).ConfigureAwait(false); MessageBus.Default.BeginNotify(QuerySpace.AllocationQS.MessageToken.AsycudaSalesAllocationsExsChanged, null, new NotificationEventArgs(QuerySpace.AllocationQS.MessageToken.AsycudaSalesAllocationsExsChanged)); }
public async Task GoToxBondEntry(AsycudaSalesAllocationsEx allo) { if (allo != null) { Application.Current.Dispatcher.Invoke(() => { CoreEntities.ViewModels.BaseViewModel.Instance.CurrentAsycudaDocumentItem = AsycudaDocumentItemRepository.Instance.GetAsycudaDocumentItem(allo.xBond_Item_Id.ToString()).Result; Core.Common.UI.BaseViewModel.Slider.MoveTo("AsycudaDocumentsExP"); }); } }
public async Task <AsycudaSalesAllocationsEx> CreateAsycudaSalesAllocationsEx(AsycudaSalesAllocationsEx entity) { return(await Channel.CreateAsycudaSalesAllocationsEx(entity).ConfigureAwait(false)); }