Ejemplo n.º 1
0
    protected void ParticipantList_Click(object sender, EventArgs e)
    {
        LinkButton btn = (LinkButton)sender;
        //Response.Write(btn.CommandArgument);
        int participantid = Convert.ToInt32(btn.CommandArgument);

        int        userLoggedId = -1;
        HttpCookie c1           = Request.Cookies["UserID"];

        if (c1 == null)
        {
            //Do nothing
        }
        else
        {
            // not add the same user
            userLoggedId = Convert.ToInt32(c1.Value);
            Participant participant = ParticipantHandler.getInstance().Recover(participantid);
            if (userLoggedId != participant.GetId())
            {
                participantFactory.addItem(participant);
                DataListParticipantsSelected.DataBind();
            }
        }

        /*
         * Application["regNo"] = Convert.ToInt32(btn.Text);
         * Response.Redirect("EditClub.aspx");*/
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        budgetFactory      = BudgetItensFactory.GetInstance();
        participantFactory = ParticipantsFactory.GetInstance();


        if (!IsPostBack)
        {
            DataList1.DataBind();
            DataListParticipantsSelected.DataBind();
        }
    }
Ejemplo n.º 3
0
    protected void ParticipantList_Click(object sender, EventArgs e)
    {
        LinkButton btn = (LinkButton)sender;
        //Response.Write(btn.CommandArgument);
        Participant participant = ParticipantHandler.getInstance().Recover(Convert.ToInt32(btn.CommandArgument));

        participantFactory.addItem(participant);
        DataListParticipantsSelected.DataBind();

        /*
         * Application["regNo"] = Convert.ToInt32(btn.Text);
         * Response.Redirect("EditClub.aspx");*/
    }