Esempio n. 1
0
        public IActionResult Update(DlViewModel dlModel)
        {
            int    id = Convert.ToInt32(TempData["id"]);
            string rc = PhysicalHelpers.UpdateList(dlModel, id, PhysicalHelpers.SPUPDATELIST);

            TempData["id"] = id;
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public IActionResult Create(DlViewModel dl)
        {
            //todo:  z Create constants for sp for create and update
            //todo: z Call function, passing in the model, and sp name.
            //todo:  z redirect to index to display the new record with ListId
            //todo: z Create page -- add vars containers

            string rc = PhysicalHelpers.UpdateList(dl, listId, PhysicalHelpers.SPUPDATELIST);

            // Int or string?
            TempData["id"]     = Convert.ToInt32(rc);
            TempData["sender"] = PhysicalHelpers.CREATE;
            return(RedirectToAction("Index"));
        }