Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Program_Ishrane program_Ishrane = db.Program_Ishrane.Find(id);

            db.Program_Ishrane.Remove(program_Ishrane);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "ProgramIshraneId,CenaPrograma,OpisPrograma,KlijentId")] Program_Ishrane program_Ishrane)
 {
     if (ModelState.IsValid)
     {
         db.Entry(program_Ishrane).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.KlijentId = new SelectList(db.Klijent, "KlijentId", "Ime", program_Ishrane.KlijentId);
     return(View(program_Ishrane));
 }
Esempio n. 3
0
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Program_Ishrane program_Ishrane = db.Program_Ishrane.Find(id);

            if (program_Ishrane == null)
            {
                return(HttpNotFound());
            }
            return(View(program_Ishrane));
        }
Esempio n. 4
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Program_Ishrane program_Ishrane = db.Program_Ishrane.Find(id);

            if (program_Ishrane == null)
            {
                return(HttpNotFound());
            }
            ViewBag.KlijentId = new SelectList(db.Klijent, "KlijentId", "Ime", program_Ishrane.KlijentId);
            return(View(program_Ishrane));
        }