Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Periodichnost periodichnost = db.Periodichnosts.Find(id);

            db.Periodichnosts.Remove(periodichnost);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,PeriodichnostName")] Periodichnost periodichnost)
 {
     if (ModelState.IsValid)
     {
         db.Entry(periodichnost).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(periodichnost));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "Id,PeriodichnostName")] Periodichnost periodichnost)
        {
            if (ModelState.IsValid)
            {
                db.Periodichnosts.Add(periodichnost);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(periodichnost));
        }
Beispiel #4
0
        // GET: Periodichnosts/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Periodichnost periodichnost = db.Periodichnosts.Find(id);

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