示例#1
0
        public IActionResult UrediNarudzbu(UrediNarudzbuVM model)
        {
            Narudzba n = new Narudzba();

            n = db.Narudzba.Where(x => x.Id == model.Id).FirstOrDefault();

            n.Hitnost = model.Hitnost;
            n.Opis    = model.Opis;


            db.Narudzba.Update(n);
            db.SaveChanges();


            return(RedirectToAction("PrikaziNarudzbe"));
        }
示例#2
0
        public IActionResult UrediNarudzbu(int id)
        {
            UrediNarudzbuVM model = new UrediNarudzbuVM();
            Narudzba        n     = new Narudzba();

            n = db.Narudzba.Where(x => x.Id == id).FirstOrDefault();

            model.Id             = id;
            model.Hitnost        = n.Hitnost;
            model.Opis           = n.Opis;
            model.DatumKreiranja = n.DatumKreiranja;



            return(View(model));
        }