public ActionResult EditAbout(InfoPageViewModel model) { var entity = _infoPageRepo.Get().First(); entity.PageContent = model.PageContent; _infoPageRepo.Update(entity); return(RedirectToAction("About")); }
public InfoPage(string webSite, string aboutSight, string name, string url1, string url2, string url3, string url4) { InitializeComponent(); BindingContext = new InfoPageViewModel(Navigation, webSite, aboutSight, name, url1, url2, url3, url4); NavigationPage.SetHasNavigationBar(this, false); }
public TankPage(IPeripheral peripheral) { // mystack.Enqueue(10); InitializeComponent(); BindingContext = new InfoPageViewModel(peripheral); //PrintPageViewModel numberz = new InfoPageViewModel(peripheral); // num = numberz.Tinstant; }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); _viewModel = new InfoPageViewModel(); AdaptToInfosCollection(); DataContext = _viewModel; }
public ActionResult EditAbout() { var infoPage = _infoPageRepo.Get().First(); var infoPageViewModel = new InfoPageViewModel { PageContent = infoPage.PageContent }; return(View(infoPageViewModel)); }
protected override void OnNavigatedFrom(NavigationEventArgs e) { base.OnNavigatedFrom(e); DataContext = null; if (_viewModel != null) { _viewModel = null; } }
public MainViewModel(ConnectionPageViewModel connectionPage, SubscriptionsPageViewModel subscriptionsPage, PublishPageViewModel publishPage, PacketInspectorPageViewModel packetInspectorPage, InfoPageViewModel infoPage) { ConnectionPage = connectionPage; SubscriptionsPage = subscriptionsPage; PublishPage = publishPage; PacketInspectorPage = packetInspectorPage; InfoPage = infoPage; }
public InfoPage() { InitializeComponent(); infoPageObj = new InfoPageViewModel(); this.DataContext = infoPageObj; }
public InfoPageViewModel Build() { var viewModel = new InfoPageViewModel { HeaderViewModel = this._headerViewModelFactory.Build() }; return viewModel; }
public InfoPage(IPeripheral peripheral) { InitializeComponent(); BindingContext = new InfoPageViewModel(peripheral); }