示例#1
0
        private void lbAcademies_SelectedIndexChanged(object sender, EventArgs e)
        {
            BJJEvent evt = (BJJEvent)lbEvents.SelectedItem;

            lbCompetitorsByAcademy.DataSource    = evt.GetCompetitorsByAcademy((string)lbAcademies.SelectedItem);
            lbCompetitorsByAcademy.DisplayMember = "DisplayName";
        }
示例#2
0
 private void lbEvents_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (lbEvents.SelectedIndex >= 0)
     {
         BJJEvent evt = (BJJEvent)lbEvents.SelectedItem;
         lbCompetitors.DataSource    = evt.Competitors.OrderBy(item => item.Name).ToList();
         lbCompetitors.DisplayMember = "DisplayName";
         lbAcademies.DataSource      = evt.GetAcademyList();
     }
 }
示例#3
0
        public void GetAllBrackets()
        {
            BJJEvent evt = (BJJEvent)lbEvents.SelectedItem;

            foreach (BJJCompetitor competitor in evt.Competitors)
            {
                string      s   = postData("https://bjjcomp.com/lib/fighterschedulequery.php", "event=" + evt.ID + "&competitorid=" + competitor.Id);
                compbracket obj = JsonConvert.DeserializeObject <compbracket>(s);
                competitor.Brackets = obj;
            }
        }
示例#4
0
        private void btnGetCompetitors_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;

            BJJEvent evt = (BJJEvent)lbEvents.SelectedItem;

            for (char c = 'a'; c <= 'z'; c++)
            {
                string s = getData("https://bjjcomp.com/lib/searchcompetitor.php?event=" + evt.ID + "&q=" + c);
                evt.AddCompetitors(s);
            }
            lbCompetitors.DataSource    = evt.Competitors.OrderBy(item => item.Name).ToList();
            lbCompetitors.DisplayMember = "DisplayName";
            lbAcademies.DataSource      = evt.GetAcademyList();
            GetAllBrackets();

            Cursor.Current = Cursors.Default;
        }