コード例 #1
0
        protected void SavePrize()
        {
            if (ddPrizeValueType.SelectedValue != Config.PrizeValueAny)
            {
                string stat = prData.CheckPercent();

                if (stat != String.Empty)
                {
                    lblInfo.Text    = stat;
                    lblInfo.Visible = true;
                    return;
                }
            }

            string xml = prData.DataSetToXML(nPrizeNumber, Utils.GetInt(ddCurrency.SelectedValue), Utils.GetInt(ddPrizeValueType.SelectedValue));

            hdnTournamentPrizeXML.Value = xml;
            xmlTournamentPrize          = xml;

            ApiControl oTournament = Config.GetApIEngine();

            if (!oTournament.SetPrizePool(nTournamentID, xmlTournamentPrize))
            {
                ShowError("COM error occured");
                oTournament = null;
                return;
            }
            oTournament       = null;
            lblInfo.Text      = "Tournament Prizes were saved";
            lblInfo.ForeColor = Color.Green;
            lblInfo.Visible   = true;

            Response.Redirect(GetGoBackUrl());
        }