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

            try
            {
                var model = SimpleMapper.Map <LanguageDto, LanguageViewModel>(dto);
                response = iLanguageBusiness.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 languageId)
        {
            var response = iLanguageBusiness.Delete(languageId);

            if (response.ResponseCode > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError(string.Empty, response.ResponseMessage);
                return(RedirectToAction("Delete", new { languageId }));
            }
        }
예제 #3
0
        public SimpleResponse Delete(int languageId)
        {
            var result = iLanguageBusiness.Delete(languageId);

            return(result);
        }
예제 #4
0
        public IHttpActionResult Delete(int languageId)
        {
            var result = iLanguageBusiness.Delete(languageId);

            return(Json(result));
        }