コード例 #1
0
        public bool Delete(int?Id)
        {
            var idDel = Get(Id);

            if (idDel != null)
            {
                status = _priorityRepository.Delete(Id);
            }
            return(status);
        }
コード例 #2
0
        public ActionResult Delete(int id)
        {
            // Usunięcie priorytetu z repozytorium
            var response = _repository.Delete(id);

            // Sprawdzenie stanu operacji
            if (!response.Accepted && TempData != null)
            {
                foreach (var err in response.Errors)
                {
                    Error(err.Message);
                }
            }
            return(RedirectToAction("Index", "Default", new { ctr = "CampaignPriorities" }));
        }
コード例 #3
0
 public ActionResult Delete(Priority priority)
 {
     _priority.Delete(priority);
     _priority.Commit();
     return(View());
 }
コード例 #4
0
 public IActionResult Delete(int id)
 {
     _priority.Delete(id);
     return(RedirectToAction("Index", "Priority"));
 }