Ejemplo n.º 1
0
 protected void btnExport_Click(object sender, EventArgs e)
 {
     Response.Clear();
     Response.AddHeader("content-disposition", "attachment;filename = Process.xls");
     Response.ContentType = "application/vnd.xls";
     System.IO.StringWriter       stringWrite = new System.IO.StringWriter();
     System.Web.UI.HtmlTextWriter htmlWrite   =
         new HtmlTextWriter(stringWrite);
     GrdProcessCompletedScheduleStatus.AllowPaging = false;
     BindGrdProcessCompletedScheduleStatus();
     GrdProcessCompletedScheduleStatus.RenderControl(htmlWrite);
     Response.Write(stringWrite.ToString());
     Response.End();
 }
Ejemplo n.º 2
0
 protected void BindGrdProcessCompletedScheduleStatus()
 {
     try
     {
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@OPR", "44"),
             new SqlParameter("@ScheduleTypeId", "1"),
             new SqlParameter("@ShiftCode", lblshift.Text.Trim())
         };
         DataTable Dt = new DataTable();
         Dt = DBClass.GetDatatable_WithParam(param, "DM_SP_GET_DATA");
         GrdProcessCompletedScheduleStatus.DataSource = Dt;
         GrdProcessCompletedScheduleStatus.DataBind();
     }
     catch (Exception ex)
     {
         _logger.Error(string.Concat("BindGrdProcessCompletedScheduleStatus::", ex.Message), ex);
     }
 }