Esempio n. 1
0
 private void PopNews()
 {
     if (base._User != null)
     {
         string    key = "Get_Win_Info_" + base._User.ID.ToString();
         DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable("Get_Win_Info_" + base._User.ID.ToString());
         if (cacheAsDataTable == null)
         {
             cacheAsDataTable = new Views.V_BuyDetails().Open("top 1 LotteryName,IsuseName,WinLotteryNumber,LotteryNumber,WinMoneyNoWithTax", "IsOpened = 1 and UserID = " + base._User.ID, "ID DESC");
             if (cacheAsDataTable == null)
             {
                 PF.GoError(4, "数据库繁忙,请重试(537)", base.GetType().FullName);
                 return;
             }
             Shove._Web.Cache.SetCache(key, cacheAsDataTable, 300);
         }
         StringBuilder builder = new StringBuilder();
         builder.Append(base._User.Name).Append(",");
         if (cacheAsDataTable.Rows.Count != 0)
         {
             Shove._Web.Utility.GetUrl();
             for (int i = 0; i < cacheAsDataTable.Rows.Count; i++)
             {
                 builder.Append(cacheAsDataTable.Rows[i]["LotteryName"].ToString()).Append("第").Append(cacheAsDataTable.Rows[i]["IsuseName"].ToString()).Append("期中奖号码是 ").Append(cacheAsDataTable.Rows[i]["WinLotteryNumber"].ToString()).Append(" 您投注的号码是").Append(_String.Cut(cacheAsDataTable.Rows[i]["LotteryNumber"].ToString(), 15)).Append(" ,").Append((_Convert.StrToDouble(cacheAsDataTable.Rows[i]["WinMoneyNoWithTax"].ToString(), 0.0) > 0.0) ? "<font style='color:red;'>中奖了</font>,希望您再接再厉,夺得更多奖金。" : "没有中奖,希望您继续努力,祝您早日中大奖。");
             }
             this.label1.Text = HmtlManage.GetHtml(AppDomain.CurrentDomain.BaseDirectory + "Home/Room/Template/FloatNotify.html").Replace("$FloatNotifyContent$", builder.ToString());
         }
     }
 }
Esempio n. 2
0
    private void BindLastestUsers()
    {
        string    key = "Home_Room_JoinAllBuy_BindLastestUsers";
        DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key);

        if (cacheAsDataTable == null)
        {
            cacheAsDataTable = new Views.V_BuyDetails().Open("top 100 Name,DetailMoney, InitiateName", "Money >= 50 and IsuseID in (select id from T_Isuses where  getdate() between StartTime and EndTime) and SchemeShare> 1 and UserID<>InitiateUserID", "DateTime desc");
            if (cacheAsDataTable == null)
            {
                PF.GoError(4, "数据库繁忙,请重试", base.GetType().FullName);
                return;
            }
            Shove._Web.Cache.SetCache(key, cacheAsDataTable, 600);
        }
        StringBuilder builder = new StringBuilder();

        builder.Append("<table width=\"230\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\">").Append("<tr>").Append("<td width=\"69\" height=\"22\" align=\"center\" bgcolor=\"#FFCC33\" class=\"black12\">").Append("用户名").Append("</td>").Append("<td width=\"88\" align=\"center\" bgcolor=\"#FFCC33\" class=\"black12\">").Append("发起人").Append("</td>").Append("<td width=\"69\" align=\"center\" bgcolor=\"#FFCC33\" class=\"black12\">").Append("跟单金额").Append("</td>").Append("</tr>").Append("<tr>").Append("<td colspan='3' width=\"230\">").Append("<div id='scrollWinUsers' style='overflow:hidden;height:260px'>").Append("<table>");
        foreach (DataRow row in cacheAsDataTable.Rows)
        {
            builder.AppendLine("<tr>").AppendLine("<td width=\"69\" height=\"22\" align=\"left\" class=\"blue12\" title='" + row["Name"].ToString() + "'><nobr>").AppendLine(_String.Cut(row["Name"].ToString(), 4)).AppendLine("</nobr></td>").AppendLine("<td width=\"88\" class=\"black12\" align=\"left\" title='" + row["InitiateName"].ToString() + "'><nobr>").AppendLine(_String.Cut(row["InitiateName"].ToString(), 7)).AppendLine("</nobr></td>").AppendLine("<td width=\"69\" class=\"red12\" align=\"left\">").Append("¥").AppendLine(_Convert.StrToDouble(row["DetailMoney"].ToString(), 0.0).ToString("N")).AppendLine("</td>").AppendLine("</tr>");
        }
        builder.Append("</table>").Append("</div>").Append("</td>").Append("</tr>").Append("</table>");
        this.divUserList.InnerHtml = builder.ToString();
    }
Esempio n. 3
0
    private void BindUserAccount()
    {
        string        request = Utility.GetRequest("dt");
        StringBuilder builder = new StringBuilder();

        builder.AppendFormat("SiteID={0} and Buyed=1 and replace(CONVERT(char(10),[DateTime],111),'/','-')='{1}' ", base._Site.ID, request);
        builder.AppendFormat("and UserID in (Select ID from T_Users where CpsID in (Select ID from T_Cps where CommendID={0})) ", base._User.ID);
        DataTable dt = new Views.V_BuyDetails().Open("IsuseName, SchemeNumber, LotteryName, PlayTypeName,Money,DetailMoney, DateTime", builder.ToString(), "DateTime desc");

        if (dt == null)
        {
            PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
        }
        else
        {
            PF.DataGridBindData(this.g, dt, this.gPager);
            this.gPager.Visible = this.g.PageCount > 1;
        }
    }