Пример #1
0
 protected void comboTurmaDisciplina_IndexChanged()
 {
     try
     {
         DataTable dtPeriodoCalendario = ACA_TipoPeriodoCalendarioBO.SelecionarPeriodosComMatricula(comboCalendario.Valor, comboTurmaDisciplina.Valor);
         int       tpcId = Convert.ToInt32(hdnTpcId.Value);
         if (tpcId > 0)
         {
             rptCampos.DataSource = dtPeriodoCalendario.Select("tpc_id = " + tpcId).CopyToDataTable();
         }
         else
         {
             rptCampos.DataSource = dtPeriodoCalendario;
         }
         rptCampos.DataBind();
         fdsPeriodoCalendario.Visible = comboCalendario.Valor > 0 && comboTurmaDisciplina.Valor > 0;
         lblNenhumPeriodo.Visible     = fdsPeriodoCalendario.Visible && rptCampos.Items.Count == 0;
         ScriptManager.RegisterStartupScript(Page, typeof(Page), "CarregarPeriodos", "$(document).ready(function() { AjustarCssPeriodos(); });", true);
     }
     catch (Exception ex)
     {
         ApplicationWEB._GravaErro(ex);
         lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o sistema.", UtilBO.TipoMensagem.Erro);
     }
 }