Skip to content

Instantly share code, notes, and snippets.

@mikote2000
mikote2000 / ordenar_lineas.cs
Created January 10, 2019 09:25
Ordenar líneas
public static List<facturas_lin> ordenarFilas(List<facturas_lin> dr)
{
if (opc_orden_lineas == null)
{
//opc_orden_lineas es un map (array_asociativo) del estilo:
//$_opc_orden_lineas[$_res['comienza_por']] = $_res['posicion'];
//Siendo $_res un resulset de esta consulta: 'select * from opc_orden_lineas'
opc_orden_lineas = Impextrom.cargadoresBBDD.LoadObjects.cargarOrdenLineas();
}
//Aquí inicializo una matriz que tiene como indice 'posicion' y como valor una lista de artículos
@mikote2000
mikote2000 / Clickable-row.js
Created October 6, 2017 07:03
Filas de una tabla clickables
//Ponemos el not #column_edit por si tenemos un td en el que tengamos botones para borrar, copiar, etc.
$(document).ready(function () {
$(".clickable-row td").not('#column_edit').click(function() {
window.document.location = $(this).parent('tr').data("href");
});
});
@mikote2000
mikote2000 / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console