Esempio n. 1
0
    private void BindData()
    {
        if (ddlIsuse.Items.Count < 1)
        {
            return;
        }

        DataTable dt = new DAL.Views.V_Schemes().Open("", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Buyed = 1 and SchemeIsOpened = 0", "");

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

            return;
        }

        dt.Columns.Add("LocateWaysAndMultiples", System.Type.GetType("System.String"));

        if (ddlIsuse.SelectedValue == SZJS.Lottery.ZCDC.sID)
        {
            string BuyContent = "";
            string CnLocateWaysAndMultiples = "";

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows[i]["Money"]    = double.Parse(dt.Rows[i]["Money"].ToString()).ToString("N");
                dt.Rows[i]["Multiple"] = 0;
                try
                {
                    BuyContent = "";
                    CnLocateWaysAndMultiples = "";

                    if (new SZJS.Lottery()[SZJS.Lottery.ZCDC.sID].GetSchemeSplit(dt.Rows[i]["LotteryNumber"].ToString(), ref BuyContent, ref CnLocateWaysAndMultiples))
                    {
                        dt.Rows[i]["LocateWaysAndMultiples"] = CnLocateWaysAndMultiples;
                    }
                    else
                    {
                        dt.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                    }
                }
                catch
                {
                    dt.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                }

                dt.AcceptChanges();
            }
        }

        g.DataSource = dt.DefaultView;
        g.DataBind();
    }
Esempio n. 2
0
    private void BindData()
    {
        if (ddlIsuse.Items.Count < 1)
        {
            return;
        }

        string SQL = "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Buyed = 1 and SchemeIsOpened = 0";

        if (ddlState.Visible)
        {
            if (ddlState.SelectedValue == "未计算")
            {
                SQL += "and not exists (select SchemeID from T_BuyWays where V_Schemes.ID = T_BuyWays.SchemeID) and PlayTypeID between 7200 and 7300";
            }
            else if (ddlState.SelectedValue == "已计算")
            {
                SQL += "and exists (select SchemeID from T_BuyWays where V_Schemes.ID = T_BuyWays.SchemeID) and PlayTypeID between 7200 and 7300";
            }
        }

        DataTable dt = new DAL.Views.V_Schemes().Open("", SQL, "");

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

            return;
        }

        dt.Columns.Add("LocateWaysAndMultiples", System.Type.GetType("System.String"));

        if (ddlLottery.SelectedValue == SLS.Lottery.ZCDC.sID)
        {
            string BuyContent = "";
            string CnLocateWaysAndMultiples = "";

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows[i]["Money"]    = double.Parse(dt.Rows[i]["Money"].ToString()).ToString("N");
                dt.Rows[i]["Multiple"] = 0;
                try
                {
                    BuyContent = "";
                    CnLocateWaysAndMultiples = "";

                    if (new SLS.Lottery()[SLS.Lottery.ZCDC.sID].GetSchemeSplit(dt.Rows[i]["LotteryNumber"].ToString(), ref BuyContent, ref CnLocateWaysAndMultiples))
                    {
                        dt.Rows[i]["LocateWaysAndMultiples"] = CnLocateWaysAndMultiples;
                    }
                    else
                    {
                        dt.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                    }
                }
                catch
                {
                    dt.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                }

                dt.AcceptChanges();
            }
        }
        else if (ddlLottery.SelectedValue == "72")
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (dt.Rows[i]["LotteryNumber"].ToString().IndexOf("A0") >= 0)
                {
                    dt.Rows[i]["PlayTypeName"] = dt.Rows[i]["PlayTypeName"].ToString() + "**" + "单关";
                }
                else
                {
                    dt.Rows[i]["PlayTypeName"] = dt.Rows[i]["PlayTypeName"].ToString() + "**" + "过关";
                }

                dt.Rows[i]["LotteryNumber"] = "查看详细信息";
            }
        }

        g.DataSource = dt.DefaultView;
        g.DataBind();
    }
