示例#1
0
        public ActionResult Edit([Bind(Include = "Id,Naam,Intro,LaatseAanpassing")] Gip gip)
        {
            if (ModelState.IsValid)
            {
                gip.LaatseAanpassing         = DateTime.Now;
                gip.PersoonLaatsteAanpassing = User.Identity.Name;

                db.Entry(gip).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Overzicht"));
            }
            return(View(gip));
        }
示例#2
0
        public ActionResult Toevoegen([Bind(Include = "Id,Naam,Intro")] Gip gip)
        {
            if (ModelState.IsValid)
            {
                gip.LaatseAanpassing         = DateTime.Now;
                gip.PersoonLaatsteAanpassing = User.Identity.Name;
                db.Gips.Add(gip);
                db.SaveChanges();
                return(RedirectToAction("Overzicht"));
            }

            return(View(gip));
        }
示例#3
0
        // GET: Gips/Edit/5
        public ActionResult Aanpassen(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Gip gip = db.Gips.Find(id);

            if (gip == null)
            {
                return(HttpNotFound());
            }
            return(View(gip));
        }
示例#4
0
        // GET: Gips/Details/5
        public ActionResult Details(int?id = 0)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Gip gip = db.Gips.Find(id);

            if (gip == null)
            {
                return(HttpNotFound());
            }
            return(View("Details", gip));
        }