Exemplo n.º 1
0
    private void BindData()
    {
        if (ddlLottery.Items.Count < 1)
        {
            return;
        }

        DataTable dt = new DAL.Views.V_SchemeSchedules().Open("", "LotteryID = " + Shove._Web.Utility.FilteSqlInfusion(ddlLottery.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0 and EndTime < GetDate() and not [ID] in (select SchemeID from T_SchemesSendToCenter where HandleResult <> 1)", "[Money] desc");

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

            return;
        }

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

        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");

            if (new SZJS.Lottery()[SZJS.Lottery.ZCDC.sID].CheckPlayType(int.Parse(dt.Rows[i]["PlayTypeID"].ToString())))
            {
                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;
        g.DataBind();
    }
Exemplo n.º 2
0
    protected void btnDownload_txt_Click(object sender, EventArgs e)
    {
        DataTable dt = new DAL.Views.V_Isuses().Open("", "[ID] = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue), "");

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

            return;
        }

        string FileName = dt.Rows[0]["Code"].ToString() + dt.Rows[0]["Name"].ToString() + ".txt";

        dt = new DAL.Views.V_SchemeSchedules().Open("", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0", "[Money] desc");

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

            return;
        }

        if (dt.Rows.Count < 1)
        {
            Shove._Web.JavaScript.Alert(this.Page, "没有数据。");

            return;
        }

        HttpResponse response;

        response = Page.Response;
        response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName);
        Response.ContentType     = "application/ms-txt";
        response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");

        foreach (DataRow dr in dt.Rows)
        {
            string LotteryNumber = dr["LotteryNumber"].ToString();

            response.Write("***********************************************\r\n");
            response.Write("站点编号: " + dr["SiteID"].ToString() + "\r\n");
            response.Write("方案编号: " + dr["SchemeNumber"].ToString() + "\t内部编号:" + dr["ID"].ToString() + "\r\n");
            response.Write("方案类别: " + dr["PlayTypeName"].ToString() + "\r\n");
            response.Write("方案倍数: " + dr["Multiple"].ToString() + "\t方案金额:" + double.Parse(dr["Money"].ToString()).ToString("N") + "\r\n");
            response.Write("***********************************************\r\n");
            response.Write(LotteryNumber);
            response.Write("\r\n\r\n\r\n");
        }

        response.End();
    }
Exemplo n.º 3
0
    protected void btnDownload_Click(object sender, EventArgs e)
    {
        DataTable dt = new DAL.Views.V_Isuses().Open("", "[id] = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue), "");

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

            return;
        }

        string FileName = dt.Rows[0]["Code"].ToString() + dt.Rows[0]["Name"].ToString() + ".xls";

        dt = new DAL.Views.V_SchemeSchedules().Open("", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0", "[Money] desc");

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

            return;
        }

        if (dt.Rows.Count < 1)
        {
            Shove._Web.JavaScript.Alert(this.Page, "没有数据。");

            return;
        }

        HttpResponse response;

        response = Page.Response;
        response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName);
        Response.ContentType     = "application/ms-excel";
        response.ContentEncoding = System.Text.Encoding.GetEncoding("gb2312");
        response.Write("站点编号\t内部编号\t方案编号\t类别\t购买内容\t倍数\t金额\t彩票标识号\n");

        foreach (DataRow dr in dt.Rows)
        {
            string LotteryNumber = "";
            try
            {
                LotteryNumber = "| " + dr["LotteryNumber"].ToString().Replace("\r\n", " | ") + " |";
            }
            catch { }
            response.Write(dr["SiteID"].ToString() + "\t" + dr["ID"].ToString() + "\t" + dr["SchemeNumber"].ToString() + "\t" + dr["PlayTypeName"].ToString() + "\t" + LotteryNumber + "\t" + dr["Multiple"].ToString() + "\t" + dr["Money"].ToString() + "\t<请输入标识号>\n");
        }

        response.End();
    }
 protected void btnDownload_Click(object sender, EventArgs e)
 {
     DataTable table = new Views.V_Isuses().Open("", "[id] = " + Utility.FilteSqlInfusion(this.ddlIsuse.SelectedValue), "");
     if ((table == null) || (table.Rows.Count < 1))
     {
         PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
     }
     else
     {
         string str = table.Rows[0]["Code"].ToString() + table.Rows[0]["Name"].ToString() + ".xls";
         table = new Views.V_SchemeSchedules().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0", "[Money] desc");
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
         }
         else if (table.Rows.Count < 1)
         {
             JavaScript.Alert(this.Page, "没有数据。");
         }
         else
         {
             HttpResponse response = this.Page.Response;
             response.AppendHeader("Content-Disposition", "attachment;filename=" + str);
             base.Response.ContentType = "application/ms-excel";
             response.ContentEncoding = Encoding.GetEncoding("gb2312");
             response.Write("站点编号\t内部编号\t方案编号\t类别\t购买内容\t倍数\t金额\t彩票标识号\n");
             foreach (DataRow row in table.Rows)
             {
                 string str2 = "";
                 try
                 {
                     str2 = "| " + row["LotteryNumber"].ToString().Replace("\r\n", " | ") + " |";
                 }
                 catch
                 {
                 }
                 response.Write(row["SiteID"].ToString() + "\t" + row["ID"].ToString() + "\t" + row["SchemeNumber"].ToString() + "\t" + row["PlayTypeName"].ToString() + "\t" + str2 + "\t" + row["Multiple"].ToString() + "\t" + row["Money"].ToString() + "\t<请输入标识号>\n");
             }
             response.End();
         }
     }
 }
