public ActionResult Delete(int id) { bool isDelete = _countryManager.Delete(id); if (isDelete) { return(RedirectToAction("Index")); } return(View()); }
public void Delete_DeleteCountry_ReturnTrueResult() { ICountryService countryService = new CountryManager(_mockCountryDal.Object); Country country = new Country() { Id = 1, Name = "Country1", CreateDate = DateTime.Now, Active = true }; var result = countryService.Delete(country); Assert.IsTrue(result.Success); }
private void btnDelete_Click(object sender, EventArgs e) { try { Country co = country.Get(int.Parse(txtCountryCode.Text)); country.Delete(co); MessageBox.Show("Selected Country Successfully Deleted"); RowFocusedIndex = 0; FRM_Country_Load(null, null); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public JsonResult Delete(int id) { _countryManager.Delete(id); return(null); }