protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvped.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvped);
            gvped.DataBind();

            string nameFile = "HistorialPedido";

            //  pass the grid that for exporting ...
            GridViewExportUtil.Export(nameFile + ".xls", gvped);
        }
Ejemplo n.º 2
0
    /// <summary>
    /// Export data to excel
    /// </summary>

    protected void btnExport_Click(object sender, ImageClickEventArgs e)
    {
        BindVesselsDrillReport();
        if (gvVesselsDrill.Rows.Count > 0)
        {
            gvVesselsDrill.GridLines        = GridLines.Both;
            gvVesselsDrill.HeaderRow.Height = 40;
            GridViewExportUtil.Export("VesselDrillSummary.xls", gvVesselsDrill);
            gvVesselsDrill.GridLines = GridLines.None;
        }
    }
Ejemplo n.º 3
0
        /// <summary>
        /// Exportar a excel
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvReturns.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvReturns);
            gvReturns.DataBind();

            string nameFile = "ComisionLider";

            //  pass the grid that for exporting ...
            GridViewExportUtil.Export(nameFile + ".xls", gvReturns);
        }
Ejemplo n.º 4
0
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvReturns.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvReturns);
            gvReturns.DataSource = (DataTable)Session[_nameSessionData];
            gvReturns.DataBind();

            string nameFile = "VentaLiderNuevos";

            //  pass the grid that for exporting ...
            GridViewExportUtil.Export(nameFile + ".xls", gvReturns);
        }
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvReturns.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvReturns);
            gvReturns.DataBind();

            string nameFile = "VentaLiderResumido";

            Decimal[] columna = { 1 };
            //  pass the grid that for exporting ...
            GridViewExportUtil.Export(nameFile + ".xls", gvReturns, false, columna);
        }
Ejemplo n.º 6
0
 protected void btnExportToExcel_Click(object sender, EventArgs e)
 {
     try
     {
         //  exporto la grilla
         GridViewExportUtil.Export("ClienteAuditoria.xls", this.Grid);
     }
     catch (Exception ex)
     {
         ExceptionManager.Instance.HandleException(ex);
     }
 }
Ejemplo n.º 7
0
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvReturns.DataSource  = (DataTable)Session[_nameSessDatavenazonaconsulta];
            gvReturns.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvReturns);
            gvReturns.DataBind();

            string nameFile = "ventadet_cn";

            Decimal[] columna = { 1 };
            //  pass the grid that for exporting ...
            GridViewExportUtil.Export(nameFile + ".xls", gvReturns, false, columna);
        }
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvrel_lider.DataSource  = (DataTable)Session[_nameSessData_lider_asesor];
            gvrel_lider.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvrel_lider);
            gvrel_lider.DataBind();

            string nameFile = "Asesor-Lider";

            Decimal[] _columna_caracter = { 0 };
            //  pass the grid that for exporting ...
            GridViewExportUtil.Export(nameFile + ".xls", gvrel_lider, false, _columna_caracter);
        }
Ejemplo n.º 9
0
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvReturns.DataSource  = (DataTable)Session[_nameSessionData];
            gvReturns.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvReturns);
            gvReturns.DataBind();

            string nameFile = "pago_mov";

            Decimal[] _columna_caracter = { 1, 3, 5 };
            //  pass the grid that for exporting ...
            GridViewExportUtil.Export(nameFile + ".xls", gvReturns, false, _columna_caracter);
        }
Ejemplo n.º 10
0
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvReturns.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvReturns);
            gvReturns.DataSource = (DataSet)Session[_nameSessionData];
            gvReturns.DataBind();

            string nameFile = "PremiosContinuo";

            decimal[] columna = { 3 };
            //  pass the grid that for exporting ...
            GridViewExportUtil.Export(nameFile + ".xls", gvReturns, false, columna);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Handles the Click event of the ExportExcelButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void ExportExcelButton_Click(object sender, EventArgs e)
        {
            var currentPage     = CurrentPageIndex;
            var currentPageSize = PageSize;

            pager.PageSize     = 10000000;
            gvIssues.PageIndex = 1;

            GridViewExportUtil.Export(DateTime.Today.ToString("yyyyMMdd") + "-Issues.xls", gvIssues);

            CurrentPageIndex = currentPage;
            pager.PageSize   = currentPageSize;
        }
