// // GET: /Home/ public ActionResult Index() { if (Session["Kullanici"] != null) { ViewModelSession kul = Session["Kullanici"] as ViewModelSession; return(View(kul)); } else { return(View()); } }
public PortalViewItemVM(ViewModelSession vmSession, ProductHistory productHistory) { _ProductHistory = productHistory; }
public ProductVM(ViewModelSession vmSession, Product product) { _Product = product; }
private void FillTabControl() { LoggedInWindowTabItem tabStart = new LoggedInWindowTabItem() { Name = "start", Content = new UserControlStart() }; LoggedInWindowTabItem tabSession = new LoggedInWindowTabItem() { Name = "session", Content = new UserControlSession() }; LoggedInWindowTabItem tabSearch = new LoggedInWindowTabItem() { Name = "search", Content = new UserControlSearch() }; LoggedInWindowTabItem tabPlaylist = new LoggedInWindowTabItem() { Name = "playlist", Content = new UserControlPlaylist() }; LoggedInWindowTabItem tabLibrary = new LoggedInWindowTabItem() { Name = "library", Content = new UserControlPlaylist() }; LoggedInWindowTabItem tabUser = new LoggedInWindowTabItem() { Name = "user", Content = new UserControlPlaylist() }; LoggedInWindowTabItem tabFeatured = new LoggedInWindowTabItem() { Name = "featured", Content = new UserControlPlaylist() }; TabItems = new ObservableCollection <LoggedInWindowTabItem>() { tabStart, tabSession, tabSearch, tabPlaylist, tabLibrary, tabUser, tabFeatured }; //Tabitems have to be created for viemodel start tabStart.ViewModel = ViewModelStart = new ViewModelStart(this); tabSession.ViewModel = ViewModelSession = new ViewModelSession(this); tabSearch.ViewModel = ViewModelSearch = new ViewModelSearch(this); tabPlaylist.ViewModel = ViewModelPlaylists = new ViewModelPlaylists(this); //temp tabLibrary.ViewModel = tabUser.ViewModel = tabFeatured.ViewModel = new ViewModelPlaylists(this); SelectedTabItem = tabStart; }