Exemplo n.º 5
0
    protected void btnOkoooDownload_txt_Click(object sender, EventArgs e)
    {
        DataTable dt = new DAL.Views.V_Isuses().Open("", "[ID] = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue), "");

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

            return;
        }

        string FileName = dt.Rows[0]["Code"].ToString() + dt.Rows[0]["Name"].ToString() + ".txt";

        dt = new DAL.Views.V_SchemeSchedules().Open("", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0", "[Money] desc");

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

            return;
        }

        if (dt.Rows.Count < 1)
        {
            Shove._Web.JavaScript.Alert(this.Page, "没有数据。");

            return;
        }

        HttpResponse response;

        response = Page.Response;
        response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName);
        Response.ContentType     = "application/ms-txt";
        response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");

        string CacheKey = "JCZC_Scheme_Bind";

        DataTable dtMatch = Shove._Web.Cache.GetCacheAsDataTable(CacheKey);

        if (dtMatch == null)
        {
            dtMatch = new DAL.Tables.T_Match().Open("ID, MatchNumber, StopSellingTime", "", "");

            if (dtMatch == null)
            {
                return;
            }

            if (dtMatch.Rows.Count < 1)
            {
                return;
            }

            Shove._Web.Cache.SetCache(CacheKey, dtMatch, 3600);
        }

        foreach (DataRow dr in dt.Rows)
        {
            string LotteryNumber = dr["LotteryNumber"].ToString();
            int    PlayTypeID    = Shove._Convert.StrToInt(dr["PlayTypeID"].ToString(), 0);

            ArrayList al = new ArrayList();

            string[] strs       = LotteryNumber.Split('\n');
            string[] strNumbers = null;

            string CanonicalNumber = "";

            if (strs == null)
            {
                return;
            }
            if (strs.Length == 0)
            {
                return;
            }

            for (int i = 0; i < strs.Length; i++)
            {
                if (string.IsNullOrEmpty(strs[i]))
                {
                    continue;
                }

                strNumbers = new SLS.Lottery()[Shove._Convert.StrToInt(PlayTypeID.ToString().Substring(0, PlayTypeID.ToString().Length - 2), 72)].ToSingle(strs[i], ref CanonicalNumber, PlayTypeID);

                if (strNumbers == null)
                {
                    continue;
                }

                for (int j = 0; j < strNumbers.Length; j++)
                {
                    al.Add(strNumbers[j]);
                }
            }

            string[] LotteryNumbers = new string[al.Count];

            StringBuilder sbLotteryNumbers = new StringBuilder();

            for (int i = 0; i < al.Count; i++)
            {
                if (i == al.Count)
                {
                    sbLotteryNumbers.Append(al[i].ToString());
                }
                else
                {
                    sbLotteryNumbers.Append(al[i].ToString() + "\n");
                }

                LotteryNumbers[i] = al[i].ToString();
            }

            int    Multiple = 0;
            string Number   = "";
            string BuyWays  = "";

            foreach (string str in LotteryNumbers)
            {
                if (string.IsNullOrEmpty(str))
                {
                    continue;
                }

                if (str.Split(';').Length < 3)
                {
                    continue;
                }

                try
                {
                    Multiple = Shove._Convert.StrToInt(str.Split(';')[2].Substring(1, str.Split(';')[2].Length - 2).Substring(2), 1);
                }
                catch
                { }

                Number = str.Split(';')[1].Substring(1, str.Split(';')[1].Length - 2);
                string[] Numbers = Number.Split('|');


                if (Numbers.Length == 1)
                {
                    BuyWays = "单关";
                }
                else
                {
                    BuyWays = Numbers.Length.ToString() + "串1";
                }

                long MatchID = 0;

                response.Write(dr["SchemeNumber"].ToString() + "," + PlayTypeName(PlayTypeID) + ",T,");

                for (int i = 0; i < Numbers.Length; i++)
                {
                    if (Numbers[i].IndexOf("(") < 0)
                    {
                        continue;
                    }

                    MatchID = Shove._Convert.StrToLong(Numbers[i].Substring(0, Numbers[i].IndexOf("(")), 1);

                    DataRow[] drMatch = dtMatch.Select("ID=" + MatchID.ToString());

                    if (drMatch.Length < 1)
                    {
                        continue;
                    }

                    response.Write("(" + GetMatchNumber(drMatch[0]["MatchNumber"].ToString()) + ">" + Getesult(PlayTypeID, Numbers[i].Substring(Numbers[i].IndexOf("(") + 1, Numbers[i].IndexOf(")") - Numbers[i].IndexOf("(") - 1)) + ")");
                }

                response.Write("," + BuyWays + "," + Multiple + "," + (2 * Multiple).ToString() + "\r\n");
            }
        }

        response.End();
    }
