public override 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; } List <ResultGameHistoryItem> qresult = (List <ResultGameHistoryItem>)user.getQueryResult(QueryType.queryTypeGameHistory); 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++) { ResultGameHistoryShcdItem item = (ResultGameHistoryShcdItem)qresult[i]; tr = new TableRow(); if ((i & 1) == 0) { tr.CssClass = "alt"; } table.Rows.Add(tr); m_content[0] = item.m_time; m_content[1] = StrName.s_gameName[item.m_gameId]; m_content[2] = item.m_totalBound.ToString(); m_content[3] = item.getResult(); // 开奖结果 for (j = 0; j < s_head.Length; j++) { td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[j]; } } }
// 填充黑红梅方数据 void fillShcd(ParamGameHistory param, GMUser user, List <Dictionary <string, object> > dataList) { for (int i = 0; i < dataList.Count; i++) { Dictionary <string, object> data = dataList[i]; ResultGameHistoryShcdItem tmp = new ResultGameHistoryShcdItem(); m_result.Add(tmp); tmp.m_time = Convert.ToDateTime(data["genTime"]).ToLocalTime().ToString(ConstDef.DATE_TIME24); tmp.m_gameId = (int)GameId.shcd; tmp.m_totalBound = Convert.ToInt64(data["gameIdx"]); tmp.m_cardType = Convert.ToInt32(data["cardType"]); tmp.m_cardValue = Convert.ToInt32(data["cardValue"]); } }