Exemple #1
0
 public ActionResult DeleteRegion(RegionViewModel viewModel)
 {
     RegionOperationService service = new RegionOperationService(regionRepository,
         viewModel.CityName, viewModel.DistrictName, viewModel.RegionName);
     bool result = service.DeleteOneRegion();
     if (result)
     {
         TempData["success"] = viewModel.DeleteRegionSuccessMessage;
     }
     else
     {
         TempData["error"] = viewModel.DeleteRegionFailMessage;
     }
     return RedirectToAction("Region");
 }
 public bool TestDeleteRegion(int cityId, int districtId, int regionId)
 {
     service = new RegionOperationService(repository,
         "C-" + cityId, "D-" + districtId, "R-" + regionId);
     return service.DeleteOneRegion();
 }