// GET: Galerie/Delete/5 public ActionResult Delete(int id) { var galerie = gs.GetByIdGalerie(id); galerieModel um = new galerieModel { id = galerie.id, name = galerie.name }; return(View(um)); }
public ActionResult Delete(int id, galerieModel um) { try { gs.Delete(gs.GetByIdGalerie(id)); gs.Commit(); return(RedirectToAction("Index")); } catch { return(View()); } }
//pdf rotativ //public ActionResult PrintInvoice() //{ // return new ActionAsPdf( // "Index") // { FileName = "galerie.pdf" }; //} // GET: Galerie/Details/5 public ActionResult Details(int id) { if (id == 0) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var galerie = gs.GetByIdGalerie(id); galerieModel um = new galerieModel { id = galerie.id, name = galerie.name, evente = galerie.evente }; if (galerie == null) { return(HttpNotFound()); } return(View(um)); }