示例#1
0
 public bool Delete(int AdvertisementId)
 {
     try
     {
         var advertisement = GetAdvertisementById(AdvertisementId);
         _AdvertisementsRepository.Delete(advertisement.Result);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public ActionResult Delete(int id)
 {
     _advertisementRepository.Delete(id);
     TempData["success"] = "Advertisement has been deleted succesfully";
     return(RedirectToAction("userAdList", "Advertisement"));
 }
 public bool Delete(Advertisement model)
 {
     return(dal.Delete(model));
 }
示例#4
0
 public bool Delete(UserInfo model)
 {
     return(dal.Delete(model));
 }
示例#5
0
 public void Delete(Advertisement entity)
 {
     _advertisementRepository.Delete(entity);
 }
 public void DeleteAdvertisement(long id)
 {
     AdvertisementRepository.Delete(c => c.Id == id);
 }
 protected void DeleteAdvertisement(object sender, EventArgs ev)
 {
     _adRepo.Delete(int.Parse(((Button)sender).CommandArgument));
     BindAds();
 }