Пример #1
0
    private ExcelFileSpreadsheet prepararExportacionExcelReporteNoVenta(DataTable dt)
    {
        ExcelFileSpreadsheet ss = new ExcelFileSpreadsheet();

        ss.propertyAuthor = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_OPERADOR) + Controller.GeneralController.getCultureIdioma() + " del Peru";
        ss.propertyTitle  = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_APP_NAME) + " - Exportacion de Datos";
        dt.Columns.Remove("item");
        dt.Columns.Remove("congps");
        dt.Columns.Remove("latitud");
        dt.Columns.Remove("longitud");
        dt.Columns.Remove("TOTALROWS");
        dt.Columns.Remove("codigoregistro");
        dt.Columns.Remove("cliente");

        ExcelFileWorksheet ws = new ExcelFileWorksheet();

        ws.sheetTitle = "Reporte de No Ventas";
        ws.sheetName  = "Reporte de No Ventas";
        ws.dtSource   = dt;

        ws.columnHeader.Add("Vendedor");
        ws.columnHeader.Add("Direccion Cliente");
        ws.columnHeader.Add("Fecha Registro");
        ws.columnHeader.Add("Motivo");

        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ss.worksheets.Add(ws);

        return(ss);
    }
Пример #2
0
    private ExcelFileSpreadsheet prepararExportacionExcelReporteOportunidades(DataTable dt)
    {
        ExcelFileSpreadsheet ss = new ExcelFileSpreadsheet();

        ss.propertyAuthor = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_OPERADOR) + Controller.GeneralController.getCultureIdioma() + " del Peru";
        ss.propertyTitle  = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_APP_NAME) + " - Exportacion de Datos";
        try
        {
            dt.Columns.Remove("Retrazo");
            dt.Columns.Remove("IdEtapaActual");
            dt.Columns.Remove("idResponsable");
        }
        catch (Exception)
        {
        }
        try
        {
            dt.Columns.Remove("IdOportunidad1");
            dt.Columns.Remove("IdEtapa");
        }
        catch (Exception)
        {
        }
        //dt.Columns.Remove("tipo");
        //dt.Columns.Remove("TOTALROWS");

        ExcelFileWorksheet ws = new ExcelFileWorksheet();

        ws.sheetTitle = "Reporte Oportunidades";
        ws.sheetName  = "Reporte Oportunidades";
        ws.dtSource   = dt;

        int countColumn = GetColumnCount(dt);

        int diff = countColumn - 0;
        int temp = diff;
        int j    = 0;

        while (j < diff)
        {
            temp = diff - j;
            int    diffTemp   = countColumn - temp;
            String nameColumn = dt.Columns[diffTemp].ToString();
            if (nameColumn.Count() > 3)
            {
                string cod = nameColumn.Substring(0, 3);
                if (cod.Equals(Constantes.ColDinamico))
                {
                    nameColumn = nameColumn.Replace(cod, "");
                }
            }
            ws.columnHeader.Add(nameColumn);
            ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
            j++;
        }
        ;
        ss.worksheets.Add(ws);

        return(ss);
    }
Пример #3
0
    private ExcelFileSpreadsheet prepararExportacionExcelDetalleVisita(DataTable dt, String fecini, String fecfin)
    {
        ExcelFileSpreadsheet ss = new ExcelFileSpreadsheet();

        ss.propertyAuthor = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_OPERADOR) + Controller.GeneralController.getCultureIdioma() + " del Peru";
        ss.propertyTitle  = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_APP_NAME) + " - Exportacion de Datos";

        ExcelFileWorksheet ws = new ExcelFileWorksheet();

        ws.sheetTitle = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.ETI_DET_RVI).Substring(0, 1).ToUpper() + Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.ETI_DET_RVI).Substring(1) + " del " + fecini + " al " + fecfin;
        ws.sheetName  = fecini.Replace('/', '-') + " al " + fecfin.Replace('/', '-');
        ws.dtSource   = dt;

        //ws.columnHeader.Add("IdRegistro");
        ws.columnHeader.Add("Teléfono");
        ws.columnHeader.Add("Usuario");
        ws.columnHeader.Add("Grupo");
        ws.columnHeader.Add("Estados");
        ws.columnHeader.Add("Fecha");
        ws.columnHeader.Add("PuntoInteres");
        ws.columnHeader.Add("GeoCerca");
        ws.columnHeader.Add("Comentario");
        //ws.columnHeader.Add("FlagFoto");
        ws.columnHeader.Add("Latitud");
        ws.columnHeader.Add("Longitud");
        //ws.columnHeader.Add("IdVisista");
        //ws.columnHeader.Add("DesGeo");
        //ws.columnHeader.Add("TamanioTotal");
        //ws.columnHeader.Add("Total");

        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        //ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        //ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        //ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        //ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        //ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        //ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ss.worksheets.Add(ws);

        return(ss);
    }
