コード例 #1
0
        public ActionResult DeleteConfirmed(long id)
        {
            PRODAZHI prodazhi = db.PRODAZHI.Find(id);

            db.PRODAZHI.Remove(prodazhi);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
        //
        // GET: /Prodazhi/Edit/5

        public ActionResult Edit(long id)
        {
            PRODAZHI prodazhi = db.PRODAZHI.Find(id);

            ViewBag.POKUPATEL = new SelectList(db.POKUPATELI, "ID", "IMJA_POKUPATELJA", prodazhi.POKUPATEL);
            ViewBag.PRODAVEC  = new SelectList(db.PRODAVCY, "ID", "IMJA_PRODAVCA", prodazhi.PRODAVEC);
            ViewBag.TOVAR     = new SelectList(db.SPISOK_TOVAROV, "ID", "TOVAR", prodazhi.TOVAR);
            return(View(prodazhi));
        }
コード例 #3
0
 public ActionResult Edit(PRODAZHI prodazhi)
 {
     if (ModelState.IsValid)
     {
         db.Entry(prodazhi).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.POKUPATEL = new SelectList(db.POKUPATELI, "ID", "IMJA_POKUPATELJA", prodazhi.POKUPATEL);
     ViewBag.PRODAVEC  = new SelectList(db.PRODAVCY, "ID", "IMJA_PRODAVCA", prodazhi.PRODAVEC);
     ViewBag.TOVAR     = new SelectList(db.SPISOK_TOVAROV, "ID", "TOVAR", prodazhi.TOVAR);
     return(View(prodazhi));
 }
コード例 #4
0
        //
        // GET: /Prodazhi/Details/5

        public ViewResult Details(long id)
        {
            PRODAZHI prodazhi = db.PRODAZHI.Find(id);

            return(View(prodazhi));
        }
コード例 #5
0
        //
        // GET: /Prodazhi/Delete/5

        public ActionResult Delete(long id)
        {
            PRODAZHI prodazhi = db.PRODAZHI.Find(id);

            return(View(prodazhi));
        }