Ejemplo n.º 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;
                }
            }

            TariffSupUnitLkps.Refresh();
            NotifyPropertyChanged(x => this.TariffSupUnitLkps);
        }
Ejemplo n.º 2
0
        internal void OnCurrentTariffCategoryChanged(object sender, SimpleMvvmToolkit.NotificationEventArgs <TariffCategory> e)
        {
            if (ViewCurrentTariffCategory == false)
            {
                return;
            }
            if (e.Data == null || e.Data.TariffCategoryCode == null)
            {
                vloader.FilterExpression = "None";
            }
            else
            {
                vloader.FilterExpression = string.Format("TariffCategoryCode == \"{0}\"", e.Data.TariffCategoryCode.ToString());
            }

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

            BaseViewModel.Instance.CurrentTariffSupUnitLkps = null;
        }