Пример #4
0
    private ExcelFileSpreadsheet prepararExportacionExcelMonitorZonasDetalle(DataTable dt, string ubicacion, string estado, string fecha)
    {
        ExcelFileSpreadsheet ss = new ExcelFileSpreadsheet();

        ss.propertyAuthor = "";// Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_OPERADOR) + Controller.GeneralController.getCultureIdioma() + " del Peru";
        ss.propertyTitle  = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_APP_NAME) + " - Exportacion de Datos";

        ExcelFileWorksheet ws = new ExcelFileWorksheet();

        ws.sheetTitle = "Monitores de Zonas de Carga " + (estado == "C" ? "Cerrado " + fecha : "En Proceso");
        ws.dtSource   = dt;
        ws.sheetName  = (estado == "C" ? "Cerrado" : "En Proceso");


        int countColumn = GetColumnCount(dt);

        int diff = countColumn - 0;
        int temp = diff;
        int j    = 0;

        while (j < diff)
        {
            temp = diff - j;
            int    diffTemp   = countColumn - temp;
            String nameColumn = dt.Columns[diffTemp].ToString();
            if (nameColumn.Count() > 3)
            {
                string cod = nameColumn.Substring(0, 3);
                if (cod.Equals(Constantes.ColDinamico))
                {
                    nameColumn = nameColumn.Replace(cod, "");
                }
            }
            ws.columnHeader.Add(nameColumn);
            ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
            j++;
        }
        ss.worksheets.Add(ws);

        return(ss);
    }
Пример #5
0
    private ExcelFileSpreadsheet prepararExportacionExcelEnvios(DataTable dt, String fecini, String fecfin)
    {
        ExcelFileSpreadsheet ss = new ExcelFileSpreadsheet();

        ss.propertyAuthor = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_OPERADOR) + Controller.GeneralController.getCultureIdioma() + " del Peru";
        ss.propertyTitle  = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_APP_NAME) + " - Exportacion de Datos";

        ExcelFileWorksheet ws = new ExcelFileWorksheet();

        ws.sheetTitle = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.ETI_MSJ_PLU).Substring(0, 1).ToUpper() + Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.ETI_MSJ_PLU).Substring(1) + " del " + fecini + " al " + fecfin;
        ws.sheetName  = fecini.Replace('/', '-') + " al " + fecfin.Replace('/', '-');
        ws.dtSource   = dt;

        ws.columnHeader.Add("Id");
        ws.columnHeader.Add("Número");
        ws.columnHeader.Add("Usuario");
        ws.columnHeader.Add("Fecha Envio");
        ws.columnHeader.Add("Fecha Recepción");
        ws.columnHeader.Add("Fecha Lectura");
        ws.columnHeader.Add("Mensaje");
        ws.columnHeader.Add("Estado");
        ws.columnHeader.Add("Control");
        ws.columnHeader.Add("Valor");

        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);

        ss.worksheets.Add(ws);

        return(ss);
    }
Пример #6
0
    private ExcelFileSpreadsheet prepararExportacionExcelServicios(DataTable dt, String fecini, String fecfin)
    {
        ExcelFileSpreadsheet ss = new ExcelFileSpreadsheet();

        ss.propertyAuthor = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_OPERADOR) + Controller.GeneralController.getCultureIdioma() + " del Peru";
        ss.propertyTitle  = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_APP_NAME) + " - Exportacion de Datos";

        ExcelFileWorksheet ws = new ExcelFileWorksheet();

        ws.sheetTitle = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.ETI_SUP_PLU).Substring(0, 1).ToUpper() + Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.ETI_SUP_PLU).Substring(1) + " del " + fecini + " al " + fecfin;
        ws.sheetName  = fecini.Replace('/', '-') + " al " + fecfin.Replace('/', '-');
        ws.dtSource   = dt;

        ws.columnHeader.Add("Número");
        ws.columnHeader.Add("Nombre");
        ws.columnHeader.Add("Bateria");
        ws.columnHeader.Add("Señal");
        ws.columnHeader.Add("Fecha");
        ws.columnHeader.Add("Estado");
        ws.columnHeader.Add("GPS");
        ws.columnHeader.Add("Network");
        ws.columnHeader.Add("Datos");
        ws.columnHeader.Add("WiFi");
        ws.columnHeader.Add("Tiene Ubicación");

        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ss.worksheets.Add(ws);

        return(ss);
    }
