示例#1
0
        public IActionResult Update(
            [Bind("" +
                  "ID," +
                  "Date," +

                  "ClinicID," +
                  "TestStripStock," +
                  // TODO, Add your attributes here.  Make sure to include the comma , after the attribute name

                  "")] InventoryModel data)
        {
            if (!ModelState.IsValid)
            {
                return(NotFound());
            }

            //Look up the ID
            var dataExist = Backend.Read(data.ID);

            if (dataExist == null)
            {
                return(NotFound());
            }

            var dataResult = Backend.Update(data);

            if (dataResult == null)
            {
                return(NotFound());
            }

            return(RedirectToAction(nameof(Index)));
        }