Exemple #1
0
        protected void gvResult_ItemCommand(object source, DataGridCommandEventArgs e)
        {
            string vInactive = ((System.Web.UI.WebControls.Button)(e.CommandSource)).Text;

            if (vInactive == "Delete")
            {
                gvResult_DeleteCommand(source, e);
            }

            if (vInactive == "Rotation Publications")
            {
                string strConfid = ((Label)e.Item.Cells[0].Controls[1]).Text;
                int    confid    = Convert.ToInt32(strConfid);

                string strConfname = ((Label)e.Item.Cells[1].Controls[1]).Text;

                string strDates = ((Label)e.Item.Cells[2].Controls[1]).Text + " - " + ((Label)e.Item.Cells[3].Controls[1]).Text;

                gvRotatPubs.DataSource    = LU_DAL.DisplayRotationPubs(confid);
                gvRotatPubs.EmptyDataText = "Sorry, no publications have been selected for " + strConfname;
                gvRotatPubs.Caption       = "<strong>Rotation Publications for " + strConfname + "</strong><br>" + strDates + "<br><br>";
                gvRotatPubs.DataBind();


                PubEntAdminManager.ExportToExcel(gvRotatPubs, this.Page);

                //PubEntAdminManager.ExportGridViewToExcel(gvRotatPubs, "RotationPublicationsNew", "<strong>Rotation Publications for " + strConfname + "</strong><br>" + strDates, this.Page.Response);


                //ExportRoutines.ExportToExcel(this.Page, "RotationPublications", "<strong>Rotation Publications for " + strConfname + "</strong><br>" + strDates, this.gvRotatPubs);
            }
        }