Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Leagues a = new Leagues();

            a.userid = Convert.ToInt32(Session["id"]);
            Random RAND = new Random();

            for (int i = 0; i < a.showLeagues().Count; i++)
            {
                if (!Page.IsPostBack)
                {
                    leagCreate.InnerHtml += @"<tr class=""click-row"" data-href=""#"">
                    <th scope=""row"">" + (i + 1) + @"</th>
 
                     <td>" + a.showLeagues()[i].LeagueName + @"</td>
    
                        <td>" + a.showLeagues()[i].Tourname + @"</td>
       
                           <td>" + RAND.Next(20, 100) + @"+</td>
       
                       </tr>";
                }
            }
            int j = 0;

            foreach (var item in new ParticipantsManager().JoinedLeagues(Convert.ToInt32(Session["id"])))
            {
                if (!Page.IsPostBack)
                {
                    leaguesP.InnerHtml += @"<tr class=""click-row"" data-href=""#"">
                    <th scope=""row"">" + (j + 1) + @"</th>
 
                     <td>" + item.LeagueName + @"</td>
    
                        <td>" + item.Tourname + @"</td>
       
                           <td>" + RAND.Next(20, 100) + @"+</td>
       
                       </tr>";
                    j++;
                }
            }
        }
Beispiel #2
0
        public List <Leagues> listLeague()
        {
            Leagues items = new Leagues();

            return(items.showLeagues());
        }