public void FilterData(StringBuilder res = null) { if (DisableBaseFilterData) { return; } if (res == null) { res = GetAutoPropertyFilterString(); } if (res.Length == 0 && vloader.NavigationExpression.Count != 0) { res.Append("&& All"); } if (res.Length > 0) { vloader.FilterExpression = res.ToString().Trim().Substring(2).Trim(); } else { if (vloader.FilterExpression != "All") { vloader.FilterExpression = null; } } CounterPointPOs.Refresh(); NotifyPropertyChanged(x => this.CounterPointPOs); }
internal async Task SilentDownloadCPO(CounterPointPOs counterPointPOs) { //db.Refresh(System.Data.Objects.RefreshMode.StoreWins, db.EntryData); //CycleCurrentAsycudaDocument(); await CounterPointPOsRepository.Instance.DownloadCPO(counterPointPOs, CoreEntities.ViewModels.BaseViewModel.Instance.CurrentAsycudaDocumentSetEx.AsycudaDocumentSetId).ConfigureAwait(false); }
internal async Task DownloadCPO(CounterPointPOs counterPointPOs) { //db.Refresh(System.Data.Objects.RefreshMode.StoreWins, db.EntryData); //CycleCurrentAsycudaDocument(); await CounterPointPOsRepository.Instance.DownloadCPO(counterPointPOs, CoreEntities.ViewModels.BaseViewModel.Instance.CurrentAsycudaDocumentSetEx.AsycudaDocumentSetId).ConfigureAwait(false); MessageBus.Default.BeginNotify(EntryDataQS.MessageToken.EntryDataExChanged, new CPPurchaseOrdersModel(), new NotificationEventArgs(QuerySpace.EntryDataQS.MessageToken.EntryDataExChanged)); MessageBus.Default.BeginNotify(MessageToken.CurrentCounterPointPOsChanged, new CPPurchaseOrdersModel(), new NotificationEventArgs(MessageToken.CurrentCounterPointPOsChanged)); MessageBus.Default.BeginNotify(MessageToken.CounterPointPOsChanged, new CPPurchaseOrdersModel(), new NotificationEventArgs(MessageToken.CounterPointPOsChanged)); MessageBox.Show("Complete"); }
public async Task DownloadCPO(CounterPointPOs c, int asycudaDocumentSetId) { await WaterNut.DataSpace.CPPurchaseOrdersModel.Instance.DownloadCPO(c, asycudaDocumentSetId) .ConfigureAwait(false); }
public async Task DownloadCPO(CounterPointPOs c, int asycudaDocumentSetId) { await Channel.DownloadCPO(c, asycudaDocumentSetId).ConfigureAwait(false); }
public async Task <CounterPointPOs> CreateCounterPointPOs(CounterPointPOs entity) { return(await Channel.CreateCounterPointPOs(entity).ConfigureAwait(false)); }
public async Task DownloadCPO(CounterPointPOs c, int asycudaDocumentSetId) { if (c == null) { return; } if (asycudaDocumentSetId != 0) { StatusModel.Timer("Downloading CP Data..."); using (var ctx = new WaterNutDBEntities() { CommandTimeout = 0 }) { await ctx.ExecuteStoreCommandAsync(@" Delete from EntryData Where EntryDataId = @PONumber Delete from EntryData_PurchaseOrders Where EntryDataId = @PONumber INSERT INTO EntryData (EntryDataId, EntryDataDate) SELECT PO_NO, DATE FROM CounterPointPOs WHERE (PO_NO = @PONumber) INSERT INTO AsycudaDocumentSetEntryData (EntryDataId, AsycudaDocumentSetId) SELECT PO_NO, @AsycudaDocumentSetId FROM CounterPointPOs WHERE (PO_NO = @PONumber) INSERT INTO EntryData_PurchaseOrders (EntryDataId, PONumber) SELECT distinct PO_NO, PO_NO AS Expr1 FROM CounterPointPOs WHERE (PO_NO = @PONumber) INSERT INTO InventoryItems (ItemNumber, Description) SELECT Distinct CounterPointPODetails.ITEM_NO, CounterPointPODetails.ITEM_DESCR FROM CounterPointPODetails LEFT OUTER JOIN InventoryItems AS InventoryItems_1 ON CounterPointPODetails.ITEM_NO = InventoryItems_1.ItemNumber WHERE (CounterPointPODetails.PO_NO = @PONumber) AND (InventoryItems_1.ItemNumber IS NULL) AND Left(CounterPointPODetails.ITEM_NO,1) <>'*' INSERT INTO EntryDataDetails (EntryDataId, LineNumber, ItemNumber, Quantity, Units, ItemDescription, Cost, UnitWeight, QtyAllocated) SELECT PO_NO, SEQ_NO, ITEM_NO, ORD_QTY, ORD_UNIT, ITEM_DESCR, ORD_COST, UNIT_WEIGHT, 0 FROM CounterPointPODetails WHERE (PO_NO = @PONumber) AND Left(CounterPointPODetails.ITEM_NO,1) <>'*'", new SqlParameter("@AsycudaDocumentSetId", asycudaDocumentSetId), new SqlParameter("@PONumber", c.PurchaseOrderNo)).ConfigureAwait(false); } StatusModel.Timer("Refreshing CP Data..."); StatusModel.StopStatusUpdate(); } else { throw new ApplicationException("Please Select a Asycuda Document Set before downloading PO"); } }