Пример #1
0
    private void BindData(long SchemeID)
    {
        DataTable dt = new DAL.Tables.T_ElectronTicketAgentSchemes().Open("SchemeNumber, DateTime, Amount, LotteryNumber, Multiple, state", " ID =" + SchemeID.ToString(), "");

        if ((dt == null) || (dt.Rows.Count < 1))
        {
            PF.GoError(ErrorNumber.Unknow, "参数错误", "Agent_ElectronTicket_Scheme");

            return;
        }

        string t_str = dt.Rows[0]["LotteryNumber"].ToString();

        lbSchemeNumber.Text = dt.Rows[0]["SchemeNumber"].ToString();
        lbDateTime.Text = dt.Rows[0]["DateTime"].ToString();
        lbAmount.Text = dt.Rows[0]["Amount"].ToString();
        lbMultiple.Text = dt.Rows[0]["Multiple"].ToString();

        string state = dt.Rows[0]["state"].ToString();

        lbState.Text = "失败";
        if (state == "1")
        {
            lbState.Text = "成功";
        }


        DataTable dtLotteryNumber = new DAL.Tables.T_ElectronTicketAgentSchemesElectronTickets().Open("Ticket, identifiers", " SchemeID=" + SchemeID.ToString(), "");

        if ((dtLotteryNumber == null) || dtLotteryNumber.Rows.Count < 1)
        {
            dtLotteryNumber = new DAL.Tables.T_ElectronTicketAgentSchemesElectronTickets().Open("Ticket, identifiers", " SchemeID=" + SchemeID.ToString(), "");

            if ((dtLotteryNumber == null) || dtLotteryNumber.Rows.Count < 1)
            {
                return;
            }
        }

        dtLotteryNumber.Columns.Add("count", typeof(System.String));

        for (int i = 0; i < dtLotteryNumber.Rows.Count; i++)
        {
            dtLotteryNumber.Rows[i]["count"] = (i + 1).ToString();
            dtLotteryNumber.AcceptChanges();
        }

        RpElectronTicket.DataSource = dtLotteryNumber;
        RpElectronTicket.DataBind();
    }
Пример #2
0
 private void BindData(long SchemeID)
 {
     DataTable table = new Tables.T_ElectronTicketAgentSchemes().Open("SchemeNumber, DateTime, Amount, LotteryNumber, Multiple, state", " ID =" + SchemeID.ToString(), "");
     if ((table == null) || (table.Rows.Count < 1))
     {
         PF.GoError(1, "参数错误", "Agent_ElectronTicket_Scheme");
     }
     else
     {
         table.Rows[0]["LotteryNumber"].ToString();
         this.lbSchemeNumber.Text = table.Rows[0]["SchemeNumber"].ToString();
         this.lbDateTime.Text = table.Rows[0]["DateTime"].ToString();
         this.lbAmount.Text = table.Rows[0]["Amount"].ToString();
         this.lbMultiple.Text = table.Rows[0]["Multiple"].ToString();
         string str = table.Rows[0]["state"].ToString();
         this.lbState.Text = "失败";
         if (str == "1")
         {
             this.lbState.Text = "成功";
         }
         DataTable table2 = new Tables.T_ElectronTicketAgentSchemesElectronTickets().Open("Ticket, identifiers", " SchemeID=" + SchemeID.ToString(), "");
         if ((table2 == null) || (table2.Rows.Count < 1))
         {
             table2 = new Tables.T_ElectronTicketAgentSchemesElectronTickets().Open("Ticket, identifiers", " SchemeID=" + SchemeID.ToString(), "");
             if ((table2 == null) || (table2.Rows.Count < 1))
             {
                 return;
             }
         }
         table2.Columns.Add("count", typeof(string));
         for (int i = 0; i < table2.Rows.Count; i++)
         {
             table2.Rows[i]["count"] = (i + 1).ToString();
             table2.AcceptChanges();
         }
         this.RpElectronTicket.DataSource = table2;
         this.RpElectronTicket.DataBind();
     }
 }
