/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rjconsultores.ventaboletos.web.utilerias.render;

import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;

import com.rjconsultores.ventaboletos.entidad.TramoKmServicio;

/**
 *
 * @author Desenvolvimento
 */
public class RenderTramoKmServicio implements ListitemRenderer {

    public void render(Listitem lstm, Object o) throws Exception {
        TramoKmServicio tramoKm = (TramoKmServicio) o;

        Listcell lc = new Listcell((tramoKm.getTramokmservicioId() == null) ? "" : tramoKm.getTramokmservicioId().toString());
        lc.setParent(lstm);

        lc = new Listcell((tramoKm.getEmpresa() == null) ? "" : tramoKm.getEmpresa().getNombempresa());
        lc.setParent(lstm);

        lc = new Listcell((tramoKm.getClaseServicio() == null) ? "" : tramoKm.getClaseServicio().getDescclase());
        lc.setParent(lstm);

        lc = new Listcell((tramoKm.getTramo() == null) ? "" : tramoKm.getTramo().getDesctramo());
        lc.setParent(lstm);

        lc = new Listcell((tramoKm.getCantkmpagoconductor() == null) ? "" : tramoKm.getCantkmpagoconductor().setScale(2).toString());
        lc.setParent(lstm);
    }
}
