protected void genTable(Table table, GMUser user) { 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]; } ParamInformHead param = new ParamInformHead(); OpRes res = user.doQuery(param, QueryType.queryTypeInformHead); List <ResultnformHeadItem> qresult = (List <ResultnformHeadItem>)user.getQueryResult(QueryType.queryTypeInformHead); URLParam uparam = new URLParam(); uparam.m_text = "查看"; uparam.m_url = @"/appaspx/operation/OperationFreezeHead.aspx"; uparam.m_key = "playerId"; for (i = 0; i < qresult.Count; i++) { ResultnformHeadItem item = qresult[i]; m_content[0] = item.m_time; m_content[1] = item.m_informerId.ToString(); m_content[2] = item.m_dstPlayerId.ToString(); uparam.m_value = item.m_dstPlayerId.ToString(); m_content[3] = Tool.genHyperlink(uparam); m_content[5] = Tool.getCheckBoxHtml("playerList", item.m_dstPlayerId.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); if (j == 4) { Image img = new Image(); img.Width = 72; img.Height = 72; img.ImageUrl = item.m_headURL; td.Controls.Add(img); } else { td.Text = m_content[j]; } } } }
protected void onDelPlayer(object sender, EventArgs e) { ParamInformHead param = new ParamInformHead(); param.m_playerList = m_playerList; param.m_opType = 1; GMUser user = (GMUser)Session["user"]; user.doQuery(param, QueryType.queryTypeInformHead); genTable(m_result, user); }
public void ProcessRequest(HttpContext context) { RightMgr.getInstance().opCheck(RightDef.OP_INFORM_HEAD, context.Session, context.Response); GMUser user = (GMUser)context.Session["user"]; string str = ""; int op = Convert.ToInt32(context.Request.Form["op"]); switch (op) { case 0: { ParamInformHead param = new ParamInformHead(); param.m_playerList = context.Request.Form["playerList"]; param.m_opType = 1; OpRes res = user.doQuery(param, QueryType.queryTypeInformHead); Dictionary <string, object> ret = new Dictionary <string, object>(); ret.Add("result", (int)res); ret.Add("playerId", param.m_playerList); str = ItemHelp.genJsonStr(ret); } break; case 1: { ParamFreezeHeadInfo p = new ParamFreezeHeadInfo(); p.m_playerId = context.Request.Form["playerList"]; p.m_freezeDays = ""; DyOpMgr mgr = user.getSys <DyOpMgr>(SysType.sysTypeDyOp); OpRes res = mgr.doDyop(p, DyOpType.opTypeFreezeHead, user); str = OpResMgr.getInstance().getResultString(res); } break; } context.Response.ContentType = "text/plain"; context.Response.Write(str); }