Exemple #1
0
        private void FillTeamA()
        {
            clsTeam           e  = new clsTeam();
            clsTeamController ec = new clsTeamController();
            DataTable         dt = new DataTable();

            dt = ec.GetTeamListbyCompetitionID(CompetitionID);
            if (dt.Rows.Count > 0)
            {
                ddlTeamA.DataSource     = dt;
                ddlTeamA.DataTextField  = "TeamName";
                ddlTeamA.DataValueField = "TeamId";
                ddlTeamA.DataBind();
                ddlTeamA.Items.Insert(0, new ListItem("-- Select --", "0"));
                ddlTeamB.Items.Clear();
                //LstTeam = (from DataRow row in dt.Rows

                //           select new Team
                //           {
                //               TeamID = Convert.ToInt32(row["TeamId"]),
                //               TeamName = row["TeamName"].ToString()

                //           }).ToList();
                //ddlTeamB.DataSource = dt;
                //ddlTeamB.DataTextField = "TeamName";
                //ddlTeamB.DataValueField = "TeamId";
                //ddlTeamB.DataBind();
                //ddlTeamB.Items.Insert(0, new ListItem("-- Select --", "0"));
            }
        }
        public void InstanceOK()
        {
            //create an instance of the class we want to create
            clsTeam ATeam = new clsTeam();

            //test to see that it exists
            Assert.IsNotNull(ATeam);
        }
        private void FilTeams()
        {
            clsTeam           objTeam           = new clsTeam();
            clsTeamController objTeamController = new clsTeamController();
            DataTable         dt = new DataTable();

            dt = objTeamController.GetTeamsByNotInTeamID(TeamID);
            if (dt.Rows.Count > 0)
            {
                ddlSelectTeam.DataSource     = dt;
                ddlSelectTeam.DataTextField  = "TeamName";
                ddlSelectTeam.DataValueField = "TeamId";
                ddlSelectTeam.DataBind();
                ddlSelectTeam.Items.Insert(0, new ListItem("-- Select --", "0"));
            }
        }
Exemple #4
0
        private void FillTeamB()
        {
            clsTeam           e  = new clsTeam();
            clsTeamController ec = new clsTeamController();
            DataTable         dt = new DataTable();

            dt = ec.GetTeamDetailByNotInTeamID(Convert.ToInt32(ddlTeamA.SelectedValue.ToString()), CompetitionID);

            if (dt.Rows.Count > 0)
            {
                ddlTeamB.DataSource     = dt;
                ddlTeamB.DataTextField  = "TeamName";
                ddlTeamB.DataValueField = "TeamId";
                ddlTeamB.DataBind();
                ddlTeamB.Items.Insert(0, new ListItem("-- Select --", "0"));
            }
        }