private void StatPage() { Master.Title = "赢利分析"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("赢利分析"); builder.Append(Out.Tab("</div>", "<br />")); //庄胜与闲胜赔率 string xmlPath = "/Controls/bigsmall.xml"; double ZTar = Convert.ToDouble(ub.GetSub("BsZTar", xmlPath)); double XTar = Convert.ToDouble(ub.GetSub("BsXTar", xmlPath)); //今天赢利 long TodayWinCent = new BCW.BLL.Game.Bspay().GetWinCent("Year(AddTime) = " + DateTime.Now.Year + " AND Month(AddTime) = " + DateTime.Now.Month + " and Day(AddTime) = " + DateTime.Now.Day + " and WinCent > 0 and BzType=0"); long TodayWinCent2 = new BCW.BLL.Game.Bspay().GetWinCent("Year(AddTime) = " + DateTime.Now.Year + " AND Month(AddTime) = " + DateTime.Now.Month + " and Day(AddTime) = " + DateTime.Now.Day + " and WinCent < 0 and BzType=0"); long TodayWin = Convert.ToInt64(TodayWinCent * XTar * 0.01); long TodayWin2 = Convert.ToInt64(-TodayWinCent2 * ZTar * 0.01); //昨天赢利 long YesWinCent = new BCW.BLL.Game.Bspay().GetWinCent("Year(AddTime) = " + DateTime.Now.AddDays(-1).Year + " AND Month(AddTime) = " + DateTime.Now.AddDays(-1).Month + " and Day(AddTime) = " + DateTime.Now.AddDays(-1).Day + " and WinCent > 0 and BzType=0"); long YesWinCent2 = new BCW.BLL.Game.Bspay().GetWinCent("Year(AddTime) = " + DateTime.Now.AddDays(-1).Year + " AND Month(AddTime) = " + DateTime.Now.AddDays(-1).Month + " and Day(AddTime) = " + DateTime.Now.AddDays(-1).Day + " and WinCent < 0 and BzType=0"); long YesWin = Convert.ToInt64(YesWinCent * XTar * 0.01); long YesWin2 = Convert.ToInt64(-YesWinCent2 * ZTar * 0.01); //本月赢利 long MonthWinCent = new BCW.BLL.Game.Bspay().GetWinCent("Year(AddTime) = " + (DateTime.Now.Year) + " AND Month(AddTime) = " + (DateTime.Now.Month) + " and WinCent > 0 and BzType=0"); long MonthWinCent2 = new BCW.BLL.Game.Bspay().GetWinCent("Year(AddTime) = " + (DateTime.Now.Year) + " AND Month(AddTime) = " + (DateTime.Now.Month) + " and WinCent < 0 and BzType=0"); long MonthWin = Convert.ToInt64(MonthWinCent * XTar * 0.01); long MonthWin2 = Convert.ToInt64(-MonthWinCent2 * ZTar * 0.01); //上月赢利 long Month2WinCent = new BCW.BLL.Game.Bspay().GetWinCent("Year(AddTime) = " + (DateTime.Now.Year - DateTime.Now.Day) + " AND Month(AddTime) = " + (DateTime.Now.Month - DateTime.Now.Day) + " and WinCent > 0 and BzType=0"); long Month2WinCent2 = new BCW.BLL.Game.Bspay().GetWinCent("Year(AddTime) = " + (DateTime.Now.Year - DateTime.Now.Day) + " AND Month(AddTime) = " + (DateTime.Now.Month - DateTime.Now.Day) + " and WinCent < 0 and BzType=0"); long Month2Win = Convert.ToInt64(Month2WinCent * XTar * 0.01); long Month2Win2 = Convert.ToInt64(-Month2WinCent2 * ZTar * 0.01); long WinCent = new BCW.BLL.Game.Bspay().GetWinCent("WinCent > 0 and BzType=0"); long WinCent2 = new BCW.BLL.Game.Bspay().GetWinCent("WinCent < 0 and BzType=0"); long Win = Convert.ToInt64(WinCent * XTar * 0.01); long Win2 = Convert.ToInt64(-WinCent2 * ZTar * 0.01); builder.Append(Out.Tab("<div>", "")); builder.Append("今天赢利:" + (TodayWin + TodayWin2) + "" + ub.Get("SiteBz") + ""); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("昨天赢利:" + (YesWin + YesWin2) + "" + ub.Get("SiteBz") + ""); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("本月赢利:" + (MonthWin + MonthWin2) + "" + ub.Get("SiteBz") + ""); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("上月赢利:" + (Month2Win + Month2Win2) + "" + ub.Get("SiteBz") + ""); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("赢利总计:" + (Win + Win2) + "" + ub.Get("SiteBz") + ""); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getPage("bigsmall.aspx") + "\">返回上一级</a><br />"); builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>")); builder.Append(Out.Tab("</div>", "<br />")); }
private void ViewPage() { int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[1-9]\d*$", "ID错误")); int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[1-2]\d*$", "1")); BCW.Model.Game.Bslist model = new BCW.BLL.Game.Bslist().GetBslist(id); if (model == null) { Utils.Error("不存在的记录", ""); } Master.Title = "大小庄《" + model.Title + "》"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("查看下注/开奖记录"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("查看:"); if (ptype == 1) { builder.Append("下注|"); } else { builder.Append("<a href=\"" + Utils.getUrl("bigsmall.aspx?act=view&ptype=1&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">下注</a>|"); } if (ptype == 2) { builder.Append("中奖"); } else { builder.Append("<a href=\"" + Utils.getUrl("bigsmall.aspx?act=view&ptype=2&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">中奖</a>"); } builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = string.Empty; if (ptype == 1) { strWhere += "BsId=" + id + ""; } else { strWhere += "BsId=" + id + " and winCent>0"; } string[] pageValUrl = { "act", "ptype", "id", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } // 开始读取列表 IList <BCW.Model.Game.Bspay> listBspay = new BCW.BLL.Game.Bspay().GetBspays(pageIndex, pageSize, strWhere, out recordCount); if (listBspay.Count > 0) { int k = 1; foreach (BCW.Model.Game.Bspay n in listBspay) { if (k % 2 == 0) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); } else { if (k == 1) { builder.Append(Out.Tab("<div>", "")); } else { builder.Append(Out.Tab("<div>", "<br />")); } } builder.Append("" + ((pageIndex - 1) * pageSize + k) + ".<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + n.UsID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a>"); string bzText = string.Empty; if (n.BzType == 0) { bzText = ub.Get("SiteBz"); } else { bzText = ub.Get("SiteBz2"); } if (n.WinCent > 0) { builder.Append("下注" + n.PayCent + "" + bzText + ",结果"); if (n.BetType == 1) { builder.Append("(庄小/闲小)"); } else { builder.Append("(庄大/闲大)"); } builder.Append("赢" + n.WinCent + "" + bzText + "[" + DT.FormatDate(n.AddTime, 0) + "]"); } else { builder.Append("下注" + n.PayCent + "" + bzText + ",结果"); if (n.BetType == 1) { builder.Append("(庄大/闲小)"); } else { builder.Append("(庄小/闲大)"); } builder.Append("输" + n.WinCent + "" + bzText + "[" + DT.FormatDate(n.AddTime, 0) + "]"); } builder.Append("IP:" + n.UsIP + "|UA:" + n.UsUA + ""); k++; builder.Append(Out.Tab("</div>", "")); } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); if (pageIndex == 1) { long zWin = new BCW.BLL.Game.Bspay().GetWinCent("BsId=" + id + " and WinCent < 0"); long zLost = new BCW.BLL.Game.Bspay().GetWinCent("BsId=" + id + " and WinCent > 0"); long Win = (-zWin) - zLost; //庄胜与闲胜赔率 string xmlPath = "/Controls/bigsmall.xml"; double ZTar = Convert.ToDouble(ub.GetSub("BsZTar", xmlPath)); double XTar = Convert.ToDouble(ub.GetSub("BsXTar", xmlPath)); //今天赢利 long WinCent = new BCW.BLL.Game.Bspay().GetWinCent("BsId=" + id + " and WinCent > 0"); long WinCent2 = new BCW.BLL.Game.Bspay().GetWinCent("BsId=" + id + " and WinCent < 0"); long TWin = Convert.ToInt64(WinCent * XTar * 0.01); long TWin2 = Convert.ToInt64(-WinCent2 * ZTar * 0.01); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("本庄庄家赢利" + Win + "<br />"); builder.Append("本站在此庄赢利" + (TWin + TWin2) + ""); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); } builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getPage("bigsmall.aspx") + "\">返回上一级</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"); builder.Append(Out.Tab("</div>", "<br />")); }