Exemplo n.º 1
0
        private void btnx_MatchStatus_Click(object sender, EventArgs e)
        {
            int nStatusID = 0;

            if (sender == btnx_Schedule)
            {
                nStatusID = Common.STATUS_SCHEDULE;
            }
            else if (sender == btnx_StartList)
            {
                nStatusID = Common.STATUS_STARTLIST;
            }
            else if (sender == btnx_Running)
            {
                nStatusID = Common.STATUS_RUNNING;
            }
            else if (sender == btnx_Suspend)
            {
                nStatusID = Common.STATUS_SUSPEND;
            }
            else if (sender == btnx_Unofficial)
            {
                nStatusID = Common.STATUS_UNOFFICIAL;
            }
            else if (sender == btnx_Official)
            {
                nStatusID = Common.STATUS_OFFICIAL;
            }
            else if (sender == btnx_Revision)
            {
                nStatusID = Common.STATUS_REVISION;
            }
            else if (sender == btnx_Canceled)
            {
                nStatusID = Common.STATUS_CANCELED;
            }
            else
            {
                return;
            }

            Int32 nResult = OVRDataBaseUtils.ChangeMatchStatus(
                Common.g_nMatchID, nStatusID, Common.g_DataBaseCon, Common.g_Plugin);

            //晋级比赛
            if (sender == btnx_Official)
            {
                //淘汰赛晋级
                OVRDataBaseUtils.AutoProgressMatch(Common.g_nMatchID, Common.g_DataBaseCon, Common.g_Plugin);

                //小组赛计分计算
                Common.dbCalGroupResult(Common.g_nMatchID);
            }

            Common.dbMatchModifyTimeSet();
            RefreshAll();
        }