Exemplo n.º 6
0
    private void BindData()
    {
        if (ddlIsuse.Items.Count < 1)
        {
            return;
        }

        string SQL = "";

        if (ddlType.Visible)
        {
            if (ddlType.SelectedValue == "金额")
            {
                SQL = "Money desc ";
            }
            else if (ddlType.SelectedValue == "过关方式")
            {
                SQL = "PlayTypeID desc ";
            }
            else if (ddlType.SelectedValue == "时间")
            {
                SQL = "SystemEndTime desc ";
            }
        }

        DataTable dt = new DAL.Views.V_SchemeSchedules().Open("", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0 and isOpened = 0", "[Money] desc");

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

            return;
        }

        if (ddlLottery.SelectedValue == "72")
        {
            DataTable dtMatch = new DAL.Tables.T_PassRate().Open("", "", "");
            DataRow[] dr = null;

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

                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() + "**" + "过关";
                }

                string str = dt.Rows[i]["LotteryNumber"].ToString();

                if (string.IsNullOrEmpty(str))
                {
                    continue;
                }

                string Number = str.Split(';')[1].Replace("][", "|").Substring(1, str.Split(';')[1].Length - 2);
                string[] Numbers = Number.Split('|');
                string MatchID = "";

                for (int j = 0; j < Numbers.Length; j++)
                {
                    if (Numbers[j].IndexOf("(") < 0)
                    {
                        continue;
                    }

                    MatchID += Shove._Convert.StrToLong(Numbers[j].Substring(0, Numbers[j].IndexOf("(")), 1).ToString() + ",";
                }

                if (MatchID.EndsWith(","))
                {
                    MatchID = MatchID.Substring(0, MatchID.Length - 1);
                }

                dr = dtMatch.Select("MatchID in (" + MatchID + ")", "StopSellTime");

                if (dr.Length < 1)
                {
                    continue;
                }

                dt.Rows[i]["LotteryNumber"] = "查看详细信息";
                dt.Rows[i]["SystemEndTime"] = dr[0]["StopSellTime"].ToString();

                dt.AcceptChanges();
            }
        }

        DataTable dtNew = dt.Clone();

        DataRow[] drs = dt.Select("",SQL);
        foreach (DataRow dr in drs)
        {
            dtNew.ImportRow(dr);
        }

        g.DataSource = dtNew;
        g.DataBind();

        btnDownload.Enabled = (dt.Rows.Count > 0);
        btnDownload_txt.Enabled = (dt.Rows.Count > 0);

        btnBuyAll.Visible = (dt.Rows.Count > 0);

        fileUp.Disabled = (dt.Rows.Count < 1);
        btnUpload.Enabled = (dt.Rows.Count > 0);
    }
