Пример #1
0
 public SimViewModel(NavigatorModel navigatorModel, MapAndDashboardModel mapAndDashboardModel)
 {
     this.navigatorModel       = navigatorModel;
     this.mapAndDashboardModel = mapAndDashboardModel;
     // when proprety changed in the model- it will notify the VM also
     // use the map and dashboard model
     mapAndDashboardModel.PropertyChanged += delegate(Object sender, PropertyChangedEventArgs e) {
         NotifyPropertyChanged("VM_" + e.Name);
     };
 }
Пример #2
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            NavigatorModel model = await _sharedService.Get();

            return(View(model));
        }
Пример #3
0
        public List <NavigatorModel> GetAuthorisedNavigator(SimpleUser user)
        {
            var resources = this.roleAuthorityQ.Entities.Where(o => o.IsActive).WhereIn(o => o.RoleID, user.Roles.Select(o => o.ID)).Where(o => o.Resource.IsActive).Select(o => o.Resource).ToList();

            return(NavigatorModel.CreateNavigator(resources));
        }