Ejemplo n.º 1
0
    protected void ShowGridView_SelectedIndexChanged(object sender, EventArgs e)
    {
        GridViewRow row = ShowGridView.SelectedRow;
        string s_id = ShowGridView.DataKeys[row.RowIndex]["Show_ID"].ToString();
        string c_id = ShowGridView.DataKeys[row.RowIndex]["Club_ID"].ToString();
        string v_id = ShowGridView.DataKeys[row.RowIndex]["Venue_ID"].ToString();
        Show_ID = s_id;
        Common.Show_ID = Show_ID;
        Club_ID = c_id;
        Common.Club_ID = Club_ID;

        PopulateClub(Club_ID);
        PopulateShowGridView(Club_ID);
        PopulateShow(Show_ID);
        divGetOwner.Visible = true;
        if (!string.IsNullOrEmpty(Owner_ID) && !string.IsNullOrEmpty(Show_ID))
        {
            Entrants entrant = new Entrants();
            List<Entrants> tblEntrants;
            Guid person_ID = new Guid(Owner_ID);
            Guid show_ID = new Guid(Show_ID);
            Guid? entrant_ID = null;
            tblEntrants = entrant.GetEntrantsByShow_ID(show_ID, false);
            foreach (Entrants entrantRow in tblEntrants)
            {
                if (entrantRow.Show_ID == show_ID)
                    entrant_ID = entrantRow.Entrant_ID;
            }
            if (entrant_ID != null)
            {
                Entrant_ID = entrant_ID.ToString();
                Common.Entrant_ID = Entrant_ID;
                Guid newEntrant_ID = new Guid(Entrant_ID);
                PopulateEntrant(newEntrant_ID);
                PopulateDogList(newEntrant_ID);
                PopulateOwnerList(newEntrant_ID);
                divDogList.Visible = true;
                divAddCompetitor.Visible = false;
                divUpdateCompetitor.Visible = true;
                PopulateForm();
                People person = new People(person_ID);
                MessageLabel.Text = string.Format("{0} {1} is already entered in this show", person.Person_Forename, person.Person_Surname);
            }
        }
    }
Ejemplo n.º 2
0
 private void PopulateEntryGridView()
 {
     List<Entrants> tblEntrants;
     Entrants entrants = new Entrants();
     Guid show_ID = new Guid(Show_ID);
     tblEntrants = entrants.GetEntrantsByShow_ID(show_ID, true);
     EntryGridView.DataSource = tblEntrants;
     EntryGridView.DataBind();
 }