Exemplo n.º 7
0
    protected void btnOkoooDownload_txt_Click(object sender, EventArgs e)
    {
        DataTable dt = new DAL.Views.V_Isuses().Open("", "[ID] = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue), "");

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

            return;
        }

        string FileName = dt.Rows[0]["Code"].ToString() + dt.Rows[0]["Name"].ToString() + ".txt";

        dt = new DAL.Views.V_SchemeSchedules().Open("", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0", "[Money] desc");

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

            return;
        }

        if (dt.Rows.Count < 1)
        {
            Shove._Web.JavaScript.Alert(this.Page, "没有数据。");

            return;
        }

        HttpResponse response;

        response = Page.Response;
        response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName);
        Response.ContentType = "application/ms-txt";
        response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");

        string CacheKey = "JCZC_Scheme_Bind";

        DataTable dtMatch = Shove._Web.Cache.GetCacheAsDataTable(CacheKey);

        if (dtMatch == null)
        {
            dtMatch = new DAL.Tables.T_Match().Open("ID, MatchNumber, StopSellingTime", "", "");

            if (dtMatch == null)
            {
                return;
            }

            if (dtMatch.Rows.Count < 1)
            {
                return;
            }

            Shove._Web.Cache.SetCache(CacheKey, dtMatch, 3600);
        }

        foreach (DataRow dr in dt.Rows)
        {
            string LotteryNumber = dr["LotteryNumber"].ToString();
            int PlayTypeID = Shove._Convert.StrToInt(dr["PlayTypeID"].ToString(), 0);

            ArrayList al = new ArrayList();

            string[] strs = LotteryNumber.Split('\n');
            string[] strNumbers = null;

            string CanonicalNumber = "";

            if (strs == null)
                return;
            if (strs.Length == 0)
                return;

            for (int i = 0; i < strs.Length; i++)
            {
                if (string.IsNullOrEmpty(strs[i]))
                {
                    continue;
                }

                strNumbers = new SLS.Lottery()[Shove._Convert.StrToInt(PlayTypeID.ToString().Substring(0, PlayTypeID.ToString().Length - 2), 72)].ToSingle(strs[i], ref CanonicalNumber, PlayTypeID);

                if (strNumbers == null)
                {
                    continue;
                }

                for (int j = 0; j < strNumbers.Length; j++)
                {
                    al.Add(strNumbers[j]);
                }
            }

            string[] LotteryNumbers = new string[al.Count];

            StringBuilder sbLotteryNumbers = new StringBuilder();

            for (int i = 0; i < al.Count; i++)
            {
                if (i == al.Count)
                {
                    sbLotteryNumbers.Append(al[i].ToString());
                }
                else
                {
                    sbLotteryNumbers.Append(al[i].ToString() + "\n");
                }

                LotteryNumbers[i] = al[i].ToString();
            }

            int Multiple = 0;
            string Number = "";
            string BuyWays = "";

            foreach (string str in LotteryNumbers)
            {
                if (string.IsNullOrEmpty(str))
                {
                    continue;
                }

                if (str.Split(';').Length < 3)
                {
                    continue;
                }

                try
                {
                    Multiple = Shove._Convert.StrToInt(str.Split(';')[2].Substring(1, str.Split(';')[2].Length - 2).Substring(2), 1);
                }
                catch
                { }

                Number = str.Split(';')[1].Substring(1, str.Split(';')[1].Length - 2);
                string[] Numbers = Number.Split('|');


                if (Numbers.Length == 1)
                {
                    BuyWays = "单关";
                }
                else
                {
                    BuyWays = Numbers.Length.ToString() + "串1";
                }

                long MatchID = 0;

                response.Write(dr["SchemeNumber"].ToString() + "," + PlayTypeName(PlayTypeID) + ",T,");

                for (int i = 0; i < Numbers.Length; i++)
                {
                    if (Numbers[i].IndexOf("(") < 0)
                    {
                        continue;
                    }

                    MatchID = Shove._Convert.StrToLong(Numbers[i].Substring(0, Numbers[i].IndexOf("(")), 1);

                    DataRow[] drMatch = dtMatch.Select("ID=" + MatchID.ToString());

                    if (drMatch.Length < 1)
                    {
                        continue;
                    }

                    response.Write("(" + GetMatchNumber(drMatch[0]["MatchNumber"].ToString()) + ">" + Getesult(PlayTypeID, Numbers[i].Substring(Numbers[i].IndexOf("(") + 1, Numbers[i].IndexOf(")") - Numbers[i].IndexOf("(") - 1)) + ")");

                }

                response.Write("," + BuyWays + "," + Multiple + "," + (2 * Multiple).ToString() + "\r\n");
            }
        }

        response.End();
    }
