private void genTable(Table table, OpRes res, GMUser user, QueryMgr mgr)
        {
            table.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

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

            ResultGameRecharge qresult = (ResultGameRecharge)mgr.getQueryResult(QueryType.queryTypeGameRecharge);

            if (qresult.m_fields.Count == 0)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = OpResMgr.getInstance().getResultString(res);
                return;
            }

            int i = 0, j = 0;

            s_head    = new string[2 + qresult.m_fields.Count];
            m_content = new string[2 + qresult.m_fields.Count];
            s_head[0] = "日期";

            foreach (var r in qresult.m_fields)
            {
                s_head[++i] = r;
            }
            s_head[++i] = "总计";

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

            Dictionary <string, long> data = new Dictionary <string, long>();
            long totalR = 0;

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

                m_content[0] = qresult.m_result[i].m_time.ToLongDateString();
                j            = 1;
                foreach (var game in qresult.m_fields)
                {
                    long val = qresult.m_result[i].getValue(game);
                    m_content[j] = val.ToString();
                    j++;

                    if (data.ContainsKey(game))
                    {
                        data[game] += val;
                    }
                    else
                    {
                        data.Add(game, val);
                    }
                }

                m_content[j] = qresult.m_result[i].m_totalRecharge.ToString();
                totalR      += qresult.m_result[i].m_totalRecharge;

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

            addStatFoot(table, data, totalR);
        }
        private void genTable(Table table, OpRes res, GMUser user, QueryMgr mgr)
        {
            table.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

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

            ResultGameRecharge qresult = (ResultGameRecharge)mgr.getQueryResult(QueryType.queryTypeGameRecharge);

            if (qresult.m_fields.Count == 0)
            {
                td = new TableCell();
                tr.Cells.Add(td);
                td.Text = OpResMgr.getInstance().getResultString(res);
                return;
            }

            int i = 0, j = 0;

            s_head    = new string[2 + qresult.m_fields.Count];
            m_content = new string[2 + qresult.m_fields.Count];
            s_head[0] = "日期";

            foreach (var r in qresult.m_fields)
            {
                s_head[++i] = r;
            }
            s_head[++i] = "总计";

            // 表头
            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.m_result.Count; i++)
            {
                tr = new TableRow();
                if ((i & 1) == 0)
                {
                    tr.CssClass = "alt";
                }
                table.Rows.Add(tr);

                m_content[0] = qresult.m_result[i].m_time.ToLongDateString();
                j            = 1;
                foreach (var game in qresult.m_fields)
                {
                    m_content[j] = qresult.m_result[i].getValue(game).ToString();
                    j++;
                }

                m_content[j] = qresult.m_result[i].m_totalRecharge.ToString();

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