Ejemplo n.º 12
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        //Response.ClearContent();
        //Response.AddHeader("content-disposition", "attachment; filename=gvtoexcel.xls");
        //Response.ContentType = "application/excel";
        //System.IO.StringWriter sw = new System.IO.StringWriter();
        //HtmlTextWriter htw = new HtmlTextWriter(sw);
        //gvTenderCases.RenderControl(htw);
        //Response.Write(sw.ToString());
        //Response.End();

        GridViewExportUtil.Export("Tender_Cases.xls", gvTenderCases);
    }
        /// <summary>
        /// Exportar Grid a Excel
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvPays.AllowPaging = false;
            gvPays.ShowFooter  = false;
            GridViewExportUtil.removeFormats(ref gvPays);
            gvPays.DataSourceID = string.Empty;
            DataTable dt = (DataTable)Session[_nameSessionData];

            gvPays.DataSource = dt;
            gvPays.DataBind();

            //  pass the grid that for exporting ...
            GridViewExportUtil.Export("Payments_.xls", gvPays);
        }
Ejemplo n.º 14
0
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvDocTrans.DataSource  = Session[_nameSessionData];
            gvDocTrans.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvDocTrans);
            this.gvDocTrans.DataBind();

            //gvDocTrans.DataBind();

            string nameFile = "Asientos_AQ";

            //  pass the grid that for exporting ...
            GridViewExportUtil.Export(nameFile + ".xls", gvDocTrans);
        }
        /// <summary>
        /// Exportar Grid a Excel
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvLiqs.AllowPaging = false;
            gvLiqs.ShowFooter  = false;
            GridViewExportUtil.removeFormats(ref gvLiqs);
            gvLiqs.DataSourceID = string.Empty;
            DataTable dt = (DataTable)Session[_nameSessDataOri];

            gvLiqs.DataSource = dt;
            gvLiqs.DataBind();

            //  pass the grid that for exporting ...
            GridViewExportUtil.Export("Info_Liq_" + DateTime.Today.ToShortDateString() + "_.xls", gvLiqs);
        }
    protected void btnDescarga_Click(object sender, EventArgs e)
    {
        String tipo_mo = "";

        if (ddlTipoMano.SelectedValue == "370")
        {
            tipo_mo = "MOI";
        }
        else
        {
            tipo_mo = "MOD";
        }
        GridViewExportUtil.Export("Resumen_" + tipo_mo + "_" + DateTime.Now + ".xls", GridView1);
        return;
    }
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            //gvSepLiq.AllowPaging = false;
            //GridViewExportUtil.removeFormats(ref gvSepLiq);
            //gridStatus();
            ////  pass the grid that for exporting ...
            //GridViewExportUtil.Export("LiquidacionesSeparAQUARELLAs.xls", gvSepLiq);

            //  gvReturns.DataSource = Session[_nameSessionData];
            //  gvReturns.DataBind();
            gvReturns.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvReturns);
            gridStatus();
            //  pass the grid that for exporting ...
            GridViewExportUtil.Export("liquidespacho.xls", gvReturns);
        }
    protected void btnExport_Click(object s, EventArgs e)
    {
        gvItemsSplit.GridLines = GridLines.Both;
        ViewState["info"]      = null;

        CustomPager.CurrentPageIndex = 1;
        CustomPager.PageSize         = 5000;
        BindSplittedItems();


        GridViewExportUtil obj = new GridViewExportUtil();

        GridViewExportUtil.Export("ProvisionsLimit.xls", gvItemsSplit, "");

        gvItemsSplit.GridLines = GridLines.None;
    }
Ejemplo n.º 19
0
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvReturns.DataSource  = (DataTable)Session[_nameSessionData];
            gvReturns.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvReturns);
            gvReturns.DataBind();

            string nameFile = "VentaSemanalFz";

            Decimal[] _columna_caracter = { 1 };

            //  pass the grid that for exporting ...
            GridViewExportUtil.Export(nameFile + ".xls", gvReturns, false, _columna_caracter);

            //this.Session[this._nombreSession] = null;
            //sbcargarcrystal();
        }
