Exemple #1
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++;
            }
        }