public ActionResult Edit([Bind(Include = "NalogID,Username,Password,JMBG,SlikaID")] Nalog nalog) { if (ModelState.IsValid) { db.Entry(nalog).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_JMBG = new SelectList(db.Korisnik, "JMBG", "Ime", nalog.JMBG); ViewBag.FK_SlikaID = new SelectList(db.Slika, "SlikaID", "Link", nalog.SlikaID); return(View(new ViewDataContainer(nalog, new AdminView()))); }
public ActionResult Edit([Bind(Include = "SlikaID,Link")] Slika slika) { if (ModelState.IsValid) { db.Entry(slika).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(new ViewDataContainer(slika, new AdminView()))); }
public ActionResult Edit([Bind(Include = "Broj_racunaNB,Stanje_racuna,Poslednja_uplata")] Nasa_banka nasa_banka) { if (ModelState.IsValid) { db.Entry(nasa_banka).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(new ViewDataContainer(nasa_banka, new AdminView()))); }
public ActionResult Edit([Bind(Include = "PartnerID,Naziv,Procenat_zarade,Datum_pocetka_poslovanja,Kategorija,SlikaID")] Partner partner) { if (ModelState.IsValid) { db.Entry(partner).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_SlikaID = new SelectList(db.Slika, "SlikaID", "Link", partner.SlikaID); return(View(new ViewDataContainer(partner, new AdminView()))); }
public ActionResult Edit([Bind(Include = "PoslovnicaID,Adresa,Broj_telefona,PartnerID")] Poslovnica poslovnica) { if (ModelState.IsValid) { db.Entry(poslovnica).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_PartnerID = new SelectList(db.Partner, "PartnerID", "Naziv", poslovnica.PartnerID); return(View(new ViewDataContainer(poslovnica, new AdminView()))); }
public ActionResult Edit([Bind(Include = "ArtikalId,NazivArtikla,CenaArtikla,FkSlikaId")] Artikal artikal) { if (ModelState.IsValid) { db.Entry(artikal).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_SlikaID = new SelectList(db.Slika, "SlikaId", "Link", artikal.SlikaID); return(View(new ViewDataContainer(artikal, new AdminView()))); }
public ActionResult Edit([Bind(Include = "ReklamacijaID,RacunID,Opis")] Reklamacija reklamacija) { if (ModelState.IsValid) { db.Entry(reklamacija).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_RacunID = new SelectList(db.Racun, "RacunID", "Adresa", reklamacija.RacunID); return(View(new ViewDataContainer(reklamacija, new AdminView()))); }
public ActionResult Edit([Bind(Include = "Broj_racuna,Naziv_banke,Vlasnik_racuna,Datum_isteka,JMBG")] Racuni_banke racuni_banke) { if (ModelState.IsValid) { db.Entry(racuni_banke).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_JMBG = new SelectList(db.Korisnik, "JMBG", "Ime", racuni_banke.JMBG); return(View(new ViewDataContainer(racuni_banke, new AdminView()))); }
public ActionResult Edit([Bind(Include = "ReklamaID,Naziv_kupca,Datum_isteka,SlikaID")] Reklama reklama) { if (ModelState.IsValid) { db.Entry(reklama).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_SlikaID = new SelectList(db.Slika, "SlikaID", "Link", reklama.SlikaID); return(View(new ViewDataContainer(reklama, new AdminView()))); }
public ActionResult Edit([Bind(Include = "JMBG,Ime,Prezime,Telefon,E_mail,Broj_RacunaNB")] Korisnik korisnik) { if (ModelState.IsValid) { db.Entry(korisnik).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_Broj_RacunaNB = new SelectList(db.Nasa_banka, "Broj_racunaNB", "Broj_racunaNB", korisnik.Broj_RacunaNB); return(View(new ViewDataContainer(korisnik, new AdminView()))); }
public ActionResult Edit([Bind(Include = "Niz_artikla_racunID,Kolicina,RacunID,ArtikalID")] Niz_Artikala_Racun niz_Artikala_Racun) { if (ModelState.IsValid) { db.Entry(niz_Artikala_Racun).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_ArtikalID = new SelectList(db.Artikal, "ArtikalID", "Naziv_artikla", niz_Artikala_Racun.ArtikalID); ViewBag.FK_RacunID = new SelectList(db.Racun, "RacunID", "Adresa", niz_Artikala_Racun.RacunID); return(View(new ViewDataContainer(niz_Artikala_Racun, new AdminView()))); }
public ActionResult Edit([Bind(Include = "Stanje,PoslovnicaID,ArtikalID")] Artikal_U_Poslovnici artikal_U_Poslovnici) { if (ModelState.IsValid) { db.Entry(artikal_U_Poslovnici).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_ArtikalID = new SelectList(db.Artikal, "ArtikalID", "Naziv_artikla", artikal_U_Poslovnici.ArtikalID); ViewBag.FK_PoslovnicaID = new SelectList(db.Poslovnica, "PoslovnicaID", "Adresa", artikal_U_Poslovnici.PoslovnicaID); return(View(new ViewDataContainer(artikal_U_Poslovnici, new AdminView()))); }
public ActionResult Edit([Bind(Include = "VozacID,ZaposleniID,NalogID")] Vozac vozac) { if (ModelState.IsValid) { db.Entry(vozac).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_NalogID = new SelectList(db.Nalog, "NalogID", "Username", vozac.NalogID); ViewBag.FK_ZaposleniID = new SelectList(db.Zaposleni, "ZaposleniID", "JMBG", vozac.ZaposleniID); return(View(new ViewDataContainer(vozac, new AdminView()))); }
public ActionResult Edit([Bind(Include = "ZaposleniID,JMBG,Administrator")] Zaposleni zaposleni) { if (ModelState.IsValid) { db.Entry(zaposleni).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_JMBG = new SelectList(db.Korisnik, "JMBG", "Ime", zaposleni.JMBG); ViewBag.Administrator = new SelectList(db.Zaposleni, "ZaposleniID", "JMBG", zaposleni.Administrator); return(View(new ViewDataContainer(zaposleni, new AdminView()))); }
public ActionResult Edit([Bind(Include = "RacunID,Datum_izdavanja,Iznos,KupacID,VozacID,Adresa")] Racun racun) { if (ModelState.IsValid) { db.Entry(racun).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_KupacID = new SelectList(db.Kupac, "KupacID", "JMBG", racun.KupacID); ViewBag.FK_VozacID = new SelectList(db.Vozac, "VozacID", "VozacID", racun.VozacID); return(View(new ViewDataContainer(racun, new AdminView()))); }
public ActionResult Edit([Bind(Include = "KupacID,JMBG,NalogID")] Kupac kupac) { if (ModelState.IsValid) { db.Entry(kupac).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_JMBG = new SelectList(db.Korisnik, "JMBG", "Ime", kupac.JMBG); ViewBag.FK_NalogID = new SelectList(db.Nalog, "NalogID", "Username", kupac.NalogID); return(View(new ViewDataContainer(kupac, new AdminView()))); }