Ejemplo n.º 20
0
 protected void Lnkexport_Click(object sender, ImageClickEventArgs e)
 {
     if (GridUser.Visible == true)
     {
         if (GridUser.Rows.Count > 0)
         {
             GridViewExportUtil.Export("Tracking.xls", this.GridUser);
         }
     }
     else if (GridUserUtilization.Visible == true)
     {
         if (GridUserUtilization.Rows.Count > 0)
         {
             GridViewExportUtil.Export("UserUtilization.xls", this.GridUserUtilization);
         }
     }
 }
    protected void ListarExportar(string requerimiento, string descripcion, string pdc)
    {
        BL_TBL_RequerimientoSubDetalle obj = new BL_TBL_RequerimientoSubDetalle();
        DataTable dtResultado = new DataTable();

        string proveedor = string.Empty;

        if (ddlProveedor.SelectedIndex == 0)
        {
            proveedor = string.Empty;
        }
        else
        {
            proveedor = ddlProveedor.SelectedValue.ToString();
        }

        string Centro   = string.Empty;
        int    contarCC = Convert.ToInt32(ddlcentro.Items.Count.ToString());

        if (contarCC <= 1)
        {
            Centro = ddlcentro.SelectedValue.ToString();
        }
        else
        {
            if (ddlcentro.SelectedIndex == 0)
            {
                Centro = string.Empty;
            }
            else
            {
                Centro = ddlcentro.SelectedValue.ToString();
            }
        }

        dtResultado = obj.USP_SEL_TBL_VALORIZACION_EQUIPO_MENOR_V2(Centro, proveedor, ddlanio.SelectedValue.ToString(), ddlMes.SelectedValue.ToString(), pdc, requerimiento);
        if (dtResultado.Rows.Count > 0)
        {
            GridView2.DataSource = dtResultado;
            GridView2.DataBind();

            GridViewExportUtil.Export("VALORIZACION_" + DateTime.Now + ".xls", GridView2);
            return;
        }
    }
    protected void btnExportar_Click(object sender, ImageClickEventArgs e)
    {
        string Centro   = string.Empty;
        int    contarCC = Convert.ToInt32(ddlcentro.Items.Count.ToString());

        if (contarCC <= 1)
        {
            Centro = ddlcentro.SelectedValue.ToString();
        }
        else
        {
            if (ddlcentro.SelectedIndex == 0)
            {
                Centro = string.Empty;
            }
            else
            {
                Centro = ddlcentro.SelectedValue.ToString();
            }
        }

        string ESTADO = "0";

        if (ddlEstado.SelectedIndex == 0)
        {
            ESTADO = string.Empty;
        }
        else
        {
            ESTADO = ddlEstado.SelectedValue.ToString();
        }
        BL_TBL_RequerimientoSubDetalle obj = new BL_TBL_RequerimientoSubDetalle();
        DataTable dtResultado = new DataTable();

        dtResultado = obj.USP_SEL_TBL_VALORIZACION_EQUIPO_MENOR_TODO(Centro, "", ESTADO, "", "");
        if (dtResultado.Rows.Count > 0)
        {
            GridView2.DataSource = dtResultado;
            GridView2.DataBind();

            GridViewExportUtil.Export("TARIFAS_" + DateTime.Now + ".xls", GridView2);
            return;
        }
    }
 protected void btnExportToExcel_Click(object sender, System.EventArgs e)
 {
     //GridViewExportUtil.Export("sandsReport.xls", this.GridView1);
     //HyperLink hl = (HyperLink)FormView1.FindControl("HyperLinkBOMParts");
     //GridViewExportUtil.Export("sandsReport.xls", (GridView)this.FindControl("Content2").FindControl("GridView1"));
     cph = (ContentPlaceHolder)Master.FindControl("Content2");
     Trace.Write("can I trace, please");
     if (cph != null)
     {
         Trace.Write("runGridViewExportUtil");
         gv = (GridView)cph.FindControl("GridView1");
         if (gv != null)
         {
             Trace.Write("runGridViewExportUtil");
             GridViewExportUtil.Export("sandsReport.xls", gv);
             Trace.Write("ranGridViewExportUtil");
         }
     }
 }
Ejemplo n.º 24
0
    protected void exportarXLS()
    {
        BL_LOGISTICA obj = new BL_LOGISTICA();
        DataTable    dtResultadoeExcel = new DataTable();

        dtResultadoeExcel = obj.ListarSoped_ReporteGlobal(ddlEmpresa.SelectedValue, lblSplit.Text, lblSplitProyecto.Text);

        gvwAsignacion.DataSource = dtResultadoeExcel;
        gvwAsignacion.DataBind();
        if (gvwAsignacion.Rows.Count > 0)
        {
            GridViewExportUtil.Export("RPT_STATUS" + ".xls", gvwAsignacion);
            return;
        }
        else
        {
            //UC_MessageBox.Show(Page, this.GetType(), "Se encontraron errores al exportar la carga de Reporte");
            //return;
        }
    }
