Exemple #1
0
        public ActionResult Create([Bind(Include = "Id,TypName,Zeitintervall")] Messtypen messtypen)
        {
            if (ModelState.IsValid)
            {
                db.Messtypen.Add(messtypen);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(messtypen));
        }
Exemple #2
0
        // GET: Messtypen/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Messtypen messtypen = db.Messtypen.Find(id);

            if (messtypen == null)
            {
                return(HttpNotFound());
            }
            return(View(messtypen));
        }