public async Task <IActionResult> StateDelete( Guid countryId, Guid stateId, int crp = 1, int returnPageNumber = 1) { var state = await dataManager.FetchGeoZone(stateId); if (state != null) { await dataManager.DeleteGeoZone(state); this.AlertWarning(string.Format( sr["The state {0} was successfully deleted."], state.Name) , true); } return(RedirectToAction("StateListPage", new { countryId = countryId, crp = crp, pageNumber = returnPageNumber })); }
public async Task <IActionResult> StateDelete( Guid countryGuid, Guid guid, int crp = 1, int returnPageNumber = 1) { IGeoZone state = await dataManager.FetchGeoZone(guid); if (state != null) { bool result = await dataManager.DeleteGeoZone(state); if (result) { this.AlertWarning(string.Format( "The state <b>{0}</b> was successfully deleted.", state.Name) , true); } } return(RedirectToAction("StateListPage", new { countryGuid = countryGuid, crp = crp, pageNumber = returnPageNumber })); }