Esempio n. 1
0
        public IActionResult UpdateProductModel(int id)
        {
            OhioModels ohio = repo.GetAllOhio(id);

            repo.UpdateAllOhio(ohio);

            if (ohio == null)
            {
                return(View("OhioNotFound"));
            }
            return(View(ohio));
        }
Esempio n. 2
0
        public IActionResult UpdateProductToDatabase(OhioModels ohio)
        {
            repo.UpdateAllOhio(ohio);

            return(RedirectToAction("ViewOhio", new { id = ohio.ohio_ID }));
        }
Esempio n. 3
0
 public void UpdateAllOhio(OhioModels ohio)
 {
     throw new NotImplementedException();
 }
Esempio n. 4
0
        public IActionResult UpdateAllOhio(OhioModels ohio)
        {
            repo.UpdateAllOhio(ohio);

            return(RedirectToAction("ViewOhio", new { ohio_ID = ohio.ohio_ID }));
        }
Esempio n. 5
0
 public void UpdateOhio(OhioModels ohio)
 {
     _conn.Execute("UPDATE ohio SET Name = @name,Address = @address,Website = @website, Phone = @phone,Email = @email,Assistance = @assistance WHERE ID = @id",
                   new { name = ohio.ohio_Name, address = ohio.ohio_Address, Website = ohio.ohio_Website, phone = ohio.ohio_Phone, email = ohio.ohio_Email, id = ohio.ohio_ID });
 }