예제 #1
0
        public ActionResult Delete(int id)
        {
            var entity = _experienceService.GetById(id);

            _experienceService.Delete(entity);

            return(NoContent());
        }
예제 #2
0
        public IActionResult ExperienceDelete(int id)
        {
            var experienceToBeDeleted = _ExperienceService.GetById(id);

            if (experienceToBeDeleted != null)
            {
                _ExperienceService.Delete(experienceToBeDeleted);
            }

            return(Redirect("/social/experiencelist"));
        }
예제 #3
0
        public IActionResult ConfirmedDeleteExperience(int experienceId)
        {
            var entity = _experienceService.GetById(experienceId);

            if (entity != null)
            {
                _experienceService.Delete(entity);
            }
            TempData.Put("message", new ResultMessage()
            {
                Title   = "Bildirim",
                Message = "Tecrübe Bilgisi başarılı bir şekilde silindi.",
                Css     = "success"
            });
            return(RedirectToAction("Experiences"));
        }
예제 #4
0
        public ActionResult DeleteExperience(int id, int ExperienceId)
        {
            Candidate c = candidateService.GetById(id);

            for (int i = 0; i < c.Experiences.Count; i++)
            {
                if (c.Experiences.ElementAt(i).ExperienceId == ExperienceId)
                {
                    c.Experiences.Remove(c.Experiences.ElementAt(i));
                    break;
                }
            }
            candidateService.Update(c);
            candidateService.Commit();
            Experience e = experienceService.GetById(ExperienceId);

            experienceService.Delete(e);
            experienceService.Commit();
            return(RedirectToAction("Details", new { id }));
        }
 public IActionResult Delete(Experience exp)
 {
     var result = _experienceService.Delete(exp);
     return result.Success ? Ok(result) : BadRequest(result.Message);
 }
예제 #6
0
 public ActionResult Delete([FromRoute] int systemUserId, [FromRoute] int id)
 {
     _experienceService.Delete(systemUserId, id);
     return(Ok(MessageHelper.Success("The experience has been deleted.")));
 }