Пример #3
0
    protected void btnGO_Step2_Click(object sender, EventArgs e)
    {
        btnGO_Step1.AlertText = "";

        if (ddlLottery.SelectedValue == SLS.Lottery.ZCDC.sID)
        {
            Shove._Web.JavaScript.Alert(this.Page, "足彩单场不支持分步开奖。");

            return;
        }

        tbWinNumber.Text = Shove._Convert.ToDBC(tbWinNumber.Text.Trim().Replace(" ", " ")).Trim();

        if (!new SLS.Lottery()[int.Parse(ddlLottery.SelectedValue)].AnalyseWinNumber(tbWinNumber.Text))
        {
            Shove._Web.JavaScript.Alert(this.Page, "开奖号码不正确!");

            return;
        }

        SystemOptions so = new SystemOptions();
        bool isCompareWinMoneyNoWithFax = so["isCompareWinMoneyNoWithFax"].ToBoolean(true);

        double[] WinMoneyList = new double[g.Rows.Count * 2];

        for (int i = 0; i < g.Rows.Count; i++)
        {
            WinMoneyList[i * 2] = Shove._Convert.StrToDouble(((TextBox)g.Rows[i].Cells[1].FindControl("tbMoney")).Text, 0);
            WinMoneyList[i * 2 + 1] = Shove._Convert.StrToDouble(((TextBox)g.Rows[i].Cells[2].FindControl("tbMoneyNoWithTax")).Text, 0);

            if (WinMoneyList[i * 2] < 0)
            {
                Shove._Web.JavaScript.Alert(this.Page, "第 " + (i + 1).ToString() + " 项奖金输入错误!");

                return;
            }

            if (WinMoneyList[i * 2] < WinMoneyList[i * 2 + 1])
            {
                if (isCompareWinMoneyNoWithFax)
                {
                    Shove._Web.JavaScript.Alert(this.Page, "第 " + (i + 1).ToString() + " 项税后奖金输入错误(不能大于税前奖金)!");

                    return;
                }
            }
        }

        if (Shove._Convert.ToTextCode(tbOpenAffiche.Value.Trim()) == "")
        {
            Shove._Web.JavaScript.Alert(this.Page, "请输入开奖公告!");

            return;
        }

        DataTable dt = new DAL.Tables.T_ElectronTicketAgentSchemes().Open("*", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and WinMoney is null and state = 1", "[ID]");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

            return;
        }

        DAL.Tables.T_ElectronTicketAgentSchemes t_ElectronTicketAgentSchemes = new DAL.Tables.T_ElectronTicketAgentSchemes();

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            string LotteryNumber = dt.Rows[i]["LotteryNumber"].ToString();
            string Description = "";
            double WinMoneyNoWithTax = 0;

            double WinMoney = new SLS.Lottery()[int.Parse(ddlLottery.SelectedValue)].ComputeWin(LotteryNumber, tbWinNumber.Text.Trim(), ref Description, ref WinMoneyNoWithTax, int.Parse(dt.Rows[i]["PlayTypeID"].ToString()), WinMoneyList);

            t_ElectronTicketAgentSchemes.WinMoney.Value = WinMoney * Shove._Convert.StrToInt(dt.Rows[i]["Multiple"].ToString(), 1);
            t_ElectronTicketAgentSchemes.WinMoneyWithoutTax.Value = WinMoneyNoWithTax * Shove._Convert.StrToInt(dt.Rows[i]["Multiple"].ToString(), 1);
            t_ElectronTicketAgentSchemes.WinDescription.Value = Description;

            t_ElectronTicketAgentSchemes.Update("[ID] =" + dt.Rows[i]["ID"].ToString());
        }

        dt = new DAL.Tables.T_ElectronTicketAgentSchemes().Open("top 1 * ", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and state = 1 and WinMoney is null", "[ID]");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", this.GetType().BaseType.FullName);

            return;
        }

        Step2IsOpen = (dt.Rows.Count > 0);

        btnGO_Step2.Enabled = Step2IsOpen;
        btnGO_Step3.Enabled = (!Step2IsOpen);

        string Message = "请再次执行第二步";

        if (!Step2IsOpen)
        {
            Message = "开奖步骤二已经完成,请执行第三步.";
        }

        Shove._Web.JavaScript.Alert(this.Page, Message);
    }
