コード例 #1
0
        protected void btnRelatorio_Click1(object sender, EventArgs e)
        {
            TurmasBL turmasBL = new TurmasBL();

            Session["ldsRel"] = turmasBL.PesquisarDiarioDataset(txtEvento.Text, txtTurma.Text, txtDataIni.Text, txtDataFim.Text).Tables[0];

            if (((DataTable)Session["ldsRel"]).Rows.Count != 0)
            {

                ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "WinOpen('/Relatorios/RelTurmasDiario.aspx','',600,915);", true);
            }
            else
            {

                ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "alert('Sua pesquisa não retornou dados.');", true);
            }
        }