Example #1
0
 public ActionResult Edit(int id, ProdavnicaProizvodi proizvodi)
 {
     try
     {
         using (ProdavnicaEntities db = new ProdavnicaEntities())
         {
             db.Entry(proizvodi).State = EntityState.Modified;
             db.SaveChanges();
         }
         return(RedirectToAction("AdminProdavnica"));
     }
     catch
     {
         return(View());
     }
 }
Example #2
0
 public ActionResult Edit1(int id, Korisnik korisnik)
 {
     try
     {
         using (ProdavnicaEntities db = new ProdavnicaEntities())
         {
             db.Entry(korisnik).State = EntityState.Modified;
             db.SaveChanges();
         }
         return(RedirectToAction("Korisnici"));
     }
     catch
     {
         return(View());
     }
 }