예제 #1
0
 private void LogisticaStockMinListarPL()
 {
     try
     {
         GLogisticaStockMin.DataSource = LogisticaStockMinNego.LogisticaStockMinListarCDatos(txtFecha1.Text, txtFecha2.Text, ddlList.Text);
         GLogisticaStockMin.DataBind();
     }
     catch (SqlException ex)
     {
         throw new Exception(ex.Message);
     }
 }
예제 #2
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            Response.Clear();
            Response.Buffer = true;
            Response.ClearContent();
            Response.ClearHeaders();
            Response.Charset = "";
            string         FileName       = "StockMinimo" + DateTime.Now + ".xls";
            StringWriter   strwritter     = new StringWriter();
            HtmlTextWriter htmltextwrtter = new HtmlTextWriter(strwritter);

            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.ContentType = "application/vnd.ms-excel";
            Response.AddHeader("Content-Disposition", "attachment;filename=" + FileName);
            GLogisticaStockMin.GridLines             = GridLines.Both;
            GLogisticaStockMin.HeaderStyle.Font.Bold = true;
            GLogisticaStockMin.RenderControl(htmltextwrtter);
            Response.Write(strwritter.ToString());
            Response.End();
        }