Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (UsuarioLogeado == (null))
                {
                    Response.Redirect("../Login.aspx", false);
                }
                else
                {
                    if (!IsPostBack)
                    {
                        DDLConcurso.Dispose();
                        AccesoDatos.ConcursoDatos COn = new ConcursoDatos();

                        ListItem L = new ListItem();
                        L.Text  = "Seleccione";
                        L.Value = "0";
                        DDLConcurso.Items.Add(L);
                        DDLConcurso.DataSource = COn.ConsultarTodosConcursos(System.Configuration.ConfigurationManager.ConnectionStrings["Concurso"].ToString());
                        DDLConcurso.DataBind();

                        DDLCampaña.Items.Add(L);
                        DDLCampaña.DataBind();
                    }
                }
            }
            catch
            {
                Response.Write("<script>alert('Ha ocurrido un error inesperado, si el problema persiste por favor contáctese con un administrador');</script>");
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (UsuarioLogeado == (null))
                {
                    Response.Redirect("../Login.aspx", false);
                }
                else
                {
                    if (!IsPostBack)
                    {
                        BtnGuardar.Enabled = false;

                        CdEFin.SelectedDate    = DateTime.Now;
                        CdEInicio.SelectedDate = DateTime.Now;

                        DDLConcurso.Dispose();
                        AccesoDatos.ConcursoDatos COn = new ConcursoDatos();

                        DDLConcurso.DataSource = COn.ConsultarTodosConcursos(System.Configuration.ConfigurationManager.ConnectionStrings["Concurso"].ToString());
                        DDLConcurso.DataBind();

                        Id = long.Parse(DDLConcurso.SelectedValue);

                        CargarCampañas();
                    }
                }
            }
            catch
            {
                Response.Write("<script>alert('Ha ocurrido un error inesperado, si el problema persiste por favor contáctese con un administrador');</script>");
            }
        }