private QueryBlockViewModel SetRootOptions(SearchOptions options = null) { Contract.Requires(AuthorityController.CurrentDoctor != null); Contract.Ensures(options == null || options.PartialLoaded == Contract.Result <QueryBlockViewModel>().Options.PartialLoaded); QueryBlocks.Clear(); var qb = new QueryBlockViewModel(session, onQbEnter, options); qb.PropertyChanged += (s, e) => { if (e.PropertyName == "AllEmpty") { OnPropertyChanged(() => AllEmpty); } }; QueryBlocks.Add(qb); return(qb); }
public SampleQueryEditorViewModel() : base(SessionVMBase.Nhib.GetSession()) { QueryBlocks.Add(new SampleQueryBlockViewModel()); }