예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Zakaznovu zakaznovu = db.Zakaznovus.Find(id);

            db.Zakaznovus.Remove(zakaznovu);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "zakaznovu_id,zakaznovu_ad")] Zakaznovu zakaznovu)
 {
     if (ModelState.IsValid)
     {
         db.Entry(zakaznovu).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(zakaznovu));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "zakaznovu_id,zakaznovu_ad")] Zakaznovu zakaznovu)
        {
            if (ModelState.IsValid)
            {
                db.Zakaznovus.Add(zakaznovu);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(zakaznovu));
        }
예제 #4
0
        // GET: Az/Zakaznovu/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Zakaznovu zakaznovu = db.Zakaznovus.Find(id);

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