Esempio n. 1
0
        public ActionResult Add(LookupCode model)
        {
            if (ModelState.IsValid)
            {
                Context.LookupCode dbitem = new Context.LookupCode();
                model.setDb(dbitem);
                RepoLookup.save(dbitem);

                return(RedirectToAction("Index"));
            }
            return(View("Form", model));
        }
Esempio n. 2
0
        public ActionResult Edit(LookupCode model)
        {
            if (ModelState.IsValid)
            {
                Context.LookupCode dbitem = RepoLookup.FindByPK(model.Id);
                model.setDb(dbitem);
                RepoLookup.save(dbitem);

                return(RedirectToAction("Index"));
            }
            return(View("Form", model));
        }