protected void ListBoxClubs_SelectedIndexChanged(object sender, EventArgs e)
    {
        int  clubid = Convert.ToInt32(ListBoxClubs.SelectedValue);
        Club club   = clubDAO.GetClubByID(clubid);

        if (club != null)
        {
            modelToScreen(club);
            viewStateDetailsDisplayed();
            showNoMessage();
        }
    }
Example #2
0
        private void dgMatch_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (dgMatch.SelectedIndex > -1)
            {
                DataRowView dataRow = dgMatch.SelectedItem as DataRowView;
                if (dataRow == null)
                {
                    return;
                }
                Club homeclub = ClubDAO.GetClubByID((int)dataRow["HOMECLUB"]);
                tbHomeclub.Text = homeclub.ClubShortName;
                Club awayclub = ClubDAO.GetClubByID((int)dataRow["AWAYCLUB"]);
                tbAwayclub.Text   = awayclub.ClubShortName;
                tboHomescore.Text = dataRow["HOMESCORE"].ToString();
                tboAwayscore.Text = dataRow["AWAYSCORE"].ToString();
                tbMatchID.Text    = dataRow["MATCHID"].ToString();
                tbMatchDay.Text   = ((DateTime)dataRow["MATCHDAY"]).ToShortDateString();
                tbMatchTime.Text  = (dataRow["MATCHTIME"].ToString());
                tbStadium.Text    = dataRow["STADIUM"].ToString();

                LoadClubByMatch((int)dataRow["MATCHID"]);
                LoadGoalsByMatchID((int)dataRow["MATCHID"]);
            }
        }