Esempio n. 1
0
    protected void igbExcel_Click(object sender, ImageClickEventArgs e)
    {
        DSConosudTableAdapters.ContratoTableAdapter TACont = new DSConosudTableAdapters.ContratoTableAdapter();
        DSConosud.ContratoDataTable dtCont = TACont.GetDataByContratosCompleto();
        Helpers.GenExcell           c      = new Helpers.GenExcell();
        c.DoExcell(Server.MapPath(Request.ApplicationPath) + @"\ReporteExcel.xls", dtCont, this.gvContratos.Columns);

        System.Web.UI.ScriptManager.RegisterStartupScript(upGrilla, this.GetType(), "click", "window.open('ReporteExcel.xls')", true);
    }
Esempio n. 2
0
    protected void igbExcel_Click(object sender, ImageClickEventArgs e)
    {
        DSConosudTableAdapters.EmpresaTableAdapter TAEmp = new DSConosudTableAdapters.EmpresaTableAdapter();
        DSConosud.EmpresaDataTable dtEmp = TAEmp.GetData();
        Helpers.GenExcell          c     = new Helpers.GenExcell();
        c.DoExcell(Server.MapPath(Request.ApplicationPath) + @"\ReporteExcel.xls", dtEmp, this.gvEmpresa.Columns);

        System.Web.UI.ScriptManager.RegisterStartupScript(UpdatePanel1, this.GetType(), "click", "window.open('ReporteExcel.xls')", true);
    }
    protected void igbExcel_Click(object sender, ImageClickEventArgs e)
    {
        DSConosudTableAdapters.ContratoEmpresasTableAdapter TAEmp = new DSConosudTableAdapters.ContratoEmpresasTableAdapter();
        DSConosud.ContratoEmpresasDataTable dtEmp = TAEmp.GetHojasVisor(Convert.ToDateTime(txtInicial.Text), Convert.ToDateTime(txtFinal.Text));
        Helpers.GenExcell c = new Helpers.GenExcell();
        c.DoExcell(Server.MapPath(Request.ApplicationPath) + @"\ReporteExcel.xls", dtEmp, this.gdHojasRuta.Columns);

        System.Web.UI.ScriptManager.RegisterStartupScript(UpdatePanel1, this.GetType(), "click", "window.open('ReporteExcel.xls')", true);
    }