Exemplo n.º 1
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int         indexInTable     = GridView1.SelectedIndex;
            int         compId           = Convert.ToInt32(GridView1.SelectedRow.Cells[1].Text);
            Competitors competitorToEdit = competitorsContainer.GetCompetitor(compId);

            editName_tb.Text    = competitorToEdit.Name;
            editSurname_tb.Text = competitorToEdit.Surname;
            editYear_tb.Text    = competitorToEdit.Year.ToString();
            editCity_tb.Text    = competitorToEdit.City;
            editCountry_tb.Text = competitorToEdit.Country;

            popupEdit.Show();
        }
        public Competitors CompetitorForEntry()
        {
            Competitors competitors = new Competitors();

            if ((competitors = CompetitorsContainer.GetCompetitor(View.CompetitorId)) != null)
            {
                View.Competitor = competitors;
                return(competitors);
            }
            return(null);
        }