예제 #1
0
 public ActionResult Edit(Model.Model.Country country)
 {
     if (ModelState.IsValid)
     {
         _CountryService.Update(country);
         return(RedirectToAction("Index"));
     }
     return(View(country));
 }
예제 #2
0
 //
 // GET: /Country/Delete/5
 public ActionResult Delete(long id)
 {
     Model.Model.Country country = _CountryService.GetById(id);
     if (country == null)
     {
         return(HttpNotFound());
     }
     return(View(country));
 }
예제 #3
0
 public ActionResult Create(Model.Model.Country country)
 {
     // TODO: Add insert logic here
     if (ModelState.IsValid)
     {
         _CountryService.Create(country);
         return(RedirectToAction("Index"));
     }
     return(View(country));
 }
예제 #4
0
 public ActionResult Delete(long id, FormCollection data)
 {
     Model.Model.Country country = _CountryService.GetById(id);
     _CountryService.Delete(country);
     return(RedirectToAction("Index"));
 }