Exemplo n.º 8
0
    protected void btnDownload_txt_Click(object sender, EventArgs e)
    {
        DataTable dt = new DAL.Views.V_Isuses().Open("", "[ID] = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue), "");

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

            return;
        }

        string FileName = dt.Rows[0]["Code"].ToString() + dt.Rows[0]["Name"].ToString() + ".txt";

        dt = new DAL.Views.V_SchemeSchedules().Open("", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0", "[Money] desc");

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

            return;
        }

        if (dt.Rows.Count < 1)
        {
            Shove._Web.JavaScript.Alert(this.Page, "没有数据。");

            return;
        }

        HttpResponse response;

        response = Page.Response;
        response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName);
        Response.ContentType = "application/ms-txt";
        response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");

        foreach (DataRow dr in dt.Rows)
        {
            string LotteryNumber = dr["LotteryNumber"].ToString();

            response.Write("***********************************************\r\n");
            response.Write("站点编号: " + dr["SiteID"].ToString() + "\r\n");
            response.Write("方案编号: " + dr["SchemeNumber"].ToString() + "\t内部编号:" + dr["ID"].ToString() + "\r\n");
            response.Write("方案类别: " + dr["PlayTypeName"].ToString() + "\r\n");
            response.Write("方案倍数: " + dr["Multiple"].ToString() + "\t方案金额:" + double.Parse(dr["Money"].ToString()).ToString("N") + "\r\n");
            response.Write("***********************************************\r\n");
            response.Write(LotteryNumber);
            response.Write("\r\n\r\n\r\n");
        }

        response.End();
    }
 private void BindData()
 {
     if (this.ddlLottery.Items.Count >= 1)
     {
         string condition = "LotteryID = " + Utility.FilteSqlInfusion(this.ddlLottery.SelectedValue) + " and QuashStatus = 0 and Buyed = 0 and isOpened = 0";
         if (this.tbQuash.Text.Trim() != "")
         {
             if (this.rb1.Checked)
             {
                 condition = condition + " and SchemeNumber = '" + Utility.FilteSqlInfusion(this.tbQuash.Text.Trim()) + "'";
             }
             else
             {
                 condition = condition + " and InitiateName = '" + Utility.FilteSqlInfusion(this.tbQuash.Text.Trim()) + "'";
             }
         }
         DataTable table = new Views.V_SchemeSchedules().Open("", condition, "[Money] desc");
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", "Admin_SchemeQuash");
         }
         else
         {
             table.Columns.Add("LocateWaysAndMultiples", Type.GetType("System.String"));
             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");
                 if (new Lottery()["45"].CheckPlayType(int.Parse(table.Rows[i]["PlayTypeID"].ToString())))
                 {
                     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;
             this.g.DataBind();
         }
     }
 }
Exemplo n.º 10
0
    private void BindData()
    {
        if (ddlLottery.Items.Count < 1)
        {
            return;
        }

        string Condition = "LotteryID = " + Shove._Web.Utility.FilteSqlInfusion(ddlLottery.SelectedValue) + " and QuashStatus = 0 and Buyed = 0 and isOpened = 0";

        if (tbQuash.Text.Trim() != "")
        {
            if (rb1.Checked)
            {
                Condition += " and SchemeNumber = '" + Shove._Web.Utility.FilteSqlInfusion(tbQuash.Text.Trim()) + "'";
            }
            else
            {
                Condition += " and InitiateName = '" + Shove._Web.Utility.FilteSqlInfusion(tbQuash.Text.Trim()) + "'";
            }
        }

        DataTable dt = new DAL.Views.V_SchemeSchedules().Open("", Condition, "[Money] desc");

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

            return;
        }

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

        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");

            if (new SZJS.Lottery()[SZJS.Lottery.ZCDC.sID].CheckPlayType(int.Parse(dt.Rows[i]["PlayTypeID"].ToString())))
            {
                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;
        g.DataBind();
    }
Exemplo n.º 11
0
 private void BindData()
 {
     if (this.ddlIsuse.Items.Count >= 1)
     {
         DataTable table = new Views.V_SchemeSchedules().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0 and isOpened = 0", "[Money] desc");
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", "Admin_PrintOutput");
         }
         else
         {
             table.Columns.Add("LocateWaysAndMultiples", Type.GetType("System.String"));
             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");
                 if (new Lottery()["45"].CheckPlayType(int.Parse(table.Rows[i]["PlayTypeID"].ToString())))
                 {
                     table.Rows[i]["Multiple"] = 0;
                     try
                     {
                         buyContent = "";
                         cnLocateWaysAndMultiples = "";
                         string str3 = "";
                         string scheme = table.Rows[i]["LotteryNumber"].ToString();
                         if (new Lottery()["45"].GetSchemeSplit(scheme, ref buyContent, ref cnLocateWaysAndMultiples))
                         {
                             string vote = "";
                             DataTable table2 = PF.GetZCDCBuyContent(scheme, _Convert.StrToLong(table.Rows[i]["ID"].ToString(), -1L), ref vote);
                             if (table2 == null)
                             {
                                 PF.GoError(4, "数据访问错误", base.GetType().BaseType.FullName);
                                 return;
                             }
                             foreach (DataRow row in table2.Rows)
                             {
                                 if (str3 == "")
                                 {
                                     string str6 = str3;
                                     str3 = str6 + row["No"].ToString() + " " + row["LeagueTypeName"].ToString() + " " + row["HostTeam"].ToString() + " VS " + row["QuestTeam"].ToString() + " " + row["Content"].ToString() + " " + row["LotteryResult"].ToString();
                                 }
                                 else
                                 {
                                     string str7 = str3;
                                     str3 = str7 + "<br />" + row["No"].ToString() + " " + row["LeagueTypeName"].ToString() + " " + row["HostTeam"].ToString() + " VS " + row["QuestTeam"].ToString() + " " + row["Content"].ToString() + " " + row["LotteryResult"].ToString();
                                 }
                             }
                             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;
             this.g.DataBind();
             this.btnDownload.Enabled = table.Rows.Count > 0;
             this.btnDownload_txt.Enabled = table.Rows.Count > 0;
             this.btnBuyAll.Visible = table.Rows.Count > 0;
             this.fileUp.Disabled = table.Rows.Count < 1;
             this.btnUpload.Enabled = table.Rows.Count > 0;
         }
     }
 }
Exemplo n.º 12
0
 protected void btnDownload_txt_Click(object sender, EventArgs e)
 {
     DataTable table = new Views.V_Isuses().Open("", "[ID] = " + Utility.FilteSqlInfusion(this.ddlIsuse.SelectedValue), "");
     if ((table == null) || (table.Rows.Count < 1))
     {
         PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
     }
     else
     {
         string str = table.Rows[0]["Code"].ToString() + table.Rows[0]["Name"].ToString() + ".txt";
         table = new Views.V_SchemeSchedules().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0", "[Money] desc");
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
         }
         else if (table.Rows.Count < 1)
         {
             JavaScript.Alert(this.Page, "没有数据。");
         }
         else
         {
             HttpResponse response = this.Page.Response;
             response.AppendHeader("Content-Disposition", "attachment;filename=" + str);
             base.Response.ContentType = "application/ms-txt";
             response.ContentEncoding = Encoding.GetEncoding("utf-8");
             foreach (DataRow row in table.Rows)
             {
                 string s = row["LotteryNumber"].ToString();
                 response.Write("***********************************************\r\n");
                 response.Write("站点编号: " + row["SiteID"].ToString() + "\r\n");
                 response.Write("方案编号: " + row["SchemeNumber"].ToString() + "\t内部编号:" + row["ID"].ToString() + "\r\n");
                 response.Write("方案类别: " + row["PlayTypeName"].ToString() + "\r\n");
                 response.Write("方案倍数: " + row["Multiple"].ToString() + "\t方案金额:" + double.Parse(row["Money"].ToString()).ToString("N") + "\r\n");
                 response.Write("***********************************************\r\n");
                 response.Write(s);
                 response.Write("\r\n\r\n\r\n");
             }
             response.End();
         }
     }
 }
 private void BindData()
 {
     if (this.ddlLottery.Items.Count >= 1)
     {
         DataTable table = new Views.V_SchemeSchedules().Open("", "LotteryID = " + Utility.FilteSqlInfusion(this.ddlLottery.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0 and EndTime < GetDate() and not [ID] in (select SchemeID from T_SchemesSendToCenter where HandleResult <> 1)", "[Money] desc");
         if (table == null)
         {
             PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
         }
         else
         {
             table.Columns.Add("LocateWaysAndMultiples", Type.GetType("System.String"));
             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");
                 if (new Lottery()["45"].CheckPlayType(int.Parse(table.Rows[i]["PlayTypeID"].ToString())))
                 {
                     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;
             this.g.DataBind();
         }
     }
 }
Exemplo n.º 14
0
    private void BindData()
    {
        if (ddlIsuse.Items.Count < 1)
        {
            return;
        }

        string SQL = "";

        if (ddlType.Visible)
        {
            if (ddlType.SelectedValue == "金额")
            {
                SQL = "Money desc ";
            }
            else if (ddlType.SelectedValue == "过关方式")
            {
                SQL = "PlayTypeID desc ";
            }
            else if (ddlType.SelectedValue == "时间")
            {
                SQL = "SystemEndTime desc ";
            }
        }

        DataTable dt = new DAL.Views.V_SchemeSchedules().Open("", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0 and isOpened = 0", "[Money] desc");

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

            return;
        }

        if (ddlLottery.SelectedValue == "72")
        {
            DataTable dtMatch = new DAL.Tables.T_PassRate().Open("", "", "");
            DataRow[] dr      = null;

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

                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() + "**" + "过关";
                }

                string str = dt.Rows[i]["LotteryNumber"].ToString();

                if (string.IsNullOrEmpty(str))
                {
                    continue;
                }

                string   Number  = str.Split(';')[1].Replace("][", "|").Substring(1, str.Split(';')[1].Length - 2);
                string[] Numbers = Number.Split('|');
                string   MatchID = "";

                for (int j = 0; j < Numbers.Length; j++)
                {
                    if (Numbers[j].IndexOf("(") < 0)
                    {
                        continue;
                    }

                    MatchID += Shove._Convert.StrToLong(Numbers[j].Substring(0, Numbers[j].IndexOf("(")), 1).ToString() + ",";
                }

                if (MatchID.EndsWith(","))
                {
                    MatchID = MatchID.Substring(0, MatchID.Length - 1);
                }

                dr = dtMatch.Select("MatchID in (" + MatchID + ")", "StopSellTime");

                if (dr.Length < 1)
                {
                    continue;
                }

                dt.Rows[i]["LotteryNumber"] = "查看详细信息";
                dt.Rows[i]["SystemEndTime"] = dr[0]["StopSellTime"].ToString();

                dt.AcceptChanges();
            }
        }

        DataTable dtNew = dt.Clone();

        DataRow[] drs = dt.Select("", SQL);
        foreach (DataRow dr in drs)
        {
            dtNew.ImportRow(dr);
        }

        g.DataSource = dtNew;
        g.DataBind();

        btnDownload.Enabled     = (dt.Rows.Count > 0);
        btnDownload_txt.Enabled = (dt.Rows.Count > 0);

        btnBuyAll.Visible = (dt.Rows.Count > 0);

        fileUp.Disabled   = (dt.Rows.Count < 1);
        btnUpload.Enabled = (dt.Rows.Count > 0);
    }
Exemplo n.º 15
0
    protected void btnDownload_Click(object sender, EventArgs e)
    {
        DataTable dt = new DAL.Views.V_Isuses().Open("", "[id] = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue), "");

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

            return;
        }

        string FileName = dt.Rows[0]["Code"].ToString() + dt.Rows[0]["Name"].ToString() + ".xls";

        dt = new DAL.Views.V_SchemeSchedules().Open("", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0", "[Money] desc");

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

            return;
        }

        if (dt.Rows.Count < 1)
        {
            Shove._Web.JavaScript.Alert(this.Page, "没有数据。");

            return;
        }

        HttpResponse response;

        response = Page.Response;
        response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName);
        Response.ContentType = "application/ms-excel";
        response.ContentEncoding = System.Text.Encoding.GetEncoding("gb2312");
        response.Write("站点编号\t内部编号\t方案编号\t类别\t购买内容\t倍数\t金额\t彩票标识号\n");

        foreach (DataRow dr in dt.Rows)
        {
            string LotteryNumber = "";
            try
            {
                LotteryNumber = "| " + dr["LotteryNumber"].ToString().Replace("\r\n", " | ") + " |";
            }
            catch { }
            response.Write(dr["SiteID"].ToString() + "\t" + dr["ID"].ToString() + "\t" + dr["SchemeNumber"].ToString() + "\t" + dr["PlayTypeName"].ToString() + "\t" + LotteryNumber + "\t" + dr["Multiple"].ToString() + "\t" + dr["Money"].ToString() + "\t<请输入标识号>\n");
        }

        response.End();
    }
Exemplo n.º 16
0
    private void BindData()
    {
        if (ddlLottery.Items.Count < 1)
        {
            return;
        }

        string Condition = "LotteryID = " + Shove._Web.Utility.FilteSqlInfusion(ddlLottery.SelectedValue) + " and QuashStatus = 0 and Buyed = 0 and isOpened = 0";

        if (tbQuash.Text.Trim() != "")
        {
            if (rb1.Checked)
            {
                Condition += " and SchemeNumber = '" + Shove._Web.Utility.FilteSqlInfusion(tbQuash.Text.Trim()) + "'";
            }
            else
            {
                Condition += " and InitiateName = '" + Shove._Web.Utility.FilteSqlInfusion(tbQuash.Text.Trim()) + "'";
            }
        }

        DataTable dt = new DAL.Views.V_SchemeSchedules().Open("", Condition, "[Money] desc");

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

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

        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");

            if (new SLS.Lottery()[SLS.Lottery.ZCDC.sID].CheckPlayType(int.Parse(dt.Rows[i]["PlayTypeID"].ToString())))
            {
                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>";
                }
            }
            else if (Shove._Web.Utility.FilteSqlInfusion(ddlLottery.SelectedValue) == "72" || Shove._Web.Utility.FilteSqlInfusion(ddlLottery.SelectedValue) == "73")
            {
                dt.Rows[i]["LotteryNumber"] = "查看详细信息";
            }

            dt.AcceptChanges();
        }

        g.DataSource = dt;
        g.DataBind();
    }
Exemplo n.º 17
0
    private void BindData()
    {
        if (ddlIsuse.Items.Count < 1)
        {
            return;
        }

        DataTable dt = new DAL.Views.V_SchemeSchedules().Open("", "IsuseID = " + Shove._Web.Utility.FilteSqlInfusion(ddlIsuse.SelectedValue) + " and Schedule >= 100 and QuashStatus = 0 and Buyed = 0 and isOpened = 0", "[Money] desc");

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

            return;
        }

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

        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");

            if (new SZJS.Lottery()[SZJS.Lottery.ZCDC.sID].CheckPlayType(int.Parse(dt.Rows[i]["PlayTypeID"].ToString())))
            {
                dt.Rows[i]["Multiple"] = 0;

                try
                {
                    BuyContent = "";
                    CnLocateWaysAndMultiples = "";

                    string BuyNumberContent = "";

                    string str = dt.Rows[i]["LotteryNumber"].ToString();;
                    if (new SZJS.Lottery()[SZJS.Lottery.ZCDC.sID].GetSchemeSplit(str, ref BuyContent, ref CnLocateWaysAndMultiples))
                    {
                        string    vote  = "";
                        DataTable dtnew = PF.GetZCDCBuyContent(str, Shove._Convert.StrToLong(dt.Rows[i]["ID"].ToString(), -1), ref vote);

                        if (dtnew == null)
                        {
                            PF.GoError(ErrorNumber.DataReadWrite, "数据访问错误", this.GetType().BaseType.FullName);

                            return;
                        }

                        foreach (DataRow dr in dtnew.Rows)
                        {
                            if (BuyNumberContent == "")
                            {
                                BuyNumberContent += dr["No"].ToString() + " " + dr["LeagueTypeName"].ToString() + " " + dr["HostTeam"].ToString() + " VS " + dr["QuestTeam"].ToString() + " " + dr["Content"].ToString() + " " + dr["LotteryResult"].ToString();
                            }
                            else
                            {
                                BuyNumberContent += "<br />" + dr["No"].ToString() + " " + dr["LeagueTypeName"].ToString() + " " + dr["HostTeam"].ToString() + " VS " + dr["QuestTeam"].ToString() + " " + dr["Content"].ToString() + " " + dr["LotteryResult"].ToString();
                            }
                        }

                        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;
        g.DataBind();

        btnDownload.Enabled     = (dt.Rows.Count > 0);
        btnDownload_txt.Enabled = (dt.Rows.Count > 0);

        btnBuyAll.Visible = (dt.Rows.Count > 0);

        fileUp.Disabled   = (dt.Rows.Count < 1);
        btnUpload.Enabled = (dt.Rows.Count > 0);
    }