Пример #4
0
    public DataSet QueryBetting(long AgentID, DateTime TimeStamp, string Sign, string SchemeNumber)
    {
        new Log("Agent\\ElectronTicket").Write(String.Format("Method=QueryBetting\tAgentID={0}\tTimeStamp={1}\tSign={2}\tSchemeNumber={3}", AgentID, TimeStamp, Sign, SchemeNumber));

        DataSet ds = new DataSet();
        string UseLotteryList = "";
        double Balance = 0;
        short State = 0;

        if (Valid(ref ds, ref UseLotteryList, ref Balance, ref State, AgentID, TimeStamp, Sign, SchemeNumber) < 0)
        {
            return ds;
        }

        DataTable dt = new DAL.Tables.T_ElectronTicketAgentSchemes().Open("[ID], State, BettingDescription", "AgentID = " + AgentID.ToString() + " and SchemeNumber = '" + Shove._Web.Utility.FilteSqlInfusion(SchemeNumber) + "'", "");

        if (dt == null)
        {
            BuildReturnDataSetForError(-9999, "未知错误", ref ds);

            new Log("Agent\\ElectronTicket").Write("未知错误");

            return ds;
        }

        if (dt.Rows.Count < 1)
        {
            BuildReturnDataSetForError(-16, "方案号不存在", ref ds);

            new Log("Agent\\ElectronTicket").Write("方案号不存在");

            return ds;
        }

        long SchemeID = Shove._Convert.StrToLong(dt.Rows[0]["ID"].ToString(), -1);
        short SchemeState = Shove._Convert.StrToShort(dt.Rows[0]["State"].ToString(), -1);
        string BettingDescription = dt.Rows[0]["BettingDescription"].ToString();

        if ((SchemeID < 0) || (SchemeState < 0))
        {
            BuildReturnDataSetForError(-9999, "未知错误", ref ds);

            new Log("Agent\\ElectronTicket").Write("未知错误");

            return ds;
        }

        if (SchemeState == 0)
        {
            BuildReturnDataSetForError(-24, "等待出票", ref ds);

            new Log("Agent\\ElectronTicket").Write("等待出票");

            return ds;
        }

        if (SchemeState >= 2)
        {
            BuildReturnDataSetForError(-13, "出票失败(" + BettingDescription + ")", ref ds);

            new Log("Agent\\ElectronTicket").Write("出票失败(" + BettingDescription + ")");

            return ds;
        }

        BuildReturnDataSet(0, ref ds);

        DataTable dtTickets = new DAL.Tables.T_ElectronTicketAgentSchemesSendToCenter().Open("Identifiers as TicketID", "SchemeID = " + SchemeID.ToString(), "[ID]");
        ds.Tables.Add(dtTickets);

        return ds;
    }
