Пример #1
0
        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;
                }
            }

            PreviousDocuments.Refresh();
            NotifyPropertyChanged(x => this.PreviousDocuments);
        }
        private async void OnCurrentPreviousDocumentItemChanged(object sender, NotificationEventArgs <PreviousDocumentItem> e)
        {
            if (e.Data != null && ManualMode == false)
            {
                if (e.Data == null || e.Data.ASYCUDA_Id == null)
                {
                    vloader.FilterExpression = null;
                }
                else
                {
                    vloader.FilterExpression = string.Format("ASYCUDA_Id == {0}", e.Data.ASYCUDA_Id);
                }

                PreviousDocuments.Refresh();
                NotifyPropertyChanged(x => this.PreviousDocuments);

                //BaseViewModel.Instance.CurrentPreviousDocument = await PreviousDocumentQS.ViewModels.BaseViewModel.Instance. e.Data.PreviousDocument;
            }
        }