private void ViewPage() { Master.Title = "查看投注记录"; int id = Utils.ParseInt(Utils.GetRequest("id", "get", 2, @"^[1-9]\d*$", "ID错误")); LHC.Model.VoteNo model = new LHC.BLL.VoteNo().GetVoteNo(id); if (model == null) { Utils.Error("不存在的记录", ""); } DataSet ds = new LHC.BLL.VotePay().GetList("ID,UsID,UsName,payCent,BzType,Vote", "Types=1 and qiNo=" + model.qiNo + " and State=0 and ','+Vote+',' Like '%," + model.sNum + ",%'"); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.Append(ds.Tables[0].Rows[i]["Vote"].ToString() + "<br />"); } } Master.Title = "第" + model.qiNo + "期投注"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?act=list") + "\">返回上一级</a>"); builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = string.Empty; strWhere += "qiNo=" + model.qiNo + ""; string[] pageValUrl = { "act", "id", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } // 开始读取列表 IList <LHC.Model.VotePay> listVotePay = new LHC.BLL.VotePay().GetVotePays(pageIndex, pageSize, strWhere, out recordCount); if (listVotePay.Count > 0) { builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("第" + model.qiNo + "期共投注:" + model.payCent + "" + ub.Get("SiteBz") + ""); long lCent = new LHC.BLL.VotePay().GetwinCent(model.qiNo, 0); if (model.State == 1) { builder.Append("<br />返彩" + new LHC.BLL.VotePay().GetwinCent(model.qiNo, 0) + "" + ub.Get("SiteBz") + ""); builder.Append("<br />赢利" + (model.payCent - lCent) + "" + ub.Get("SiteBz") + ""); } builder.Append(Out.Tab("</div>", "<br />")); int k = 1; foreach (LHC.Model.VotePay n in listVotePay) { 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 />")); } } string TyName = ForType(n.Types); string bzText = string.Empty; if (n.BzType == 0) { bzText = ub.Get("SiteBz"); } else { bzText = ub.Get("SiteBz2"); } builder.Append("" + ((pageIndex - 1) * pageSize + k) + "."); builder.Append("<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + n.UsID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a>"); if (n.State == 0) { builder.Append("押" + TyName + ":" + n.Vote + "(" + n.payCent + "" + bzText + ")[" + DT.FormatDate(n.AddTime, 0) + "]"); } else if (n.State == 1) { builder.Append("押" + TyName + ":" + n.Vote + "(" + n.payCent + "" + bzText + ")[" + DT.FormatDate(n.AddTime, 0) + "]"); if (n.winCent > 0) { builder.Append("赢" + n.winCent + "" + bzText + ""); } } else { builder.Append("押" + TyName + ":" + n.Vote + "(" + n.payCent + "" + bzText + "),赢" + n.winCent + "" + bzText + "[" + DT.FormatDate(n.AddTime, 0) + "]"); } 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())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?act=list") + "\">返回上级</a><br />"); builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("six.aspx") + "\">返回虚拟49选1</a>", "<a href=\"" + Utils.getUrl("six.aspx") + "\">返回虚拟49选1</a>")); builder.Append(Out.Tab("</div>", "")); }
private void ListPage() { Master.Title = "虚拟投注记录"; int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[0-3]$", "3")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("虚拟投注记录"); builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = string.Empty; strWhere = ""; string[] pageValUrl = { "act", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } // 开始读取列表 IList <LHC.Model.VoteNo> listVoteNo = new LHC.BLL.VoteNo().GetVoteNos(pageIndex, pageSize, strWhere, out recordCount); if (listVoteNo.Count > 0) { int k = 1; foreach (LHC.Model.VoteNo n in listVoteNo) { 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("第" + n.qiNo + "期:"); if (n.State == 0) { builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?act=view&id=" + n.ID + "") + "\">未开奖</a>"); } else { builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?act=view&id=" + n.ID + "") + "\">" + n.pNum1 + "-" + n.pNum2 + "-" + n.pNum3 + "-" + n.pNum4 + "-" + n.pNum5 + "-" + n.pNum6 + "[特" + n.sNum + "]</a>"); } 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())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getPage("sixset.aspx") + "\">返回上级</a><br />"); builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("six.aspx") + "\">返回虚拟49选1</a>", "<a href=\"" + Utils.getUrl("six.aspx") + "\">返回虚拟49选1</a>")); builder.Append(Out.Tab("</div>", "")); }