Example #1
0
        public void UomQueryContainsWithUpperCase()
        {
            var u   = session.Load <Uom>(IntToGuid <Uom>(1));
            var res = UomQuery.Contains(session)(u.Abbr.ToUpper());

            Assert.IsTrue(res.Contains(u));
        }
Example #2
0
        public MeasureEditorViewModel(Measure measure, Word w, bool withCompare)
        {
            this.withCompare = withCompare;

            _uoms = new List <Uom> {
                Uom.Null
            };
            var allUoms = UomQuery.Contains(Session)("");

            _uoms.AddRange(allUoms);

            var view = (ListCollectionView)CollectionViewSource.GetDefaultView(_uoms);

            view.GroupDescriptions.Add(new PropertyGroupDescription("Type"));

            Operator = MeasureOperator.Equal;

            SetupMeasure(measure, w);
            CreateAutocomplete();

            Title          = "Редактирование измерения";
            HelpTopic      = "editmeasure";
            WithHelpButton = false;
        }
Example #3
0
 private void CreateFilter()
 {
     _filter = new FilterViewModel <Uom>(UomQuery.Contains(Session));
 }