Пример #5
0
    public DataSet GetSchemeTickets(long AgentID, DateTime TimeStamp, string Sign, string SchemeNumber)
    {
        new Log("Agent\\ElectronTicket").Write(String.Format("Method=GetSchemeTickets\tAgentID={0}\tTimeStamp={1}\tSign={2}\tSchemeNumber={3}", AgentID, TimeStamp, Sign, SchemeNumber));

        DataSet ds = new DataSet();
        string UseLotteryList = "";
        double Balance = 0;
        short State = 0;

        if (Valid(ref ds, ref UseLotteryList, ref Balance, ref State, AgentID, TimeStamp, Sign, SchemeNumber) < 0)
        {
            return ds;
        }

        DataTable dt = new DAL.Tables.T_ElectronTicketAgentSchemes().Open("[ID]", "AgentID = " + AgentID.ToString() + " and SchemeNumber = '" + Shove._Web.Utility.FilteSqlInfusion(SchemeNumber) + "'", "");

        if ((dt == null) || (dt.Rows.Count < 1))
        {
            BuildReturnDataSetForError(-16, "方案号不存在", ref ds);

            new Log("Agent\\ElectronTicket").Write("方案号不存在");

            return ds;
        }

        long SchemeID = Shove._Convert.StrToLong(dt.Rows[0]["ID"].ToString(), -1);

        if (SchemeID < 0)
        {
            BuildReturnDataSetForError(-16, "方案号不存在", ref ds);

            new Log("Agent\\ElectronTicket").Write("方案号不存在");

            return ds;
        }

        dt = new DAL.Tables.T_ElectronTicketAgentSchemesSendToCenter().Open("Identifiers, Multiple, Money, Ticket, Sends, HandleResult, HandleDescription, WinMoney as Bonus, BonusLevel", "SchemeID = " + SchemeID.ToString(), "[ID]");

        if (dt == null)
        {
            BuildReturnDataSetForError(-9999, "未知错误", ref ds);

            new Log("Agent\\ElectronTicket").Write("未知错误");

            return ds;
        }

        BuildReturnDataSet(0, ref ds);
        ds.Tables.Add(dt);

        return ds;
    }
