/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.rjconsultores.ventaboletos.web.utilerias.render;

import com.rjconsultores.ventaboletos.entidad.CuponConvenio;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;

/**
 *
 * @author Shiro
 */
public class RenderCuponConvenio implements ListitemRenderer {

    public void render(Listitem lstm, Object o) throws Exception {
        CuponConvenio cc = (CuponConvenio) o;

        Listcell lc = new Listcell(cc.getTipoConvenio().getTipoConvenioID().toString());
        lc.setParent(lstm);

        lc = new Listcell(cc.getTipoConvenio().getDescTipo());
        lc.setParent(lstm);

        lc = new Listcell(cc.getFolioInicio().toString());
        lc.setParent(lstm);

        lc = new Listcell(cc.getFolioFinal().toString());
        lc.setParent(lstm);

        lstm.setAttribute("data", cc);
    }

}
