Esempio n. 1
0
        public ActionResult UpdateCity([DataSourceRequest] DataSourceRequest request, City city)
        {
            if (city != null && ModelState.IsValid)
            {
                DataProvider.Update(city);
            }

            return Json(new[] { city }.ToDataSourceResult(request, ModelState));
        }
Esempio n. 2
0
        public ActionResult DeleteCity([DataSourceRequest] DataSourceRequest request, City city)
        {
            if (city != null)
            {
                DataProvider.Delete(city);
            }

            return Json(new[] { city }.ToDataSourceResult(request, ModelState));
        }