예제 #1
0
        public SimpleResponse Delete(FilmActorDto dto)
        {
            var response = new SimpleResponse();

            try
            {
                var model = SimpleMapper.Map <FilmActorDto, FilmActorViewModel>(dto);
                response = iFilmActorBusiness.Delete(model);
            }
            catch (Exception ex)
            {
                response.ResponseCode    = BusinessResponseValues.InternalError;
                response.ResponseMessage = "Silme iþleminde hata oluþtu.";
                SimpleFileLogger.Instance.Error(ex);
            }

            return(response);
        }
예제 #2
0
        public ActionResult DeletePost(int actorId, int filmId)
        {
            var response = iFilmActorBusiness.Delete(actorId, filmId);

            if (response.ResponseCode > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError(string.Empty, response.ResponseMessage);
                return(RedirectToAction("Delete", new { actorId, filmId }));
            }
        }
        public SimpleResponse Delete(int actorId, int filmId)
        {
            var result = iFilmActorBusiness.Delete(actorId, filmId);

            return(result);
        }
예제 #4
0
        public IHttpActionResult Delete(int actorId, int filmId)
        {
            var result = iFilmActorBusiness.Delete(actorId, filmId);

            return(Json(result));
        }