Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function iniciarEventos() {
- var Error = "";
- $('.datetimepicker').datetimepicker({
- format: 'YYYY-MM-DD',
- defaultDate: new Date()
- });
- var pJData = [];
- pJData.push({
- usuarioId: usuarioId,
- fechaInicio: "2018-09-01",
- fechaFin: $("#filtroFechaInicio").val(),
- });
- pJData = JSON.stringify(pJData);
- $.ajax({
- type: "POST",
- url: "usuarioDashboard.aspx/CargarTablas",
- data: JSON.stringify({ pJData: pJData }),
- dataType: "json",
- async: false,
- cache: false,
- contentType: "application/json; charset=utf-8",
- success: function (datos) {
- var existeError = datos.d.indexOf('Error');
- if (existeError == -1) {
- datosDashboard = JSON.parse(datos.d);
- console.log(datosDashboard);
- } else {
- Error = datos.d;
- if (Error != "") {
- alert(Error);
- return false;
- }
- }
- },
- error: function (datos) {
- Error = datos.d;
- alert(Error);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement