示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Reshenie reshenie = db.Reshenies.Find(id);

            db.Reshenies.Remove(reshenie);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "ID_Reshenie,Nom,Opis,ID_Zapros,ID_Sotrudnik")] Reshenie reshenie)
 {
     if (ModelState.IsValid)
     {
         db.Entry(reshenie).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ID_Sotrudnik = new SelectList(db.Sotrudniks, "ID_Sotrudnik", "Fam", reshenie.ID_Sotrudnik);
     ViewBag.ID_Zapros    = new SelectList(db.Zaproes, "ID_Zapros", "Nom", reshenie.ID_Zapros);
     return(View(reshenie));
 }
示例#3
0
        // GET: Reshenies/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Reshenie reshenie = db.Reshenies.Find(id);

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

            if (reshenie == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ID_Sotrudnik = new SelectList(db.Sotrudniks, "ID_Sotrudnik", "Fam", reshenie.ID_Sotrudnik);
            ViewBag.ID_Zapros    = new SelectList(db.Zaproes, "ID_Zapros", "Nom", reshenie.ID_Zapros);
            return(View(reshenie));
        }