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++) { ResultGameHistoryCrocodiletIem item = (ResultGameHistoryCrocodiletIem)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(); // 开奖结果 m_content[4] = item.getSpotLight(); m_content[5] = item.getAllPrizes(); m_content[6] = item.getHandSel(); for (j = 0; j < s_head.Length; j++) { td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[j]; } } }
// 填充鳄鱼大亨数据 void fillCrocodile(ParamGameHistory param, GMUser user, List <Dictionary <string, object> > dataList) { for (int i = 0; i < dataList.Count; i++) { Dictionary <string, object> data = dataList[i]; ResultGameHistoryCrocodiletIem tmp = new ResultGameHistoryCrocodiletIem(); m_result.Add(tmp); tmp.m_time = Convert.ToDateTime(data["genTime"]).ToLocalTime().ToString(ConstDef.DATE_TIME24); tmp.m_gameId = (int)GameId.crocodile; tmp.m_totalBound = Convert.ToInt64(data["gameIndex"]); tmp.m_awardType = Convert.ToInt32(data["awardType"]); tmp.m_handSel = Convert.ToInt32(data["handselProb"]); string[] arr = Tool.split(Convert.ToString(data["resultStr"]), ',', StringSplitOptions.RemoveEmptyEntries); for (int k = 0; k < arr.Length; k++) { tmp.m_result.Add(Convert.ToInt32(arr[k])); } } }