示例#1
0
        ///////////////////////////////////牛牛数据///////////////////////////////////////

        private void genDetailGameTableCows(Table table, OpRes res, GMUser user)
        {
            TableRow tr = new TableRow();

            table.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 <EarningItem> qresult = (List <EarningItem>)user.getQueryResult(QueryType.queryTypeServerEarnings);
            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];
            }

            EarningItem statItem = new EarningItem();

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

                m_content[0] = qresult[i].m_time;

                m_content[1] = qresult[i].getRoomIncome(0).ToString();   // 总下注
                m_content[2] = qresult[i].getRoomOutlay(0).ToString();   // 净盈利
                m_content[3] = ItemHelp.getRate(qresult[i].getRoomOutlay(0), qresult[i].getRoomIncome(0));

                statItem.addRoomIncome(0, qresult[i].getRoomIncome(0));
                statItem.addRoomOutlay(0, qresult[i].getRoomOutlay(0));

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

                    if (j == 2 || j == 3)
                    {
                        setRedColor(td);
                    }
                }
            }

            addDetailStatFootCows(table, statItem);
        }
示例#2
0
        private void genDetailGameTable(Table table, OpRes res, GMUser user, QueryMgr mgr, int gameId)
        {
            TableRow tr = new TableRow();

            table.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 <EarningItem> qresult = (List <EarningItem>)mgr.getQueryResult(QueryType.queryTypeServerEarnings);
            int i = 0, j = 0;

            // 表头
            for (i = 0; i < getHead1Length(gameId); i++)
            {
                td = new TableCell();
                tr.Cells.Add(td);

                if (i == 17 || i == 18)
                {
                    td.Text = string.Format(s_head1[i], StrName.s_gameName1[gameId]);
                }
                else
                {
                    td.Text = s_head1[i];
                }
            }

            EarningItem statItem = new EarningItem();

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

                m_content[0] = qresult[i].m_time;

                m_content[1] = ItemHelp.showMoneyValue(qresult[i].getRoomIncome(0)).ToString();
                m_content[2] = ItemHelp.showMoneyValue(qresult[i].getRoomOutlay(0)).ToString();
                m_content[3] = ItemHelp.showMoneyValue(qresult[i].getDelta(0)).ToString();
                m_content[4] = qresult[i].getFactExpRate(0);
                statItem.addRoomIncome(0, qresult[i].getRoomIncome(0));
                statItem.addRoomOutlay(0, qresult[i].getRoomOutlay(0));

                /* m_content[5] = ItemHelp.showMoneyValue(qresult[i].getRoomIncome(1)).ToString();
                 * m_content[6] = ItemHelp.showMoneyValue(qresult[i].getRoomOutlay(1)).ToString();
                 * m_content[7] = ItemHelp.showMoneyValue(qresult[i].getDelta(1)).ToString();
                 * m_content[8] = qresult[i].getFactExpRate(1);
                 * statItem.addRoomIncome(1, qresult[i].getRoomIncome(1));
                 * statItem.addRoomOutlay(1, qresult[i].getRoomOutlay(1));
                 *
                 * m_content[9] = ItemHelp.showMoneyValue(qresult[i].getRoomIncome(2)).ToString();
                 * m_content[10] = ItemHelp.showMoneyValue(qresult[i].getRoomOutlay(2)).ToString();
                 * m_content[11] = ItemHelp.showMoneyValue(qresult[i].getDelta(2)).ToString();
                 * m_content[12] = qresult[i].getFactExpRate(2);
                 * statItem.addRoomIncome(2, qresult[i].getRoomIncome(2));
                 * statItem.addRoomOutlay(2, qresult[i].getRoomOutlay(2));
                 *
                 * m_content[13] = ItemHelp.showMoneyValue(qresult[i].getRoomIncome(3)).ToString();
                 * m_content[14] = ItemHelp.showMoneyValue(qresult[i].getRoomOutlay(3)).ToString();
                 * m_content[15] = ItemHelp.showMoneyValue(qresult[i].getDelta(3)).ToString();
                 * m_content[16] = qresult[i].getFactExpRate(3);
                 * statItem.addRoomIncome(3, qresult[i].getRoomIncome(3));
                 * statItem.addRoomOutlay(3, qresult[i].getRoomOutlay(3));
                 *
                 * m_content[17] = ItemHelp.showMoneyValue(qresult[i].getRoomIncome(4)).ToString();
                 * m_content[18] = ItemHelp.showMoneyValue(qresult[i].getRoomOutlay(4)).ToString();
                 * m_content[19] = ItemHelp.showMoneyValue(qresult[i].getDelta(4)).ToString();
                 * m_content[20] = qresult[i].getFactExpRate(4);
                 * statItem.addRoomIncome(4, qresult[i].getRoomIncome(4));
                 * statItem.addRoomOutlay(4, qresult[i].getRoomOutlay(4));
                 *
                 * if (gameId == (int)GameId.fishlord)
                 * {
                 *   m_content[21] = ItemHelp.showMoneyValue(qresult[i].getRoomOutlay(5)).ToString();
                 *   m_content[22] = ItemHelp.showMoneyValue(qresult[i].getRoomOutlay(6)).ToString();
                 *   statItem.addRoomOutlay(5, qresult[i].getRoomOutlay(5));
                 *   statItem.addRoomOutlay(6, qresult[i].getRoomOutlay(6));
                 * }*/

                for (j = 0; j < getHead1Length(gameId); j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Style.Clear();
                    td.Text = m_content[j];
                }

                /*for (int k = 3; k < 20; k += 4)
                 * {
                 *  setRedColor(tr.Cells[k]);
                 *  setRedColor(tr.Cells[k + 1]);
                 * }*/
            }

            addDetailStatFoot(table, statItem, gameId);
        }
示例#3
0
        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;

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

            List <EarningItem> qresult = (List <EarningItem>)mgr.getQueryResult(QueryType.queryTypeServerEarnings);
            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];
            }

            EarningItem statItem = new EarningItem();

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

                m_content[0] = qresult[i].m_time;
                m_content[1] = ItemHelp.showMoneyValue(qresult[i].getRoomIncome(4)).ToString();
                m_content[2] = ItemHelp.showMoneyValue(qresult[i].getRoomOutlay(4)).ToString();
                m_content[3] = ItemHelp.showMoneyValue(qresult[i].getDelta(4)).ToString();
                m_content[4] = qresult[i].getFactExpRate(4);

                statItem.addRoomIncome(4, qresult[i].getRoomIncome(4));
                statItem.addRoomOutlay(4, qresult[i].getRoomOutlay(4));

                for (j = 0; j < s_head.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                    td.Style.Clear();
                    if (j == 3 || j == 4)
                    {
                        setRedColor(td);
                    }
                }
            }

            addStatFoot(table, statItem);
        }