Ejemplo n.º 25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.UserInfo != null && !string.IsNullOrEmpty(this.UserInfo.Id))
     {
         string fields    = PublicMethod.GetString(Request["fields"]);
         string filters   = PublicMethod.GetString(Request["filters"]);
         string tableName = PublicMethod.GetString(Request["tableName"]);
         string sortField = PublicMethod.GetString(Request["sortField"]);
         if (string.IsNullOrEmpty(sortField))
         {
             sortField = "SORTCODE";
         }
         var dt = DbCommonLibary.GetDTByPage(this.RDIFrameworkDbProvider, tableName, filters, sortField, fields, 1, 99999);
         GridViewExportUtil.Export("DataExport-" + DateTime.Now.ToString("yyyyMMddHHmmssffff") + ".xls", dt);
     }
     else
     {
         Response.Write("<h1>亲,你还没有登录哟~!</h1>");
     }
 }
Ejemplo n.º 26
0
        /// <summary>
        /// Click boton de export grid a archivo de excel
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ibExportToExcel_Click(object sender, ImageClickEventArgs e)
        {
            gvSales.AllowPaging = false;
            GridViewExportUtil.removeFormats(ref gvSales);
            gridStatus();

            string nameFile;

            if (chkGroupByWeek.Checked)
            {
                nameFile = "VentaxCategoriaxSemana";
            }
            else
            {
                nameFile = "VentaxCategoria";
            }

            //  pass the grid that for exporting ...
            GridViewExportUtil.Export(nameFile + ".xls", gvSales);
        }
Ejemplo n.º 27
0
    //protected void grdvwRequest_RowEditing(object sender, GridViewEditEventArgs e)
    //{

    //    string  complaintid = grdvwRequest.Rows[e.NewEditIndex].Cells[0].Text;
    //    Session["csmid"] = complaintid;
    //    string myScript;
    //    myScript = "<script language=javascript>javascript:window.open('../reports/ViewcsmData.aspx','popupwindow','width=650,height=400,left=180,top=130,Scrollbars=yes');</script>";
    //    Page.RegisterClientScriptBlock("MyScript", myScript);
    //}
    protected void btnExcel_Click(object sender, EventArgs e)
    {
        //  Master_MasterReports myMaster = (Master_MasterReports)this.Master;
        //  ContentPlaceHolder mpContentPlaceHolder;
        //  mpContentPlaceHolder =
        //(ContentPlaceHolder)Master.FindControl("ContentPlaceHolder1");

        //  string attachment = "attachment; filename=Contacts.xls";
        //  GridView gv = new GridView();
        // // gv = (GridView)mpContentPlaceHolder.FindControl("grdvwRequest");
        //  gv = (GridView)myMaster.FindControl("grdvwRequest");
        //  Response.ClearContent();

        //  Response.AddHeader("content-disposition", attachment);

        //  Response.ContentType = "application/ms-excel";

        //  StringWriter sw = new StringWriter();

        //  HtmlTextWriter htw = new HtmlTextWriter(sw);

        // // grdvwRequest.RenderControl(htw);

        //  Response.Write(sw.ToString());

        //  Response.End();

        //Add Exception handilng try catch change by vishal 21-05-2012
        try
        {
            GridViewExportUtil.Export("callsheet.xls", this.grdvwRequest);
        }
        catch (Exception ex)
        {
            string myScript;
            myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>";
            Page.RegisterClientScriptBlock("MyScript", myScript);
            return;
        }
    }
    protected void btnDescarga_Click(object sender, EventArgs e)
    {
        IDE_REQUERIMIENTO = Session["IDE_REQUERIMIENTO"].ToString();
        BL_MOD_REQUERIMIENTO obj = new BL_MOD_REQUERIMIENTO();
        DataTable            dtResultadoeExcel = new DataTable();

        dtResultadoeExcel = obj.uspSEL_MOD_REQUERIMIENTO_PERSONAL_POR_REQ(Convert.ToInt32(IDE_REQUERIMIENTO));
        if (dtResultadoeExcel.Rows.Count > 0)
        {
            //ExcelHelper.ToExcel(dtResultadoeExcel, "CJI3_" + ddlEstados.SelectedItem + ".xls", Page.Response);

            gvExcel.DataSource = dtResultadoeExcel;
            gvExcel.DataBind();



            GridViewExportUtil.Export("ESTATUS_MOD_" + DateTime.Now + ".xls", gvExcel);
            return;
        }
        else
        {
        }
    }
Ejemplo n.º 29
0
 protected void GridView_Export_Excel(object sender, EventArgs e)
 {
     //GridView_DataBound(GridView1);
     //lblAdminNotes.Text = GridView1.Controls[0].Controls[0].ToString();
     GridViewExportUtil.Export("ARC-Portal-Search.xls", this.GridView2);
 }
Ejemplo n.º 30
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        String fileName = "Car_Category.xls";

        GridViewExportUtil.Export(fileName, this.GridView1);
    }