Example #1
0
        public override void FilterData()
        {
            var res = GetAutoPropertyFilterString();

            if (string.IsNullOrEmpty(CNumberFilter) == false)
            {
                res.Append(" && " + string.Format("(pCNumber == \"{0}\")", CNumberFilter));
            }

            if (string.IsNullOrEmpty(PrevLineFilter) == false)
            {
                res.Append(" && " + string.Format("(pLineNumber == \"{0}\")", PrevLineFilter));
            }

            if (string.IsNullOrEmpty(ReferenceNumberFilter) == false)
            {
                res.Append(" && " + string.Format("(pReferenceNumber.Contains(\"{0}\"))", ReferenceNumberFilter));
            }


            ApplyDutyFreePaidFilters(res);

            ApplyViewFilters(res);

            UpdateVLoaderFilterExpression(res);

            AsycudaSalesAllocationsExs.Refresh();
            NotifyPropertyChanged(x => this.AsycudaSalesAllocationsExs);
        }
        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;
                }
            }

            AsycudaSalesAllocationsExs.Refresh();
            NotifyPropertyChanged(x => this.AsycudaSalesAllocationsExs);
        }
Example #3
0
 private new void OnCurrentPreviousDocumentChanged(object sender, NotificationEventArgs <PreviousDocument> e)
 {
     if (e.Data != null && PreviousDocumentItemsModel.Instance.ManualMode == false)
     {
         vloader.FilterExpression = string.Format("pASYCUDA_Id == {0}", e.Data.ASYCUDA_Id.ToString());
         AsycudaSalesAllocationsExs.Refresh();
         NotifyPropertyChanged(x => AsycudaSalesAllocationsExs);
     }
 }
Example #4
0
 private new void OnCurrentPreviousDocumentItemChanged(object sender, NotificationEventArgs <PreviousDocumentItem> e)
 {
     // if (BaseViewModel.Instance.CurrentAsycudaSalesAllocationsEx == null) return;
     if (e.Data != null && PreviousDocumentItemsModel.Instance.ManualMode == false)
     {
         //&& BaseViewModel.Instance.CurrentAsycudaSalesAllocationsEx.PreviousItem_Id != e.Data.Item_Id
         vloader.FilterExpression = string.Format("PreviousItem_Id == {0}", e.Data.Item_Id);
         AsycudaSalesAllocationsExs.Refresh();
         NotifyPropertyChanged(x => AsycudaSalesAllocationsExs);
     }
 }
Example #5
0
        private void OnCurrentSalesDataDetailChanged(object sender, NotificationEventArgs <SalesDataDetail> e)
        {
            if (e.Data != null && PreviousDocumentItemsModel.Instance.ManualMode == false)
            {
                // AllAllocations();
                vloader.FilterExpression = string.Format("EntryDataDetailsId == {0}", e.Data.EntryDataDetailsId);
                AsycudaSalesAllocationsExs.Refresh();

                NotifyPropertyChanged(x => AsycudaSalesAllocationsExs);
            }
        }
Example #6
0
        private void OnCurrentAsycudaDocumentItemChanged(object sender, NotificationEventArgs <AsycudaDocumentItem> e)
        {
            if (e.Data == null || e.Data.Item_Id == null)
            {
                vloader.FilterExpression = null;
            }
            else
            {
                vloader.FilterExpression = string.Format("xBond_Item_Id == {0} || PreviousItem_Id == {0}", e.Data.Item_Id.ToString());
            }

            AsycudaSalesAllocationsExs.Refresh();
            NotifyPropertyChanged(x => AsycudaSalesAllocationsExs);
        }