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); }; }
public async Task <IViewComponentResult> InvokeAsync() { NavigatorModel model = await _sharedService.Get(); return(View(model)); }
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)); }