// 期望盈利率表格
        protected void genExpRateTable(Table table)
        {
            GMUser user = (GMUser)Session["user"];

            table.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

            table.Rows.Add(tr);

            int i = 0;

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

            // long totalIncome = 0;
            // long totalOutlay = 0;

            QueryMgr mgr = user.getSys <QueryMgr>(SysType.sysTypeQuery);
            OpRes    res = mgr.doQuery(null, QueryType.queryTypeCrocodileParam, user);
            Dictionary <int, ResultFishlordExpRate> qresult
                = (Dictionary <int, ResultFishlordExpRate>)mgr.getQueryResult(QueryType.queryTypeCrocodileParam);

            for (i = 1; i <= 1; i++)
            {
                m_content[0] = StrName.s_roomName[i - 1];
                if (qresult.ContainsKey(i))
                {
                    ResultFishlordExpRate r = qresult[i];
                    m_content[1] = r.m_expRate.ToString();
                    m_content[2] = ItemHelp.showMoneyValue(r.m_totalIncome).ToString();
                    m_content[3] = ItemHelp.showMoneyValue(r.m_totalOutlay).ToString();
                    m_content[4] = ItemHelp.showMoneyValue(r.m_totalIncome - r.m_totalOutlay).ToString();
                    m_content[5] = r.getFactExpRate();
                    //  totalIncome += r.m_totalIncome;
                    //  totalOutlay += r.m_totalOutlay;
                }
                else
                {
                    m_content[1] = "0.05";
                    m_content[2] = "0";
                    m_content[3] = "0";
                    m_content[4] = "0";
                    m_content[5] = "0";
                }
                m_content[6] = Tool.getCheckBoxHtml("roomList", i.ToString(), false);

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

                    if (j == 4)
                    {
                        setColor(td, m_content[j]);
                    }
                }
            }

            //  addStatFoot(table, totalIncome, totalOutlay);
        }
Esempio n. 2
0
        // 期望盈利率表格
        protected void genExpRateTable(Table table)
        {
            GMUser user = (GMUser)Session["user"];

            table.GridLines = GridLines.Both;
            TableRow tr = new TableRow();

            table.Rows.Add(tr);

            int i = 0;

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

            // long totalIncome = 0;
            // long totalOutlay = 0;
            // long totalCharge = 0;

            QueryMgr mgr = user.getSys <QueryMgr>(SysType.sysTypeQuery);
            OpRes    res = mgr.doQuery(null, QueryType.queryTypeBaccaratEarnings, user);
            Dictionary <int, ResultFishlordExpRate> qresult
                = (Dictionary <int, ResultFishlordExpRate>)mgr.getQueryResult(QueryType.queryTypeBaccaratEarnings);

            for (i = 1; i <= 1 /*StrName.s_roomName.Length*/; i++)
            {
                m_content[0] = StrName.s_roomName[i - 1];
                if (qresult.ContainsKey(i))
                {
                    ResultFishlordExpRate r = qresult[i];
                    m_content[1] = r.m_playerCharge.ToString();
                    m_content[2] = r.m_totalIncome.ToString();
                    m_content[3] = r.m_totalOutlay.ToString();
                    m_content[4] = r.getDelta().ToString();
                    m_content[5] = r.getFactExpRate();

                    m_content[6] = r.m_robotIncome.ToString();
                    m_content[7] = r.m_robotOutlay.ToString();
                    m_content[8] = (r.m_robotIncome - r.m_robotOutlay).ToString();
                    m_content[9] = ItemHelp.getFactExpRate(r.m_robotIncome, r.m_robotOutlay);
                    // totalIncome += r.m_totalIncome;
                    // totalOutlay += r.m_totalOutlay;
                    // totalCharge += r.m_playerCharge;
                }
                else
                {
                    for (int idx = 1; i < 10; idx++)
                    {
                        m_content[idx] = "0";
                    }
                }
                m_content[10] = Tool.getCheckBoxHtml("roomList", i.ToString(), false);

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

                    if (j == 3)
                    {
                        setColor(td, m_content[j]);
                    }
                }
            }

            //  addStatFoot(table, totalIncome, totalOutlay, totalCharge);
        }
Esempio n. 3
0
    // 期望盈利率表格
    public void genExpRateTable(Table table, GMUser user, QueryType qType)
    {
        table.GridLines = GridLines.Both;
        TableRow tr = new TableRow();

        table.Rows.Add(tr);

        int i = 0;

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

        long totalIncome           = 0;
        long totalOutlay           = 0;
        long totalAbandonedbullets = 0;
        long totalMissileCount     = 0;

        OpRes res = user.doQuery(null, qType /*QueryType.queryTypeFishlordParam*/);
        Dictionary <int, ResultFishlordExpRate> qresult
            = (Dictionary <int, ResultFishlordExpRate>)user.getQueryResult(qType /*QueryType.queryTypeFishlordParam*/);

        for (i = 1; i <= StrName.s_roomName.Length; i++)
        {
            m_content[0] = StrName.s_roomName[i - 1];
            if (qresult.ContainsKey(i))
            {
                ResultFishlordExpRate r = qresult[i];
                m_content[1] = r.m_expRate.ToString();
                m_content[2] = r.m_totalIncome.ToString();
                m_content[3] = r.m_totalOutlay.ToString();
                m_content[4] = (r.m_totalIncome - r.m_totalOutlay).ToString();
                m_content[5] = r.getFactExpRate();
                m_content[6] = r.m_curPlayerCount.ToString();
                m_content[7] = r.m_abandonedbullets.ToString();
                m_content[8] = r.m_missileCount.ToString();

                totalIncome           += r.m_totalIncome;
                totalOutlay           += r.m_totalOutlay;
                totalAbandonedbullets += r.m_abandonedbullets;
                totalMissileCount     += r.m_missileCount;
            }
            else
            {
                m_content[1] = "0.05";
                m_content[2] = "0";
                m_content[3] = "0";
                m_content[4] = "0";
                m_content[5] = "0";
                m_content[6] = "0";
                m_content[7] = "0";
                m_content[8] = "0";
            }
            m_content[9] = Tool.getCheckBoxHtml("roomList", i.ToString(), false);

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

                if (j == 4)
                {
                    setColor(td, m_content[j]);
                }
            }
        }

        addStatFoot(table, totalIncome, totalOutlay, totalAbandonedbullets, totalMissileCount);
    }