public override object getQueryResult(object param, GMUser user) { ParamGameCalfRoping p = (ParamGameCalfRoping)param; switch (p.m_queryContent) { case ParamGameCalfRoping.QUERY_CONTROL_PARAM: { return(m_result); } break; case ParamGameCalfRoping.QUERY_INDEPENDENT: { return(m_result1); } break; case ParamGameCalfRoping.QUERY_CALF: { return(m_result2); } break; case ParamGameCalfRoping.QUERY_LEVEL: { return(m_result3); } break; } return(null); }
protected void onStat(object sender, EventArgs e) { GMUser user = (GMUser)Session["user"]; ParamGameCalfRoping param = new ParamGameCalfRoping(); param.m_queryContent = ParamGameCalfRoping.QUERY_INDEPENDENT; OpRes res = user.doQuery(param, QueryType.queryTypeGameCalfRoping); genTable(m_result, res, param, user); }
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; } ResultIndependentCalfRoping qresult = (ResultIndependentCalfRoping)user.getQueryResult(param, QueryType.queryTypeGameCalfRoping); 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]; } i = 0; // Dictionary<int, CrocodileInfo> dict = qresult.m_betInfo.OrderBy(o => o.Key).ToDictionary(o => o.Key, p => p.Value); // foreach (var info in dict) { tr = new TableRow(); if ((i & 1) == 0) { tr.CssClass = "alt"; } m_result.Rows.Add(tr); ResultIndependentCalfRoping item = qresult; m_content[0] = item.m_enterCount.ToString(); m_content[1] = item.m_norRewardNum.ToString(); m_content[2] = item.m_norRewardGold.ToString(); m_content[3] = item.m_bigRewardNum.ToString(); m_content[4] = item.m_bigRewardGold.ToString(); m_content[5] = item.m_buyLifeNum.ToString(); for (k = 0; k < s_head.Length; k++) { td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[k]; } i++; } }
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 <ResultCalfRopingLevelItem> qresult = (List <ResultCalfRopingLevelItem>)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); ResultCalfRopingLevelItem item = qresult[i]; m_content[0] = item.m_passId.ToString(); m_content[1] = item.m_hitCount.ToString(); m_content[2] = item.allcount.ToString(); m_content[3] = item.getHitRate(); for (k = 0; k < s_head.Length; k++) { td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[k]; } } }
// 期望盈利率表格 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]; } ParamGameCalfRoping param = new ParamGameCalfRoping(); param.m_queryContent = ParamGameCalfRoping.QUERY_CONTROL_PARAM; OpRes res = user.doQuery(param, QueryType.queryTypeGameCalfRoping); List <ResultExpRateParam> qresult = (List <ResultExpRateParam>)user.getQueryResult(param, QueryType.queryTypeGameCalfRoping); for (i = 0; i < qresult.Count; i++) { ResultExpRateParam item = qresult[i]; m_content[0] = item.m_expRate.ToString(); m_content[1] = item.m_totalIncome.ToString(); m_content[2] = item.m_totalOutlay.ToString(); m_content[3] = item.getDelta().ToString(); m_content[4] = 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]; } } }
public override OpRes doQuery(object param, GMUser user) { OpRes res = OpRes.op_res_failed; ParamGameCalfRoping p = (ParamGameCalfRoping)param; switch (p.m_queryContent) { case ParamGameCalfRoping.QUERY_CONTROL_PARAM: { m_result.Clear(); res = queryParam(user); } break; case ParamGameCalfRoping.QUERY_INDEPENDENT: { m_result1.reset(); res = queryIndependent(user); } break; case ParamGameCalfRoping.QUERY_CALF: { m_result2.Clear(); res = queryCalfStat(user); m_result2.Sort(sortLevel); } break; case ParamGameCalfRoping.QUERY_LEVEL: { m_result3.Clear(); res = queryLevel(user); m_result3.Sort(sortLevel); } break; } return(res); }