コード例 #1
0
        // 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));
        }
コード例 #2
0
        public ActionResult Delete(int id, galerieModel um)
        {
            try
            {
                gs.Delete(gs.GetByIdGalerie(id));
                gs.Commit();

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
コード例 #3
0
        //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));
        }