예제 #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;
                }
            }

            SubItems.Refresh();
            NotifyPropertyChanged(x => this.SubItems);
        }
예제 #2
0
        internal void OnCurrentAsycudaDocumentItemChanged(object sender, SimpleMvvmToolkit.NotificationEventArgs <AsycudaDocumentItem> e)
        {
            if (ViewCurrentAsycudaDocumentItem == false)
            {
                return;
            }
            if (e.Data == null || e.Data.Item_Id == null)
            {
                vloader.FilterExpression = "None";
            }
            else
            {
                vloader.FilterExpression = string.Format("Item_Id == {0}", e.Data.Item_Id.ToString());
            }

            SubItems.Refresh();
            NotifyPropertyChanged(x => this.SubItems);
            // SendMessage(MessageToken.SubItemsChanged, new NotificationEventArgs(MessageToken.SubItemsChanged));

            BaseViewModel.Instance.CurrentSubItems = null;
        }