Esempio n. 3
0
    private void BindData()
    {
        if (ddlIsuse.Items.Count < 1)
        {
            return;
        }

        string SQL = "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Buyed = 1 and SchemeIsOpened = 0";

        if (ddlState.Visible)
        {
            if (ddlState.SelectedValue == "未计算")
            {
                SQL += "and not exists (select SchemeID from T_BuyWays where V_Schemes.ID = T_BuyWays.SchemeID) and PlayTypeID between 7200 and 7300";
            }
            else if (ddlState.SelectedValue == "已计算")
            {
                SQL += "and exists (select SchemeID from T_BuyWays where V_Schemes.ID = T_BuyWays.SchemeID) and PlayTypeID between 7200 and 7300";
            }
        }

        DataTable dt = new DAL.Views.V_Schemes().Open("", SQL, "");

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

            return;
        }

        dt.Columns.Add("LocateWaysAndMultiples", System.Type.GetType("System.String"));

        if (ddlLottery.SelectedValue == SLS.Lottery.ZCDC.sID)
        {
            string BuyContent = "";
            string CnLocateWaysAndMultiples = "";

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows[i]["Money"] = double.Parse(dt.Rows[i]["Money"].ToString()).ToString("N");
                dt.Rows[i]["Multiple"] = 0;
                try
                {
                    BuyContent = "";
                    CnLocateWaysAndMultiples = "";

                    if (new SLS.Lottery()[SLS.Lottery.ZCDC.sID].GetSchemeSplit(dt.Rows[i]["LotteryNumber"].ToString(), ref BuyContent, ref CnLocateWaysAndMultiples))
                    {
                        dt.Rows[i]["LocateWaysAndMultiples"] = CnLocateWaysAndMultiples;
                    }
                    else
                    {
                        dt.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                    }
                }
                catch
                {
                    dt.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                }

                dt.AcceptChanges();
            }
        }
        else if (ddlLottery.SelectedValue == "72")
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (dt.Rows[i]["LotteryNumber"].ToString().IndexOf("A0") >= 0)
                {
                    dt.Rows[i]["PlayTypeName"] = dt.Rows[i]["PlayTypeName"].ToString() + "**" + "单关";
                }
                else
                {
                    dt.Rows[i]["PlayTypeName"] = dt.Rows[i]["PlayTypeName"].ToString() + "**" + "过关";
                }

                dt.Rows[i]["LotteryNumber"] = "查看详细信息";
            }
        }

        g.DataSource = dt.DefaultView;
        g.DataBind();
    }
 private void BindData()
 {
     if (this.ddlIsuse.Items.Count >= 1)
     {
         DataTable table = new Views.V_Schemes().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.ddlIsuse.SelectedValue) + " and Buyed = 1 and SchemeIsOpened = 0", "");
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", "Admin_OpenManual");
         }
         else
         {
             table.Columns.Add("LocateWaysAndMultiples", Type.GetType("System.String"));
             if (this.ddlIsuse.SelectedValue == "45")
             {
                 string buyContent = "";
                 string cnLocateWaysAndMultiples = "";
                 for (int i = 0; i < table.Rows.Count; i++)
                 {
                     table.Rows[i]["Money"] = double.Parse(table.Rows[i]["Money"].ToString()).ToString("N");
                     table.Rows[i]["Multiple"] = 0;
                     try
                     {
                         buyContent = "";
                         cnLocateWaysAndMultiples = "";
                         if (new Lottery()["45"].GetSchemeSplit(table.Rows[i]["LotteryNumber"].ToString(), ref buyContent, ref cnLocateWaysAndMultiples))
                         {
                             table.Rows[i]["LocateWaysAndMultiples"] = cnLocateWaysAndMultiples;
                         }
                         else
                         {
                             table.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                         }
                     }
                     catch
                     {
                         table.Rows[i]["LocateWaysAndMultiples"] = "<font color='red'>读取错误!</font>";
                     }
                     table.AcceptChanges();
                 }
             }
             this.g.DataSource = table.DefaultView;
             this.g.DataBind();
         }
     }
 }