Exemple #1
0
    private void IniciarTela()
    {
        IdIdioma = 1;

        HttpCookie cookie = Request.Cookies["_culture"];

        if (cookie != null)
        {
            IdIdioma = Convert.ToInt32(cookie.Value);
        }

        SiglaCultura = DOIdioma.ObterSigla(IdIdioma);

        this.ddlTipoEvento.DataSource     = DOModEvento.ListarTipoEvento(IdIdioma);
        this.ddlTipoEvento.DataTextField  = "Descricao";
        this.ddlTipoEvento.DataValueField = "IdTipoEvento";
        this.ddlTipoEvento.DataBind();
        this.ddlTipoEvento.Items.Insert(0, new ListItem(Resources.Calendario.Evento));

        this.ddlTipoEvento.SelectedIndex = 0;

        this.ddlAno.DataSource = DOModEvento.ListarAnoEvento();
        this.ddlAno.DataBind();

        this.ddlAno.SelectedValue = DateTime.Now.Year.ToString();

        this.ddlAnoPeriodo.DataSource = DOModEvento.ListarAnoPeriodo();
        this.ddlAnoPeriodo.DataBind();

        this.ddlAnoPeriodo.SelectedValue = DateTime.Now.Year.ToString();


        Calendario.VisibleDate = DateTime.Now;

        primeiroDia = Convert.ToDateTime("01/" + DateTime.Now.ToString("MM/yyyy"));
        ultimoDia   = primeiroDia.AddMonths(1).AddDays(-1);
    }