예제 #1
0
        public ActionResult CreateAttr()
        {
            if (HttpContext.Session.GetObjectFromJson <KorisnikModel>("LogovaniKorisnik") == null)
            {
                return(View("~/Views/Login/Index.cshtml"));
            }

            ViewBagModel      viewBag      = new ViewBagModel();
            GlavnaMasterModel glavnaMaster = GlavnaDAO.GetMasterObjectById(Convert.ToInt32(HttpContext.Session.GetInt32("GlavnaMasterID")));

            viewBag.GlavnaMaster = glavnaMaster;
            viewBag.Glavna.VrstaHomologacije.AtributSet = VrsteHomologacijeDAO.GetAtributSet(VrstaHomologacijeID);
            viewBag.AtributSet = viewBag.Glavna.VrstaHomologacije.AtributSet; // Test Stavio Atribut Set u View Bag Model
            return(View("Create", viewBag));
        }
예제 #2
0
        public ActionResult SaveAttributes(AtributSetModel model)
        {
            try
            {
                if (HttpContext.Session.GetObjectFromJson <KorisnikModel>("LogovaniKorisnik") == null)
                {
                    return(View("~/Views/Login/Index.cshtml"));
                }
            }
            catch (Exception e)
            {
                e.StackTrace.ToString();
            }
            ViewBagModel      viewBag      = new ViewBagModel();
            GlavnaMasterModel glavnaMaster = GlavnaDAO.GetMasterObjectById(Convert.ToInt32(HttpContext.Session.GetInt32("GlavnaMasterID")));

            viewBag.GlavnaMaster = glavnaMaster;
            return(View("Create", viewBag));
        }