Пример #6
0
    public DataSet GetUnsuccessfulSchemes(long AgentID, DateTime TimeStamp, string Sign, int LotteryID, string IssueName)
    {
        new Log("Agent\\ElectronTicket").Write(String.Format("Method=GetUnsuccessfulSchemes\tAgentID={0}\tTimeStamp={1}\tSign={2}\tLotteryID={3}\tIssueName={4}", AgentID, TimeStamp, Sign, LotteryID, IssueName));

        DataSet ds = new DataSet();
        string UseLotteryList = "";
        double Balance = 0;
        short State = 0;

        if (Valid(ref ds, ref UseLotteryList, ref Balance, ref State, AgentID, TimeStamp, Sign, LotteryID, IssueName) < 0)
        {
            return ds;
        }

        if (ValidLotteryID(ref ds, UseLotteryList, LotteryID) < 0)
        {
            return ds;
        }

        DataTable dt = new DAL.Tables.T_Isuses().Open("[ID], StartTime, EndTime, State, isOpened", "LotteryID = " + LotteryID.ToString() + "and [Name] = '" + Shove._Web.Utility.FilteSqlInfusion(IssueName) + "'", "");

        if ((dt == null) || (dt.Rows.Count < 1))
        {
            BuildReturnDataSetForError(-4, "奖期不存在", ref ds);

            new Log("Agent\\ElectronTicket").Write("奖期不存在");

            return ds;
        }

        long IsuseID = Shove._Convert.StrToLong(dt.Rows[0]["ID"].ToString(), -1);
        DateTime StartTime = Shove._Convert.StrToDateTime(dt.Rows[0]["StartTime"].ToString(), "1980-1-1 0:0:0");
        short IsuseState = Shove._Convert.StrToShort(dt.Rows[0]["State"].ToString(), -1);

        if (IsuseID < 0)
        {
            BuildReturnDataSetForError(-4, "奖期不存在", ref ds);

            new Log("Agent\\ElectronTicket").Write("奖期不存在");

            return ds;
        }

        DateTime Now = DateTime.Now;

        if ((Now < StartTime) || (IsuseState < 1))
        {
            BuildReturnDataSetForError(-5, "奖期未开启", ref ds);

            new Log("Agent\\ElectronTicket").Write("奖期未开启");

            return ds;
        }

        BuildReturnDataSet(0, ref ds);

        DataTable dtSchemes = new DAL.Tables.T_ElectronTicketAgentSchemes().Open("SchemeNumber, State", "AgentID = " + AgentID.ToString() + " and IsuseID = " + IsuseID.ToString() + " and State <> 1", "[ID]");
        ds.Tables.Add(dtSchemes);

        return ds;
    }
 public DataSet QueryBetting(long AgentID, DateTime TimeStamp, string Sign, string SchemeNumber)
 {
     new Log(@"Agent\ElectronTicket").Write(string.Format("Method=QueryBetting\tAgentID={0}\tTimeStamp={1}\tSign={2}\tSchemeNumber={3}", new object[] { AgentID, TimeStamp, Sign, SchemeNumber }));
     DataSet returnDS = new DataSet();
     string useLotteryList = "";
     double balance = 0.0;
     short state = 0;
     if (this.Valid(ref returnDS, ref useLotteryList, ref balance, ref state, AgentID, TimeStamp, Sign, new object[] { SchemeNumber }) >= 0)
     {
         DataTable table = new Tables.T_ElectronTicketAgentSchemes().Open("[ID], State, BettingDescription", "AgentID = " + AgentID.ToString() + " and SchemeNumber = '" + Utility.FilteSqlInfusion(SchemeNumber) + "'", "");
         if (table == null)
         {
             this.BuildReturnDataSetForError(-9999, "未知错误", ref returnDS);
             new Log(@"Agent\ElectronTicket").Write("未知错误");
             return returnDS;
         }
         if (table.Rows.Count < 1)
         {
             this.BuildReturnDataSetForError(-16, "方案号不存在", ref returnDS);
             new Log(@"Agent\ElectronTicket").Write("方案号不存在");
             return returnDS;
         }
         long num3 = _Convert.StrToLong(table.Rows[0]["ID"].ToString(), -1L);
         short num4 = _Convert.StrToShort(table.Rows[0]["State"].ToString(), -1);
         string str2 = table.Rows[0]["BettingDescription"].ToString();
         if ((num3 < 0L) || (num4 < 0))
         {
             this.BuildReturnDataSetForError(-9999, "未知错误", ref returnDS);
             new Log(@"Agent\ElectronTicket").Write("未知错误");
             return returnDS;
         }
         if (num4 == 0)
         {
             this.BuildReturnDataSetForError(-24, "等待出票", ref returnDS);
             new Log(@"Agent\ElectronTicket").Write("等待出票");
             return returnDS;
         }
         if (num4 >= 2)
         {
             this.BuildReturnDataSetForError(-13, "出票失败(" + str2 + ")", ref returnDS);
             new Log(@"Agent\ElectronTicket").Write("出票失败(" + str2 + ")");
             return returnDS;
         }
         this.BuildReturnDataSet(0L, ref returnDS);
         DataTable table2 = new Tables.T_ElectronTicketAgentSchemesSendToCenter().Open("Identifiers as TicketID", "SchemeID = " + num3.ToString(), "[ID]");
         returnDS.Tables.Add(table2);
     }
     return returnDS;
 }
 public DataSet GetUnsuccessfulSchemes(long AgentID, DateTime TimeStamp, string Sign, int LotteryID, string IssueName)
 {
     new Log(@"Agent\ElectronTicket").Write(string.Format("Method=GetUnsuccessfulSchemes\tAgentID={0}\tTimeStamp={1}\tSign={2}\tLotteryID={3}\tIssueName={4}", new object[] { AgentID, TimeStamp, Sign, LotteryID, IssueName }));
     DataSet returnDS = new DataSet();
     string useLotteryList = "";
     double balance = 0.0;
     short state = 0;
     if (this.Valid(ref returnDS, ref useLotteryList, ref balance, ref state, AgentID, TimeStamp, Sign, new object[] { LotteryID, IssueName }) >= 0)
     {
         if (this.ValidLotteryID(ref returnDS, useLotteryList, LotteryID) < 0)
         {
             return returnDS;
         }
         DataTable table = new Tables.T_Isuses().Open("[ID], StartTime, EndTime, State, isOpened", "LotteryID = " + LotteryID.ToString() + "and [Name] = '" + Utility.FilteSqlInfusion(IssueName) + "'", "");
         if ((table == null) || (table.Rows.Count < 1))
         {
             this.BuildReturnDataSetForError(-4, "奖期不存在", ref returnDS);
             new Log(@"Agent\ElectronTicket").Write("奖期不存在");
             return returnDS;
         }
         long num3 = _Convert.StrToLong(table.Rows[0]["ID"].ToString(), -1L);
         DateTime time = _Convert.StrToDateTime(table.Rows[0]["StartTime"].ToString(), "1980-1-1 0:0:0");
         short num4 = _Convert.StrToShort(table.Rows[0]["State"].ToString(), -1);
         if (num3 < 0L)
         {
             this.BuildReturnDataSetForError(-4, "奖期不存在", ref returnDS);
             new Log(@"Agent\ElectronTicket").Write("奖期不存在");
             return returnDS;
         }
         if ((DateTime.Now < time) || (num4 < 1))
         {
             this.BuildReturnDataSetForError(-5, "奖期未开启", ref returnDS);
             new Log(@"Agent\ElectronTicket").Write("奖期未开启");
             return returnDS;
         }
         this.BuildReturnDataSet(0L, ref returnDS);
         DataTable table2 = new Tables.T_ElectronTicketAgentSchemes().Open("SchemeNumber, State", "AgentID = " + AgentID.ToString() + " and IsuseID = " + num3.ToString() + " and State <> 1", "[ID]");
         returnDS.Tables.Add(table2);
     }
     return returnDS;
 }
 public DataSet GetSchemeTickets(long AgentID, DateTime TimeStamp, string Sign, string SchemeNumber)
 {
     new Log(@"Agent\ElectronTicket").Write(string.Format("Method=GetSchemeTickets\tAgentID={0}\tTimeStamp={1}\tSign={2}\tSchemeNumber={3}", new object[] { AgentID, TimeStamp, Sign, SchemeNumber }));
     DataSet returnDS = new DataSet();
     string useLotteryList = "";
     double balance = 0.0;
     short state = 0;
     if (this.Valid(ref returnDS, ref useLotteryList, ref balance, ref state, AgentID, TimeStamp, Sign, new object[] { SchemeNumber }) >= 0)
     {
         DataTable table = new Tables.T_ElectronTicketAgentSchemes().Open("[ID]", "AgentID = " + AgentID.ToString() + " and SchemeNumber = '" + Utility.FilteSqlInfusion(SchemeNumber) + "'", "");
         if ((table == null) || (table.Rows.Count < 1))
         {
             this.BuildReturnDataSetForError(-16, "方案号不存在", ref returnDS);
             new Log(@"Agent\ElectronTicket").Write("方案号不存在");
             return returnDS;
         }
         long num3 = _Convert.StrToLong(table.Rows[0]["ID"].ToString(), -1L);
         if (num3 < 0L)
         {
             this.BuildReturnDataSetForError(-16, "方案号不存在", ref returnDS);
             new Log(@"Agent\ElectronTicket").Write("方案号不存在");
             return returnDS;
         }
         table = new Tables.T_ElectronTicketAgentSchemesSendToCenter().Open("Identifiers, Multiple, Money, Ticket, Sends, HandleResult, HandleDescription, WinMoney as Bonus, BonusLevel", "SchemeID = " + num3.ToString(), "[ID]");
         if (table == null)
         {
             this.BuildReturnDataSetForError(-9999, "未知错误", ref returnDS);
             new Log(@"Agent\ElectronTicket").Write("未知错误");
             return returnDS;
         }
         this.BuildReturnDataSet(0L, ref returnDS);
         returnDS.Tables.Add(table);
     }
     return returnDS;
 }
