public void ProcessRequest(HttpContext context) { RightMgr.getInstance().opCheck(RightDef.OP_WEEK_CHAMPION_SETTING, context.Session, context.Response); GMUser user = (GMUser)context.Session["user"]; ParamGrandPrixWeekChampion p = new ParamGrandPrixWeekChampion(); p.m_op = Convert.ToInt32(context.Request.Form["op"]); p.m_param = Convert.ToString(context.Request.Form["param"]); p.m_score = Convert.ToString(context.Request.Form["score"]); OpRes res = user.doDyop(p, DyOpType.opTypeWeekChampionControl); string str = OpResMgr.getInstance().getResultString(res); Dictionary <string, object> retVal = new Dictionary <string, object>(); retVal.Add("op", p.m_op); retVal.Add("param", p.m_param); retVal.Add("score", p.m_score); retVal.Add("resultStr", str); retVal.Add("result", (int)res); if (!string.IsNullOrEmpty(p.m_retNickName)) { retVal.Add("nickName", p.m_retNickName); } context.Response.ContentType = "text/plain"; context.Response.Write(ItemHelp.genJsonStr(retVal)); }
protected void onQuery() { GMUser user = (GMUser)Session["user"]; ParamGrandPrixWeekChampion param = new ParamGrandPrixWeekChampion(); param.m_op = ParamGrandPrixWeekChampion.CUR_SAFE_ACCOUNT; user.doDyop(param, DyOpType.opTypeWeekChampionControl); DyOpMgr mgr = user.getSys <DyOpMgr>(SysType.sysTypeDyOp); DyOpWeekChampionControl dy = (DyOpWeekChampionControl)mgr.getDyOp(DyOpType.opTypeWeekChampionControl); genTable(m_result, OpRes.opres_success, dy); }