protected void ImgBtnExporttoExcel_Click(object sender, ImageClickEventArgs e)
        {
            string stDate  = this.txtStartDate.Text;
            string endDate = this.txtEndDate.Text;
            string message = lblTextandDates.Text;

            ExportRoutines.ExportToExcel(this.Page, "StacksAccessed", message, gvStackAccess);
        }
        protected void ButtonExcel_Click_Click(object sender, ImageClickEventArgs e)
        {
            string stDate  = this.txtStartDate.Text;
            string endDate = this.txtEndDate.Text;
            string message = "Search Keywords Report" + " -  Start Date: " + stDate + "  and " + "End Date: " + endDate;

            ExportRoutines.ExportToExcel(this.Page, "SearchKeyWordReport", message, KwGridView);
        }
        protected void ImgBtnExportSchRsltToExcel_OnClick(object sender, ImageClickEventArgs e)
        {
            this.gvResult.AllowSorting = false;
            this.Export = true;
            string ret = "";

            foreach (DataGridItem c in this.gvResult.Items)
            {
                if (c.ItemType == ListItemType.Item || c.ItemType == ListItemType.AlternatingItem)
                {
                    CheckBox cb = ((CheckBox)c.Cells[7].FindControl("chkSelect"));
                    if (cb.Checked)
                    {
                        if (ret.Length > 0)
                        {
                            ret += ",";
                        }

                        ret += c.Cells[0].Text;
                    }
                }
            }

            if (this.SortExpression == PubEntAdminManager.strDefaultoSearchSorting)
            {
                if (ret.Length == 0)
                {
                    this.BindData_(((PubEntAdmin.BLL.Search)Session[PubEntAdminManager.strSearchCriteria]).PUBIDs);
                }
                else
                {
                    this.BindData_(ret);
                }
            }
            else
            {
                if (ret.Length == 0)
                {
                    this.BindData(((PubEntAdmin.BLL.Search)Session[PubEntAdminManager.strSearchCriteria]).PUBIDs);
                }
                else
                {
                    this.BindData(ret);
                }
            }

            this.gvResult.Columns[7].Visible = false;
            this.Export = false;
            ExportRoutines.ExportToExcel(this.Page, PubEntAdminManager.AdminSearchRptName(), PubEntAdminManager.DefAdminSearchResultRptTitle, this.gvResult);
        }
 protected void ButtonExcel_Click_Click(object sender, ImageClickEventArgs e)
 {
     //ExportToExcel(Server.MapPath("KeyWordReport.xls"), KwGridView);
     ExportRoutines.ExportToExcel(this.Page, "KeyWordReport", "Keywords Report", KwGridView);
 }
Exemple #5
0
 protected void ImgBtnExportSchRsltToExcel_OnClick(object sender, ImageClickEventArgs e)
 {
     gvExcelRpt.Visible = true;
     ExportRoutines.ExportToExcel(this.Page, "Master_Sponsor_Code_List", "<strong>" + PubEntAdminManager.DefAdminSponsorTitle + "</strong>" + " - " + DateTime.Now.ToShortDateString(), this.gvExcelRpt);
     gvExcelRpt.Visible = false;
 }