Exemplo n.º 1
0
        private void GenerateMatchGroup_Load(object sender, EventArgs e)
        {
            asc.Initialize(this);

            // 初始化男子,女子个人团体每组人数
            this.cbMenAndWomenEveryGroupNum.SelectedItem = "4";

            // 初始化双打每组人数
            this.cbDoubleEveryGroupNum.SelectedItem = "3";

            // 初始化组别选择
            var allGroups = MatchGroupTableDAL.GetAllGroups(MatchId);

            this.cbGroupNames.DataSource = allGroups;
        }
        private void RecordScore_Load(object sender, EventArgs e)
        {
            // 修改人员的button是否显示
            if (RecordByGroup)
            {
                this.lbAddAthlete.Visible = false;
                this.lbDelete.Visible     = false;
            }

            // 初始化组别选择
            var allGroups = MatchGroupTableDAL.GetAllGroups(MatchId);

            this.cbGroupNames.DataSource = allGroups;

            // 初始化项目
            var projects = new string[] { "男子组", "女子组", "混双", "男双", "女双" };

            this.cbProjectNames.DataSource = projects;

            // 初始化比赛信息
            var matchInfo = MatchDAL.GetMatchInfoById(MatchId);

            MatchInfo = matchInfo;

            // 初始化轮数
            var rounds = new List <int>();

            for (int i = 1; i <= MatchInfo.PreRounds; i++)
            {
                rounds.Add(i);
            }

            this.cbRounds.DataSource = rounds;

            var preFinal = new List <string>()
            {
                "预赛", "决赛"
            };

            this.cbPreFinal.DataSource = preFinal;

            SetTable(IsFinal);
        }