Exemplo n.º 1
0
        private void genTable(Table table, OpRes res, GMUser user, StatMgr mgr, StatType sType)
        {
            m_result.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

            m_result.Rows.Add(tr);
            TableCell td = null;

            if (res != OpRes.opres_success)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = OpResMgr.getInstance().getResultString(res);
                return;
            }

            List <ResultActive> qresult = (List <ResultActive>)mgr.getStatResult(sType);
            int i = 0, j = 0;

            // 表头
            for (i = 0; i < s_head.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head[i];
            }

            for (i = 0; i < qresult.Count; i++)
            {
                tr = new TableRow();
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }
                m_result.Rows.Add(tr);

                m_content[0] = qresult[i].m_time;
                m_content[1] = qresult[i].m_game1.ToString();
                m_content[2] = qresult[i].m_game2.ToString();
                m_content[3] = qresult[i].m_game3.ToString();
                m_content[4] = qresult[i].m_game4.ToString();
                m_content[5] = qresult[i].m_game5.ToString();
                m_content[6] = qresult[i].m_game6.ToString();
                m_content[7] = qresult[i].m_game7.ToString();
                //m_content[8] = qresult[i].m_game8.ToString();

                for (j = 0; j < s_head.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
            }
        }
Exemplo n.º 2
0
        private void genVipLevelTable(Table table, GMUser user, StatMgr mgr, OpRes res)
        {
            TableRow tr = new TableRow();

            table.Rows.Add(tr);
            TableCell td = null;

            if (res != OpRes.opres_success)
            {
                td      = new TableCell();
                td.Text = OpResMgr.getInstance().getResultString(res);
                tr.Cells.Add(td);
                return;
            }

            StatResultVipLevel qresult = (StatResultVipLevel)mgr.getStatResult(StatType.statTypeVipLevel);

            int i = 0, j = 0;

            // 表头
            for (i = 0; i < s_head.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head[i];
            }

            i = 0;
            foreach (var d in qresult.m_vipLevel)
            {
                tr = new TableRow();
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }
                m_result.Rows.Add(tr);

                m_content[0] = "VIP" + d.Key.ToString();
                m_content[1] = d.Value.ToString();

                for (j = 0; j < s_head.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
                i++;
            }
        }
Exemplo n.º 3
0
        private void genSameOrderTable(Table table, OpRes res, StatMgr mgr, GMUser user)
        {
            m_page.InnerHtml   = "";
            m_foot.InnerHtml   = "";
            m_result.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

            m_result.Rows.Add(tr);
            TableCell td = null;

            if (res != OpRes.opres_success)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = OpResMgr.getInstance().getResultString(res);
                return;
            }

            int i = 0, j = 0;

            for (i = 0; i < s_head2.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head2[i];
            }

            List <ResultSameOrderIdItem> result = (List <ResultSameOrderIdItem>)mgr.getStatResult(StatType.statTypeSameOrderId);

            for (i = 0; i < result.Count; i++)
            {
                tr = new TableRow();
                m_result.Rows.Add(tr);

                m_content[0] = result[i].m_orderId;
                m_content[1] = result[i].m_count.ToString();

                for (j = 0; j < s_head2.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
            }
        }
Exemplo n.º 4
0
        // 生成统计表
        private void genStatTable(Table table, OpRes res, StatMgr mgr, GMUser user)
        {
            m_page.InnerHtml   = "";
            m_foot.InnerHtml   = "";
            m_result.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

            m_result.Rows.Add(tr);
            TableCell td = null;

            if (res != OpRes.opres_success)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = OpResMgr.getInstance().getResultString(res);
                return;
            }

            int i = 0, j = 0;

            for (i = 0; i < s_head1.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = s_head1[i];
            }

            for (i = 0; i < 1; i++)
            {
                tr = new TableRow();
                m_result.Rows.Add(tr);

                ResultStatRecharge rs = (ResultStatRecharge)mgr.getStatResult(StatType.statTypeRecharge);
                m_content[0] = rs.m_rechargeCount.ToString();
                m_content[1] = rs.m_rechargePersonNum.ToString();
                m_content[2] = rs.m_total.ToString();

                for (j = 0; j < s_head1.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
            }
        }
Exemplo n.º 5
0
    public object getStatResult(StatType statName)
    {
        StatMgr mgr = getSys <StatMgr>(SysType.sysTypeStat);

        return(mgr.getStatResult(statName));
    }
        private void genTable(Table table, OpRes res, GMUser user, StatMgr mgr, StatType sType)
        {
            m_result.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

            m_result.Rows.Add(tr);
            TableCell td = null;

            if (res != OpRes.opres_success)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = OpResMgr.getInstance().getResultString(res);
                return;
            }

            List <ResultActive> qresult = (List <ResultActive>)mgr.getStatResult(sType);
            int i = 0, j = 0;

            // 表头
            for (i = 0; i < StrName.s_gameName.Length; i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                if (i == 0)
                {
                    td.Text = "日期";
                }
                else
                {
                    td.Text = StrName.s_gameName[i];
                }
            }

            int f = 0;

            for (i = 0; i < qresult.Count; i++)
            {
                f  = 0;
                tr = new TableRow();
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }
                m_result.Rows.Add(tr);

                m_content[f++] = qresult[i].m_time;

                for (int k = 1; k < StrName.s_gameName.Length; k++)
                {
                    m_content[f++] = qresult[i].getCount(k).ToString();
                }

                for (j = 0; j < StrName.s_gameName.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
            }
        }