Exemple #1
0
        public ActionResult dodajBroj(upis Customer)
        {
            _context.upis.Add(Customer);
            _context.SaveChanges();

            return(RedirectToAction("Index", "Home"));
        }
Exemple #2
0
        public ActionResult edit(upis Customer)
        {
            var cusotmerInDb = _context.upis.Single(c => c.id == Customer.id);

            cusotmerInDb.ime          = Customer.ime;
            cusotmerInDb.prezime      = Customer.prezime;
            cusotmerInDb.brojAdrese   = Customer.brojAdrese;
            cusotmerInDb.brojTelefona = Customer.brojTelefona;
            cusotmerInDb.adresa       = Customer.adresa;
            cusotmerInDb.grad         = Customer.grad;
            cusotmerInDb.zemlja       = Customer.zemlja;

            _context.SaveChanges();

            return(RedirectToAction("Index", "Home"));
        }