Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <script>
  2. $(document).ready(function () {
  3. $(".btn-eliminar").on("click", function () {
  4. Swal.fire({
  5. title: 'Está seguro que desea eliminar esta Charla?',
  6. text: "No podrá recuperar los datos!",
  7. type: 'warning',
  8. showCloseButton: true,
  9. showCancelButton: true,
  10. confirmButtonColor: '#3085d6',
  11. cancelButtonColor: '#d33',
  12. confirmButtonText: 'Sí, eliminarlo!',
  13. cancelButtonText: 'Cancelar'
  14. }).then(function (isConfirm) {
  15. if (isConfirm) {
  16. Swal.fire(
  17. 'Eliminado!',
  18. 'Se eliminó una charla.',
  19. 'success'
  20. ).then(function () {
  21.  
  22. $.ajax({
  23. type: "POST",
  24. url: '@Url.Action("EliminarCharla", "Charlas")',
  25. data: { id: $(this).parent().siblings(".td-id").text().trim() },
  26. success: function (rpta) {
  27.  
  28. },
  29. error: function (req, textStatus, errorThrown) {
  30. alert('Ooops, something happened: ' + textStatus + ' ' + errorThrown);
  31. }
  32. });
  33.  
  34. });
  35. } else {
  36.  
  37. }
  38. });
  39. });
  40. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement