예제 #1
0
        protected void genTable(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;
            }

            int i = 0;

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

            ResultDragonGameModeEarning qresult
                = (ResultDragonGameModeEarning)user.getQueryResult(QueryType.queryTypeDragonGameModeEarning);

            for (i = 0; i < 3; i++)
            {
                ResultExpRateParam item = qresult.getParam(i);
                if (item == null)
                {
                    continue;
                }

                m_content[0] = ResultDragonGameModeEarning.s_mode[i];
                m_content[1] = item.m_totalIncome.ToString();
                m_content[2] = item.m_totalOutlay.ToString();
                m_content[3] = item.getDelta().ToString();
                m_content[4] = item.getFactExpRate().ToString();

                tr = new TableRow();
                table.Rows.Add(tr);
                for (int j = 0; j < s_head.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
            }
        }
예제 #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];
            }

            ParamGameCalfRoping param = new ParamGameCalfRoping();

            param.m_queryContent = ParamGameCalfRoping.QUERY_CONTROL_PARAM;

            OpRes res = user.doQuery(param, QueryType.queryTypeGameCalfRoping);
            List <ResultExpRateParam> qresult
                = (List <ResultExpRateParam>)user.getQueryResult(param, QueryType.queryTypeGameCalfRoping);

            for (i = 0; i < qresult.Count; i++)
            {
                ResultExpRateParam item = qresult[i];
                m_content[0] = item.m_expRate.ToString();
                m_content[1] = item.m_totalIncome.ToString();
                m_content[2] = item.m_totalOutlay.ToString();
                m_content[3] = item.getDelta().ToString();
                m_content[4] = item.getFactExpRate().ToString();

                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];
                }
            }
        }