// 期望盈利率表格 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]; } OpRes res = user.doQuery(null, QueryType.queryTypeShcdParam); List <ResultShcdParam> qresult = (List <ResultShcdParam>)user.getQueryResult(QueryType.queryTypeShcdParam); for (i = 0; i < qresult.Count; i++) { ResultShcdParam item = qresult[i]; m_content[0] = StrName.s_shcdRoomName[item.m_roomId]; m_content[1] = item.m_expRate.ToString(); m_content[2] = item.m_totalIncome.ToString(); m_content[3] = item.m_totalOutlay.ToString(); m_content[4] = item.getDelta().ToString(); m_content[5] = item.getFactExpRate().ToString(); m_content[6] = item.getLevelName(); m_content[7] = item.m_jokerCount.ToString(); m_content[8] = item.m_cheatSE; m_content[9] = item.m_curPlayerCount.ToString(); m_content[10] = Tool.getCheckBoxHtml("roomList", item.m_roomId.ToString(), false); 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]; } } }
// 期望盈利率表格 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]; } OpRes res = user.doQuery(null, QueryType.queryTypeShcdParam); List <ResultShcdParam> qresult = (List <ResultShcdParam>)user.getQueryResult(QueryType.queryTypeShcdParam); for (i = 0; i < qresult.Count; i++) { ResultShcdParam item = qresult[i]; m_content[0] = StrName.s_roomName[item.m_roomId - 1]; m_content[1] = item.m_expRate.ToString(); m_content[2] = ItemHelp.showMoneyValue(item.m_totalIncome).ToString(); m_content[3] = ItemHelp.showMoneyValue(item.m_totalOutlay).ToString(); m_content[4] = ItemHelp.showMoneyValue(item.getDelta()).ToString(); m_content[5] = 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]; } } }
private OpRes query(GMUser user) { List <Dictionary <string, object> > dataList = DBMgr.getInstance().executeQuery(TableName.SHCDCARDS_ROOM, user.getDbServerID(), DbName.DB_GAME); if (dataList == null) { return(OpRes.opres_success); } for (int i = 0; i < dataList.Count; i++) { ResultShcdParam info = new ResultShcdParam(); m_result.Add(info); info.m_roomId = Convert.ToInt32(dataList[i]["room_id"]); if (dataList[i].ContainsKey("ExpectEarnRate")) { info.m_expRate = Convert.ToDouble(dataList[i]["ExpectEarnRate"]); } else { info.m_expRate = 0.05; } if (dataList[i].ContainsKey("room_income")) // 总收入 { info.m_totalIncome = Convert.ToInt64(dataList[i]["room_income"]); } if (dataList[i].ContainsKey("room_outcome")) // 总支出 { info.m_totalOutlay = Convert.ToInt64(dataList[i]["room_outcome"]); } } return(OpRes.opres_success); }
private OpRes query(GMUser user) { List <Dictionary <string, object> > dataList = DBMgr.getInstance().executeQuery(TableName.SHCDCARDS_ROOM, user.getDbServerID(), DbName.DB_GAME, null, 0, 0, null, "room_id", true); if (dataList == null) { return(OpRes.opres_success); } for (int i = 0; i < dataList.Count; i++) { ResultShcdParam info = new ResultShcdParam(); m_result.Add(info); info.m_roomId = Convert.ToInt32(dataList[i]["room_id"]); if (dataList[i].ContainsKey("ExpectEarnRate")) { info.m_expRate = Convert.ToDouble(dataList[i]["ExpectEarnRate"]); } else { info.m_expRate = 0.05; } if (dataList[i].ContainsKey("room_income")) // 总收入 { info.m_totalIncome = Convert.ToInt64(dataList[i]["room_income"]); } if (dataList[i].ContainsKey("room_outcome")) // 总支出 { info.m_totalOutlay = Convert.ToInt64(dataList[i]["room_outcome"]); } if (dataList[i].ContainsKey("EarnRateControl")) { info.m_level = Convert.ToInt32(dataList[i]["EarnRateControl"]); } else { info.m_level = 0; } if (dataList[i].ContainsKey("next_joker_count")) { info.m_jokerCount = Convert.ToInt32(dataList[i]["next_joker_count"]); } else { info.m_jokerCount = 0; } if (dataList[i].ContainsKey("beginCheatIndex") && dataList[i].ContainsKey("endCheatIndex")) { info.m_cheatSE = Convert.ToString(dataList[i]["beginCheatIndex"]) + "-" + Convert.ToString(dataList[i]["endCheatIndex"]); } else { info.m_cheatSE = ""; } if (dataList[i].ContainsKey("player_count")) { info.m_curPlayerCount = Convert.ToInt32(dataList[i]["player_count"]); } } return(OpRes.opres_success); }