} break; case 'delete': $flag = false; if (isset($oData['id_producto'])) { $ids = explode(",", $oData['id_producto']); foreach ($ids as $id) { if (!$exp->delete($id)) { $flag = true; } } if ($flag) { $msge = "parent.showMsgeError(\"<div style='font-family:verdana'>Algunos registros no pudieron ser eliminados.</div>\");"; } else { $msge = "parent.showMsgeExito(\"<div style='font-family:verdana'>Éxito!!!</div>\");"; } $data = $exp->getAll(); echo "<script> var data = \"{$data}\";\r\n parent.mygrid.clearAll();\r\n parent.mygrid.parse(data, 'xml');\r\n parent.mygrid.filterByAll();\r\n\t\t\t\t\t\t\t{$msge}\r\n </script>"; exit; } break; case 'imprimir': $expPrint = new ExpertoImpresion(); $text = ""; $text = $exp->printProductos($oData["filtros"]); $expPrint->imprimir(reemplazarCaracteresEspecialesPorAscii($text)); break; case 'toExcel': $exp->toExcel($oData["filtros"]); break; }