Exemplo n.º 1
0
        public SimpleResponse Delete(AddressDto dto)
        {
            var response = new SimpleResponse();

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

            return(response);
        }
Exemplo n.º 2
0
        public IActionResult DeletePost(int addressId)
        {
            var response = iAddressBusiness.Delete(addressId);

            if (response.ResponseCode > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError(string.Empty, response.ResponseMessage);
                return(RedirectToAction("Delete", new { addressId }));
            }
        }
Exemplo n.º 3
0
 public virtual JsonResult Delete(int addressId) => Json(_addressBusiness.Delete(addressId));
Exemplo n.º 4
0
        public IHttpActionResult Delete(int addressId)
        {
            var result = iAddressBusiness.Delete(addressId);

            return(Json(result));
        }
Exemplo n.º 5
0
        public SimpleResponse Delete(int addressId)
        {
            var result = iAddressBusiness.Delete(addressId);

            return(result);
        }
 public void Delete(int id)
 {
     _addressBusiness.Delete(id);
 }