Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function () {
- $(".btn-eliminar").on("click", function () {
- Swal.fire({
- title: 'Está seguro que desea eliminar esta Charla?',
- text: "No podrá recuperar los datos!",
- type: 'warning',
- showCloseButton: true,
- showCancelButton: true,
- confirmButtonColor: '#3085d6',
- cancelButtonColor: '#d33',
- confirmButtonText: 'Sí, eliminarlo!',
- cancelButtonText: 'Cancelar'
- }).then(function (isConfirm) {
- if (isConfirm) {
- Swal.fire(
- 'Eliminado!',
- 'Se eliminó una charla.',
- 'success'
- ).then(function () {
- $.ajax({
- type: "POST",
- url: '@Url.Action("EliminarCharla", "Charlas")',
- data: { id: $(this).parent().siblings(".td-id").text().trim() },
- success: function (rpta) {
- },
- error: function (req, textStatus, errorThrown) {
- alert('Ooops, something happened: ' + textStatus + ' ' + errorThrown);
- }
- });
- });
- } else {
- }
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement