Ejemplo n.º 1
0
        public string GetAddone(int LotteryID, string IsuseID)
        {
            string    str = "";
            DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable("DataCache_JQC");

            if ((cacheAsDataTable == null) || (cacheAsDataTable.Rows.Count == 0))
            {
                cacheAsDataTable = new Tables.T_IsuseForJQC().Open(" top 8 * ", "IsuseID = " + IsuseID, "[No]");
                if ((cacheAsDataTable == null) || (cacheAsDataTable.Rows.Count != 8))
                {
                    return("");
                }
                Shove._Web.Cache.SetCache("DataCache_JQC", cacheAsDataTable, 300);
            }
            for (int i = 0; i < cacheAsDataTable.Rows.Count; i++)
            {
                str = str + cacheAsDataTable.Rows[i]["Team"].ToString().Trim() + "," + cacheAsDataTable.Rows[i]["DateTime"].ToString();
                if (i < (cacheAsDataTable.Rows.Count - 1))
                {
                    str = str + ";";
                }
            }
            return(str);
        }
Ejemplo n.º 2
0
    private void BindData()
    {
        DataTable table = new Tables.T_Isuses().Open("", "[ID]=" + Utility.FilteSqlInfusion(this.tbIsuseID.Text), "");

        if ((table == null) || (table.Rows.Count < 1))
        {
            PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
        }
        else
        {
            this.tbIsuse.Text     = table.Rows[0]["Name"].ToString();
            this.tbStartTime.Text = _Convert.StrToDateTime(table.Rows[0]["StartTime"].ToString(), "0000-00-00 00:00:00").ToString("yyyy-MM-dd HH:mm:ss");
            this.tbEndTime.Text   = _Convert.StrToDateTime(table.Rows[0]["EndTime"].ToString(), "0000-00-00 00:00:00").ToString("yyyy-MM-dd HH:mm:ss");
            if (this.tbLotteryID.Text == "1")
            {
                table = new Tables.T_IsuseForSFC().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.tbIsuseID.Text), "[No]");
                if ((table == null) || (table.Rows.Count < 14))
                {
                    PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
                    return;
                }
                for (int i = 0; i < 14; i++)
                {
                    int     num2 = i + 1;
                    TextBox box  = (TextBox)this.FindControl("tbSFC" + num2.ToString());
                    int     num3 = i + 1;
                    TextBox box2 = (TextBox)this.FindControl("tbSFC" + num3.ToString() + "_1");
                    int     num4 = i + 1;
                    TextBox box3 = (TextBox)this.FindControl("tbSFC" + num4.ToString() + "_2");
                    box.Text  = table.Rows[i]["HostTeam"].ToString();
                    box2.Text = table.Rows[i]["QuestTeam"].ToString();
                    box3.Text = table.Rows[i]["DateTime"].ToString();
                }
            }
            if (this.tbLotteryID.Text == "2")
            {
                table = new Tables.T_IsuseForJQC().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.tbIsuseID.Text), "[No]");
                if ((table == null) || (table.Rows.Count < 8))
                {
                    PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
                    return;
                }
                for (int j = 0; j < 8; j++)
                {
                    int     num6 = j + 1;
                    TextBox box4 = (TextBox)this.FindControl("tbJQC" + num6.ToString());
                    int     num7 = j + 1;
                    TextBox box5 = (TextBox)this.FindControl("tbJQC" + num7.ToString() + "_2");
                    box4.Text = table.Rows[j]["Team"].ToString();
                    box5.Text = table.Rows[j]["DateTime"].ToString();
                }
            }
            if (this.tbLotteryID.Text == "15")
            {
                table = new Tables.T_IsuseForLCBQC().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.tbIsuseID.Text), "[No]");
                if ((table == null) || (table.Rows.Count < 6))
                {
                    PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
                    return;
                }
                for (int k = 0; k < 6; k++)
                {
                    int     num9  = k + 1;
                    TextBox box6  = (TextBox)this.FindControl("tbLCBQC" + num9.ToString());
                    int     num10 = k + 1;
                    TextBox box7  = (TextBox)this.FindControl("tbLCBQC" + num10.ToString() + "_1");
                    int     num11 = k + 1;
                    TextBox box8  = (TextBox)this.FindControl("tbLCBQC" + num11.ToString() + "_2");
                    box6.Text = table.Rows[k]["HostTeam"].ToString();
                    box7.Text = table.Rows[k]["QuestTeam"].ToString();
                    box8.Text = table.Rows[k]["DateTime"].ToString();
                }
            }
            if (this.tbLotteryID.Text == "19")
            {
                table = new Tables.T_IsuseForLCDC().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.tbIsuseID.Text), "[No]");
                if ((table == null) || (table.Rows.Count < 1))
                {
                    PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
                    return;
                }
                for (int m = 0; m < 1; m++)
                {
                    int     num13 = m + 1;
                    TextBox box9  = (TextBox)this.FindControl("tbLCDC" + num13.ToString());
                    int     num14 = m + 1;
                    TextBox box10 = (TextBox)this.FindControl("tbLCDC" + num14.ToString() + "_1");
                    int     num15 = m + 1;
                    TextBox box11 = (TextBox)this.FindControl("tbLCDC" + num15.ToString() + "_2");
                    box9.Text  = table.Rows[m]["HostTeam"].ToString();
                    box10.Text = table.Rows[m]["QuestTeam"].ToString();
                    box11.Text = table.Rows[m]["DateTime"].ToString();
                }
            }
            if (this.tbLotteryID.Text == "45")
            {
                table = new Tables.T_IsuseForZCDC().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.tbIsuseID.Text), "[No]");
                if ((table == null) || (table.Rows.Count < 1))
                {
                    PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
                    return;
                }
                this.DataListZCDC.DataSource = table.DefaultView;
                this.DataListZCDC.DataBind();
            }
            DataTable table2 = new Tables.T_TestNumber().Open("", "IsuseID = " + Utility.FilteSqlInfusion(this.tbIsuseID.Text), "");
            DataTable table3 = new Tables.T_TotalMoney().Open("", "IsuseID= " + Utility.FilteSqlInfusion(this.tbIsuseID.Text), "");
            if (table2 == null)
            {
                PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
            }
            else if (table3 == null)
            {
                PF.GoError(4, "数据库繁忙,请重试", this.Page.GetType().BaseType.FullName);
            }
            else
            {
                if (table2.Rows.Count > 0)
                {
                    this.tbTestNumber.Text = table2.Rows[0]["TestNumber"].ToString();
                    this.hidID.Value       = table2.Rows[0]["ID"].ToString();
                }
                if (table3.Rows.Count > 0)
                {
                    this.tbMoney.Text  = table3.Rows[0]["TotalMoney"].ToString();
                    this.moneyID.Value = table3.Rows[0]["ID"].ToString();
                }
            }
        }
    }