internal async Task RemoveSelectedSalesData(List <SalesData> lst) { var res = MessageBox.Show("Are you sure you want to delete all Selected Items?", "Delete selected Items", MessageBoxButton.YesNo); if (res == MessageBoxResult.Yes) { await EntryDataExRepository.Instance.RemoveSelectedEntryData(SelectedSalesDatas.Select(x => x.EntryDataId)).ConfigureAwait(false); MessageBus.Default.BeginNotify(CoreEntities.MessageToken.AsycudaDocumentsChanged, null, new NotificationEventArgs(CoreEntities.MessageToken.AsycudaDocumentsChanged)); MessageBus.Default.BeginNotify(CoreEntities.MessageToken.AsycudaDocumentSetExsChanged, null, new NotificationEventArgs(CoreEntities.MessageToken.AsycudaDocumentSetExsChanged)); MessageBus.Default.BeginNotify(CounterPointQS.MessageToken.CounterPointPOsChanged, null, new NotificationEventArgs(CounterPointQS.MessageToken.CounterPointPOsChanged)); MessageBus.Default.BeginNotify(MessageToken.SalesDatasChanged, null, new NotificationEventArgs(MessageToken.SalesDatasChanged)); MessageBus.Default.BeginNotify(MessageToken.SalesDatasFilterExpressionChanged, null, new NotificationEventArgs(MessageToken.SalesDatasFilterExpressionChanged)); MessageBox.Show("Complete"); //EntryDataEx.Refresh(); } }
private void OnSalesDatasFilterExpressionChanged(object sender, NotificationEventArgs e) { SalesDatas.Refresh(); SelectedSalesDatas.Clear(); NotifyPropertyChanged(x => SelectedSalesDatas); BeginSendMessage(MessageToken.SelectedSalesDatasChanged, new NotificationEventArgs(MessageToken.SelectedSalesDatasChanged)); }
private void SetSelectetal() { var lst = SelectedSalesDatas.Where(x => x != null).ToList(); if (!lst.Any()) { SelectedTotal = 0; } else { SelectedTotal = Convert.ToDecimal(lst.Sum(x => x.Total)); } }