예제 #1
0
        // POST: Countries/Edit
        public ActionResult Edit(Country pais)
        {
            var cp = new CountryProcess();

            cp.Edit(pais);
            return(RedirectToAction("Index"));
        }
예제 #2
0
        public ActionResult Edit(int id, FormCollection collection)
        {
            try
            {
                var category = countryProcess.Find(id);
                category.Name      = collection["Name"];
                category.ChangedOn = DateTime.Now;

                countryProcess.Edit(category);

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