Guest User

Untitled

a guest
Dec 12th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. function preguntar(){
  2. const swalWithBootstrapButtons = Swal.mixin({
  3. confirmButtonClass: 'btn btn-success',
  4. cancelButtonClass: 'btn btn-danger',
  5. buttonsStyling: false,
  6. })
  7.  
  8. swalWithBootstrapButtons({
  9. title: 'Desea guardar los registros?',
  10. text: "No podra cancelar la operacion",
  11. type: 'warning',
  12. showCancelButton: true,
  13. confirmButtonText: 'Si, Guardar',
  14. cancelButtonText: 'No, Cancelar!',
  15. reverseButtons: true
  16. }).then((result) => {
  17.  
  18. if (result.value) {
  19. return true
  20. } else if (
  21. // Read more about handling dismissals
  22. result.dismiss === Swal.DismissReason.cancel
  23. ) {
  24. return false
  25. }
  26. })
  27. }
  28.  
  29. Page.ClientScript.RegisterStartupScript(Page.ClientScript.GetType(), "onLoad", "preguna();", true);
  30.  
  31. if(funcion==true){
  32. llamar_funcion_de_asp();
  33. }else{
  34. --terminar_instruccion.
  35. }
Add Comment
Please, Sign In to add comment