public void onQueryDesk(GMUser user, PageGift gen, int roomId, Table table, QueryType qType) { ParamQueryGift param = new ParamQueryGift(); param.m_curPage = gen.curPage; param.m_countEachPage = gen.rowEachPage; param.m_state = roomId; user.doQuery(param, qType /*QueryType.queryTypeFishlordDeskParam*/); genDeskTable(table, user, param, qType, gen); }
public void onQuery(GMUser user, string time, int roomId, PageGift gen, Table table, QueryType qType) { ParamQueryGift param = new ParamQueryGift(); param.m_param = time; param.m_state = roomId; param.m_curPage = gen.curPage; param.m_countEachPage = gen.rowEachPage; OpRes res = user.doQuery(param, qType /*QueryType.queryTypeFishlordStage*/); genTable(table, res, param, user, qType, gen); }
private void genTable(Table table, OpRes res, ParamQueryGift param, GMUser user, QueryType qType, PageGift gen) { 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 <FishlordStageItem> qresult = (List <FishlordStageItem>)user.getQueryResult(qType /*QueryType.queryTypeFishlordStage*/); 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]; } for (i = 0; i < qresult.Count; i++) { tr = new TableRow(); if ((i & 1) == 0) { tr.CssClass = "alt"; } table.Rows.Add(tr); m_content[0] = qresult[i].m_time; m_content[1] = StrName.s_roomName[qresult[i].m_roomId - 1]; m_content[2] = StrName.s_stageName[qresult[i].m_stage]; m_content[3] = qresult[i].m_income.ToString(); m_content[4] = qresult[i].m_outlay.ToString(); m_content[5] = qresult[i].getFactExpRate(); for (j = 0; j < s_head.Length; j++) { td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[j]; } } string page_html = "", foot_html = ""; gen.genPage(param, m_callURL, ref page_html, ref foot_html, user); m_page = page_html; m_foot = foot_html; }
// 桌子的盈利率表格 protected void genDeskTable(Table table, GMUser user, ParamQueryGift param, QueryType qType, PageGift gen) { 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]; } List <ResultFishlordExpRate> qresult = (List <ResultFishlordExpRate>)user.getQueryResult(qType /*QueryType.queryTypeFishlordDeskParam*/); bool alt = true; foreach (var info in qresult) { tr = new TableRow(); table.Rows.Add(tr); if (alt) { tr.CssClass = "alt"; } alt = !alt; m_content[0] = info.m_roomId.ToString(); m_content[1] = info.m_totalIncome.ToString(); m_content[2] = info.m_totalOutlay.ToString(); m_content[3] = info.getDelta().ToString(); m_content[4] = info.getFactExpRate(); m_content[5] = info.m_abandonedbullets.ToString(); for (int j = 0; j < s_head.Length; j++) { TableCell td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[j]; } } param.m_state--; string page_html = "", foot_html = ""; gen.genPage(param, m_callURL /*@"/appaspx/stat/StatFishlordDeskEarningsRate.aspx"*/, ref page_html, ref foot_html, user); m_page = page_html; m_foot = foot_html; }