Beispiel #1
0
        protected bool ValidarFecha()
        {
            bool yes = true;

            if (DiaDropDownList.SelectedItem.Text == "Dia" || MesDropDownList.SelectedItem.Text == "Mes" || AnioDropDownList.SelectedItem.Text == "Año")
            {
                Utilitarios.ShowToastr(this, "Favor ingrese su fecha", "Mensaje", "error");
                yes = false;
                DiaDropDownList.Focus();
            }

            return(yes);
        }
Beispiel #2
0
        protected void Cargar()
        {
            NombresTextBox.Focus();
            DiaDropDownList.Items.Add("Dia");
            AnioDropDownList.Items.Add("Año");
            for (int ae = 1; ae <= 31; ae++)
            {
                DiaDropDownList.Items.Add(ae.ToString());
            }
            int aux = DateTime.Now.Year;

            for (int a = aux; a >= (aux - 120); a--)
            {
                AnioDropDownList.Items.Add(a.ToString());
            }

            AnioDropDownList.DataBind();
            DiaDropDownList.DataBind();
        }