Пример #7
0
    private ExcelFileSpreadsheet prepararExportacionExcelReporteInicioVenta(DataTable dt)
    {
        ExcelFileSpreadsheet ss = new ExcelFileSpreadsheet();

        ss.propertyAuthor = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_OPERADOR) + Controller.GeneralController.getCultureIdioma() + " del Peru";
        ss.propertyTitle  = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_APP_NAME) + " - Exportacion de Datos";

        dt.Columns.Remove("item");
        dt.Columns.Remove("congps");
        dt.Columns.Remove("latitud");
        dt.Columns.Remove("longitud");
        dt.Columns.Remove("tipo");
        dt.Columns.Remove("supervisor");
        dt.Columns.Remove("direccion");
        dt.Columns.Remove("fechafin");
        dt.Columns.Remove("condicionventa");
        dt.Columns.Remove("TOTALROWS");

        ExcelFileWorksheet ws = new ExcelFileWorksheet();

        ws.sheetTitle = "Reporte Inicio Ventas";
        ws.sheetName  = "Reporte Inicio Ventas";
        ws.dtSource   = dt;

        ws.columnHeader.Add("Cod. Pedido.");
        ws.columnHeader.Add("Vendedor");
        ws.columnHeader.Add("Cliente");
        ws.columnHeader.Add("Hora de Inicio");
        ws.columnHeader.Add("Monto Total");

        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ss.worksheets.Add(ws);

        return(ss);
    }
Пример #8
0
    private ExcelFileSpreadsheet prepararExportacionExcelReporteTracking(DataTable dt)
    {
        ExcelFileSpreadsheet ss = new ExcelFileSpreadsheet();

        ss.propertyAuthor = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_OPERADOR) + Controller.GeneralController.getCultureIdioma() + " del Peru";
        ss.propertyTitle  = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_APP_NAME) + " - Exportacion de Datos";

        ExcelFileWorksheet ws = new ExcelFileWorksheet();

        ws.sheetTitle = "Reporte de Tracking";
        ws.sheetName  = "Reporte de Tracking";
        ws.dtSource   = dt;

        ws.columnHeader.Add("Tipo");
        ws.columnHeader.Add("Codigo");
        ws.columnHeader.Add("Codigo Vendedor");
        ws.columnHeader.Add("Nombre Vendedor");
        ws.columnHeader.Add("Codigo CLiente");
        ws.columnHeader.Add("Nombre Cliente");
        ws.columnHeader.Add("Monto");
        ws.columnHeader.Add("Motivo");
        ws.columnHeader.Add("Latitud");
        ws.columnHeader.Add("Longitud");

        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ss.worksheets.Add(ws);

        return(ss);
    }
Пример #9
0
    private ExcelFileSpreadsheet prepararExportacionExcelResumenVisita(DataTable dt, String fecini, String fecfin)
    {
        ExcelFileSpreadsheet ss = new ExcelFileSpreadsheet();

        ss.propertyAuthor = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_OPERADOR) + Controller.GeneralController.getCultureIdioma() + " del Peru";
        ss.propertyTitle  = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.WEB_APP_NAME) + " - Exportacion de Datos";

        ExcelFileWorksheet ws = new ExcelFileWorksheet();

        ws.sheetTitle = Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.ETI_REP_RVI).Substring(0, 1).ToUpper() + Model.bean.IdiomaCultura.getMensaje(Model.bean.IdiomaCultura.ETI_REP_RVI).Substring(1) + " del " + fecini + " al " + fecfin;
        ws.sheetName  = fecini.Replace('/', '-') + " al " + fecfin.Replace('/', '-');
        ws.dtSource   = dt;

        ws.columnHeader.Add("Teléfono");
        ws.columnHeader.Add("Usuario");
        ws.columnHeader.Add("Grupo");
        ws.columnHeader.Add("Fecha");
        ws.columnHeader.Add("DesGeo");
        ws.columnHeader.Add("Estados");
        ws.columnHeader.Add("Inicio");
        ws.columnHeader.Add("Último");
        ws.columnHeader.Add("Fotos");

        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ws.columnFormat.Add(ExcelFileCellFormat.TEXT);
        ss.worksheets.Add(ws);

        return(ss);
    }