Beispiel #1
0
 public void SaveNapomena([FromBody] GlavnaMasterModel glavnaMaster)
 {
     try
     {
         glavnaMaster.AutoID = Convert.ToInt32(HttpContext.Session.GetInt32("GlavnaMasterID"));
         GlavnaDAO.UpdateGlavnaMaster(glavnaMaster);
     }
     catch (Exception)
     {
     }
 }
Beispiel #2
0
        public ActionResult Create(GlavnaMasterModel model)
        {
            try
            {
                if (HttpContext.Session.GetObjectFromJson <KorisnikModel>("LogovaniKorisnik") == null)
                {
                    return(View("~/Views/Login/Index.cshtml"));
                }
                model.AutoID = Convert.ToInt32(HttpContext.Session.GetInt32("GlavnaMasterID"));
                GlavnaDAO.UpdateGlavnaMaster(model);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }