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;
                }
            }

            SalesDatas.Refresh();
            NotifyPropertyChanged(x => this.SalesDatas);
        }
Ejemplo n.º 2
0
 private void OnCurrentAsycudaDocumentSetExChanged(object sender, NotificationEventArgs <AsycudaDocumentSetEx> e)
 {
     if (e.Data != null)
     {
         vloader.FilterExpression = "All";
         vloader.SetNavigationExpression("AsycudaDocumentSets", string.Format("AsycudaDocumentSetId == {0}", e.Data.AsycudaDocumentSetId));
         SalesDatas.Refresh();
     }
 }
Ejemplo n.º 3
0
        // Core Current Entities Changed
        // theorticall don't need this cuz i am inheriting from core entities baseview model so changes should flow up to here
        internal void OnCurrentAsycudaDocumentChanged(object sender, SimpleMvvmToolkit.NotificationEventArgs <AsycudaDocument> e)
        {
            if (e.Data == null || e.Data.ASYCUDA_Id == null)
            {
                vloader.FilterExpression = null;
            }
            else
            {
                vloader.FilterExpression = string.Format("AsycudaDocumentId == {0}", e.Data.ASYCUDA_Id.ToString());
            }

            SalesDatas.Refresh();
            NotifyPropertyChanged(x => this.SalesDatas);
        }
Ejemplo n.º 4
0
        //private void OnSalesDatasFilterExpressionChanged(object sender, NotificationEventArgs e)
        //{
        //    UpdateSelectedTotals();
        //}

        //private void UpdateSelectedTotals()
        //{
        //    var lst = SelectedSalesDatas.Where(x => x != null);
        //    SelectedTotal = Convert.ToDecimal(lst.Sum(x => x.Total));
        //}

        //private void OnSelectedSalesDatasChanged(object sender, NotificationEventArgs e)
        //{
        //    UpdateSelectedTotals();
        //}



        private void OnCurrentAsycudaSalesAllocationsExChanged(object sender, NotificationEventArgs <AsycudaSalesAllocationsEx> e)
        {
            // throw new NotImplementedException();
            if (e.Data != null)
            {
                vloader.SetNavigationExpression("SalesDataAllocations", string.Format("AllocationId == {0}", e.Data.AllocationId));
                SalesDatas.Refresh();

                var s = SalesDatas.FirstOrDefault();
                if (s != null)
                {
                    SelectedSalesDatas = new ObservableCollection <SalesData>()
                    {
                        s.Data
                    };
                }
            }
        }