private void billFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
        {
            switch (e.ItemPropertyDefinition.PropertyName)
            {
            case "StorageID":
                RadComboBox cbxStorage = (RadComboBox)e.Editor;
                cbxStorage.ItemsSource = StorageInfoVM.Storages;
                break;

            case "BrandID":
                RadComboBox cbxBrand = (RadComboBox)e.Editor;
                cbxBrand.ItemsSource = VMGlobal.PoweredBrands;
                break;

            case "NameID":
                RadComboBox cbxName = (RadComboBox)e.Editor;
                cbxName.ItemsSource = VMGlobal.ProNames;
                break;

            case "Year":
                RadDatePicker dateTimePickerEditor = (RadDatePicker)e.Editor;
                dateTimePickerEditor.SelectionChanged += (ss, ee) =>
                {
                    DateTime date = (DateTime)ee.AddedItems[0];
                    dateTimePickerEditor.DateTimeText = date.Year.ToString();
                };
                break;

            case "Quarter":
                RadComboBox cbxQuarter = (RadComboBox)e.Editor;
                cbxQuarter.ItemsSource = VMGlobal.Quarters;
                break;
            }
            SysProcessView.UIHelper.ToggleShowEqualFilterOperatorOnly(e.Editor);
        }
        private void billFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
        {
            RadComboBox cbx = e.Editor as RadComboBox;

            if (cbx != null)
            {
                switch (e.ItemPropertyDefinition.PropertyName)
                {
                case "StorageID":
                    cbx.ItemsSource = StorageInfoVM.Storages;
                    break;

                case "BrandID":
                    cbx.ItemsSource = VMGlobal.PoweredBrands;
                    break;
                }
            }
            else
            {
                OrganizationSelector os = e.Editor as OrganizationSelector;
                if (os != null)
                {
                    switch (e.ItemPropertyDefinition.PropertyName)
                    {
                    case "OrganizationID":
                    case "ToOrganizationID":
                        os.ItemsSource = OrganizationLogic.GetSiblingOrganizations(VMGlobal.CurrentUser.OrganizationID);
                        break;
                    }
                }
            }
            SysProcessView.UIHelper.ToggleShowEqualFilterOperatorOnly(e.Editor);
        }
Ejemplo n.º 3
0
 private void radDataFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
 {
     if (e.ItemPropertyDefinition.PropertyName == "BrandID")
     {
         RadComboBox cbxBrand = (RadComboBox)e.Editor;
         cbxBrand.ItemsSource = VMGlobal.PoweredBrands;
     }
 }
Ejemplo n.º 4
0
        //private void btnSearch_Click(object sender, RoutedEventArgs e)
        //{
        //    int totalCount = 0;
        //    CompositeFilterDescriptorCollection filters = new CompositeFilterDescriptorCollection();
        //    filters.Add(radDataFilter.FilterDescriptors);
        //    filters.Add(new FilterDescriptor("OrganizationID", FilterOperator.IsEqualTo, VMGlobal.CurrentUser.OrganizationID));
        //    RadGridView1.ItemsSource = ReportDataContext.SearchFundAccount(filters, pager.PageIndex, pager.PageSize, ref totalCount);
        //    pager.ItemCount = totalCount;
        //}

        private void radDataFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
        {
            RadComboBox cbx = e.Editor as RadComboBox;

            if (cbx != null)
            {
                if (e.ItemPropertyDefinition.PropertyName == "BrandID")
                {
                    cbx.ItemsSource = VMGlobal.PoweredBrands;
                }
            }
            SysProcessView.UIHelper.ToggleShowEqualFilterOperatorOnly(e.Editor);
        }
 private void billFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
 {
     if (e.ItemPropertyDefinition.PropertyName == "StorageIDOut" || e.ItemPropertyDefinition.PropertyName == "StorageIDIn")
     {
         RadComboBox cbxStorage = (RadComboBox)e.Editor;
         cbxStorage.ItemsSource = StorageInfoVM.Storages;
     }
     else if (e.ItemPropertyDefinition.PropertyName == "BrandID")
     {
         RadComboBox cbxBrand = (RadComboBox)e.Editor;
         cbxBrand.ItemsSource = VMGlobal.PoweredBrands;
     }
     SysProcessView.UIHelper.ToggleShowEqualFilterOperatorOnly(e.Editor);
 }
        private void billFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
        {
            RadComboBox cbx = e.Editor as RadComboBox;

            if (cbx != null)
            {
                switch (e.ItemPropertyDefinition.PropertyName)
                {
                case "BrandID":
                    cbx.ItemsSource = _brands;    //这么设置在多个品牌条件筛选时不会出现同步问题,难道只有以Binding的方式设置才会同步?
                    break;
                }
            }
            SysProcessView.UIHelper.ToggleShowEqualFilterOperatorOnly(e.Editor);
        }
Ejemplo n.º 7
0
        private void radDataFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
        {
            RadComboBox cbx = e.Editor as RadComboBox;

            if (cbx != null)
            {
                SysProcessView.UIHelper.SetAPTForFilter(e.ItemPropertyDefinition.PropertyName, cbx);
                switch (e.ItemPropertyDefinition.PropertyName)
                {
                case "BrandID":
                    cbx.ItemsSource = VMGlobal.PoweredBrands;
                    break;
                }
            }
        }
Ejemplo n.º 8
0
        private void radDataFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
        {
            RadComboBox cbx = e.Editor as RadComboBox;

            if (cbx != null)
            {
                switch (e.ItemPropertyDefinition.PropertyName)
                {
                case "KindID":
                    cbx.ItemsSource = KindListFilter;
                    break;
                }
            }
            SysProcessView.UIHelper.ToggleShowEqualFilterOperatorOnly(e.Editor);
        }
        private void billFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
        {
            RadComboBox cbx = e.Editor as RadComboBox;

            if (cbx != null)
            {
                switch (e.ItemPropertyDefinition.PropertyName)
                {
                case "StorageID":
                    cbx.ItemsSource = StorageInfoVM.Storages;
                    break;

                case "BrandID":
                    cbx.ItemsSource = VMGlobal.PoweredBrands;
                    break;
                }
            }
            SysProcessView.UIHelper.ToggleShowEqualFilterOperatorOnly(e.Editor);
        }
Ejemplo n.º 10
0
        private void billFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
        {
            RadComboBox cbx = e.Editor as RadComboBox;

            if (cbx != null)
            {
                switch (e.ItemPropertyDefinition.PropertyName)
                {
                case "StorageID":
                    cbx.ItemsSource = StorageInfoVM.Storages;
                    break;

                case "ShiftID":
                    cbx.ItemsSource = VMGlobal.DistributionQuery.LinqOP.Search <RetailShift>(o => o.OrganizationID == VMGlobal.CurrentUser.OrganizationID).ToList();
                    break;
                }
            }
            SysProcessView.UIHelper.ToggleShowEqualFilterOperatorOnly(e.Editor);
        }