// 套牛牛的分类统计 private OpRes queryCalfStat(GMUser user) { List <Dictionary <string, object> > dataList = DBMgr.getInstance().executeQuery(TableName.CALF_ROPING_LOG, user.getDbServerID(), DbName.DB_PUMP); if (dataList == null) { return(OpRes.opres_success); } for (int i = 0; i < dataList.Count; i++) { ResultCalfRopingLogItem item = new ResultCalfRopingLogItem(); m_result2.Add(item); Dictionary <string, object> data = dataList[i]; if (data.ContainsKey("passid")) { item.m_passId = Convert.ToInt32(data["passid"]); } if (data.ContainsKey("calfid")) { item.m_calfId = Convert.ToInt32(data["calfid"]); } if (data.ContainsKey("hitcount")) { item.m_hitCount = Convert.ToInt64(data["hitcount"]); } } return(OpRes.opres_success); }
private void genTable(Table table, OpRes res, ParamGameCalfRoping param, 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, k = 0; for (i = 0; i < s_head.Length; i++) { td = new TableCell(); tr.Cells.Add(td); td.Text = s_head[i]; } List <ResultCalfRopingLogItem> qresult = (List <ResultCalfRopingLogItem>)user.getQueryResult(param, QueryType.queryTypeGameCalfRoping); for (i = 0; i < qresult.Count; i++) { tr = new TableRow(); if ((i & 1) == 0) { tr.CssClass = "alt"; } m_result.Rows.Add(tr); ResultCalfRopingLogItem item = qresult[i]; m_content[0] = item.m_passId.ToString(); m_content[1] = item.getName(); m_content[2] = item.m_hitCount.ToString(); for (k = 0; k < s_head.Length; k++) { td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[k]; } } }
private int sortLevel(ResultCalfRopingLogItem p1, ResultCalfRopingLogItem p2) { return(p1.m_passId - p2.m_passId); }