/*
 * 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.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.vo.bpe.BPeVO;

public class RenderBpe implements ListitemRenderer {

    public void render(Listitem lstm, Object o) throws Exception {
        BPeVO bpe = (BPeVO) o;
        
		Listcell lc = new Listcell(bpe.getNombempresa().toString());
        lc.setParent(lstm);

        lc = new Listcell(bpe.getUf());
        lc.setParent(lstm);
        
        lc = new Listcell(DateUtil.getStringDate(bpe.getFechorventa(), "dd/MM/yyyy HH:mm"));
        lc.setParent(lstm);

        lc = new Listcell(bpe.getNumBpeSerie());
        lc.setParent(lstm);
        
        lc = new Listcell(bpe.getCodstat());
        lc.setParent(lstm);

        lc = new Listcell(bpe.getChbpe());
        lc.setParent(lstm);

        lc = new Listcell(bpe.getMotivo());
        lc.setParent(lstm);
        
        lc = new Listcell(bpe.getErrocontingencia());
        lc.setParent(lstm);

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