public ActionResult Edit(int id) { BlogPost b = new BlogPost(); b = _blog.Get(id); BlogPostModel model = new BlogPostModel(); model.ID = b.ID; model.Title = b.Title; model.Content = b.Content; model.Author = b.Author; return(View(model)); }
public ActionResult LoadAudio(int mapID) { Sounds audio = null; if (User.Identity.IsAuthenticated) { Map currentMap = _map.Get(mapID); //get map from database audio = _music.Get(currentMap.SoundID); //get sound from database } else //free play mode { Map currentMap = _map.Get((int)Session["fp_mapID"]); //get map from database audio = _music.Get(currentMap.SoundID); //get sound from database } return(base.File(audio.Sound, audio.SoundName)); }
public ActionResult PlayAnimalSound(int animalID) { Animal animal = _animal.Get(animalID); Sounds sounds = _sounds.Get(animal.SoundID); return(File(sounds.Sound, sounds.SoundName)); }
public ActionResult ShowMapImage(int mapID) { Images image = null; if (User.Identity.IsAuthenticated) { Map currentMap = _map.Get(mapID); //get map from database image = _image.Get(currentMap.ImageID); //get map image from database } else //free play mode { Map currentMap = _map.Get((int)Session["fp_mapID"]); //get map from database image = _image.Get(currentMap.ImageID); //get map image from database } return(File(image.Image, image.ImageName)); }
public ActionResult Show(int id) { Inventory image = _irepo.Get(id); return(File(image.ProductImage, image.ProductName)); }