Example #1
0
    //每月赢利量
    public long MonthwinCent(int i)
    {
        long P_Int_count = 0;

        P_Int_count = new LHC.BLL.VotePay().GetwinCent("BzType=0 and Year(AddTime)=" + DateTime.Now.Year + "and Month(AddTime)=" + (i + 1) + " Group By Month(AddTime)");

        return(P_Int_count);
    }
Example #2
0
    private void StatPage()
    {
        string YearText = DateTime.Now.Year + "年";

        Master.Title = "" + YearText + "每月赢利";
        builder.Append(Out.Tab("<div class=\"title\">" + YearText + "每月赢利</div>", ""));

        //计算总量
        long total  = new LHC.BLL.VotePay().GetPayCent("BzType=0 and Year(AddTime)=" + DateTime.Now.Year);
        long total2 = new LHC.BLL.VotePay().GetwinCent("BzType=0 and Year(AddTime)=" + DateTime.Now.Year);

        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("年份:" + YearText + " 累计投注" + total + "<br />");
        builder.Append("累计返彩" + total2 + "<br />");
        builder.Append("累计净赚" + (total - total2) + "");
        builder.Append(Out.Tab("</div>", ""));

        builder.Append(Out.Tab("<div>", "<br />"));
        builder.Append("月份|投注额|返彩额|净赚");
        builder.Append(Out.Tab("</div>", ""));

        int[] P_Int_month = new int[12];
        for (int i = 0; i < 12; i++)
        {
            if (i % 2 == 0)
            {
                builder.Append(Out.Tab("<div>", "<br />"));
            }
            else
            {
                builder.Append(Out.Tab("<div>", "<br />"));
            }

            builder.Append(Year(i) + "—" + MonthPayCent(i) + "—" + MonthwinCent(i) + "—" + (MonthPayCent(i) - MonthwinCent(i)) + "");

            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.getUrl("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>", ""));
    }
Example #3
0
    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 + "&amp;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>", ""));
    }