public JsonResult DeleteRecordbyID(int id)
        {
            UserAddress obj = _IBOUsers.GetAddressById(id);

            if (obj == null)
            {
                _IBOUsers.DeleteRecord(id);
            }
            else
            {
                _IBOUsers.DeleteAddress(obj.address_id);
                _IBOUsers.DeleteRecord(id);
            }
            return(Json(new JsonSerializerSettings()));
        }
예제 #2
0
        public IActionResult DeleteRecord(int id)
        {
            UserAddress obj = _IBOUsers.GetAddressById(id);

            if (obj == null)
            {
                _IBOUsers.DeleteRecord(id);
            }
            else
            {
                _IBOUsers.DeleteAddress(obj.address_id);
                _IBOUsers.DeleteRecord(id);
            }

            return(RedirectToAction("UsersList"));
        }