public ActionResult Create_Predmet(PredmetDB predmetdb)
        {
            if (!redirectNonAdmin())
            {
                return RedirectToAction("Index", "Main");
            }

            if (ModelState.IsValid)
            {
                db.PredmetDB.InsertOnSubmit(predmetdb);
                db.SubmitChanges();
                return RedirectToAction("Index_Predmet");
            }

            return View(predmetdb);
        }
        public ActionResult Edit_Predmet(PredmetDB predmetdb)
        {
            if (!redirectNonAdmin())
            {
                return RedirectToAction("Index", "Main");
            }

            if (ModelState.IsValid)
            {
                //db.Entry(predmetdb).State = EntityState.Modified;

                PredmetDB predmetdbEdit = db.PredmetDB.First(u => u.Id == predmetdb.Id);
                predmetdbEdit.Disciplina = predmetdb.Disciplina;
                db.SubmitChanges();
                return RedirectToAction("Index_Predmet");
            }
            return View(predmetdb);
        }