Пример #10
0
 protected void btnGO_Step2_Click(object sender, EventArgs e)
 {
     this.btnGO_Step1.AlertText = "";
     if (this.ddlLottery.SelectedValue == "45")
     {
         JavaScript.Alert(this.Page, "足彩单场不支持分步开奖。");
     }
     else
     {
         this.tbWinNumber.Text = _Convert.ToDBC(this.tbWinNumber.Text.Trim().Replace(" ", " ")).Trim();
         if (!new Lottery()[int.Parse(this.ddlLottery.SelectedValue)].AnalyseWinNumber(this.tbWinNumber.Text))
         {
             JavaScript.Alert(this.Page, "开奖号码不正确!");
         }
         else
         {
             SystemOptions options = new SystemOptions();
             bool flag = options["isCompareWinMoneyNoWithFax"].ToBoolean(true);
             double[] winMoneyList = new double[this.g.Rows.Count * 2];
             for (int i = 0; i < this.g.Rows.Count; i++)
             {
                 winMoneyList[i * 2] = _Convert.StrToDouble(((TextBox)this.g.Rows[i].Cells[1].FindControl("tbMoney")).Text, 0.0);
                 winMoneyList[(i * 2) + 1] = _Convert.StrToDouble(((TextBox)this.g.Rows[i].Cells[2].FindControl("tbMoneyNoWithTax")).Text, 0.0);
                 if (winMoneyList[i * 2] < 0.0)
                 {
                     JavaScript.Alert(this.Page, "第 " + ((i + 1)).ToString() + " 项奖金输入错误!");
                     return;
                 }
                 if ((winMoneyList[i * 2] < winMoneyList[(i * 2) + 1]) && flag)
                 {
                     JavaScript.Alert(this.Page, "第 " + ((i + 1)).ToString() + " 项税后奖金输入错误(不能大于税前奖金)!");
                     return;
                 }
             }
             if (_Convert.ToTextCode(this.tbOpenAffiche.Text.Trim()) == "")
             {
                 JavaScript.Alert(this.Page, "请输入开奖公告!");
             }
             else
             {
                 DataTable table = new Tables.T_ElectronTicketAgentSchemes().Open("top 500 *", "IsuseID = " + Utility.FilteSqlInfusion(this.ddlIsuse.SelectedValue) + " and WinMoney is null and state = 1", "[ID]");
                 if (table == null)
                 {
                     PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
                 }
                 else
                 {
                     Tables.T_ElectronTicketAgentSchemes schemes = new Tables.T_ElectronTicketAgentSchemes();
                     for (int j = 0; j < table.Rows.Count; j++)
                     {
                         string number = table.Rows[j]["LotteryNumber"].ToString();
                         string description = "";
                         double winMoneyNoWithTax = 0.0;
                         double num6 = new Lottery()[int.Parse(this.ddlLottery.SelectedValue)].ComputeWin(number, this.tbWinNumber.Text.Trim(), ref description, ref winMoneyNoWithTax, int.Parse(table.Rows[j]["PlayTypeID"].ToString()), winMoneyList);
                         schemes.WinMoney.Value = num6 * _Convert.StrToInt(table.Rows[j]["Multiple"].ToString(), 1);
                         schemes.WinMoneyWithoutTax.Value = winMoneyNoWithTax * _Convert.StrToInt(table.Rows[j]["Multiple"].ToString(), 1);
                         schemes.WinDescription.Value = description;
                         schemes.Update("[ID] =" + table.Rows[j]["ID"].ToString());
                     }
                     this.Step2IsOpen = table.Rows.Count == 500;
                     if (!this.Step2IsOpen)
                     {
                         table = new Tables.T_ElectronTicketAgentSchemes().Open("top 1 * ", "IsuseID = " + Utility.FilteSqlInfusion(this.ddlIsuse.SelectedValue) + " and state = 1 and WinMoney is null", "[ID]");
                         if (table == null)
                         {
                             PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
                             return;
                         }
                         this.Step2IsOpen = table.Rows.Count > 0;
                     }
                     this.btnGO_Step2.Enabled = this.Step2IsOpen;
                     this.btnGO_Step3.Enabled = !this.Step2IsOpen;
                     string msg = "请再次执行第二步";
                     if (!this.Step2IsOpen)
                     {
                         msg = "开奖步骤二已经完成,请执行第三步.";
                     }
                     JavaScript.Alert(this.Page, msg);
                 }
             }
         }
     }
 }