HtmlGenericControl getChannelList(GMAccountItem gmInfo) { HtmlGenericControl dp = new HtmlGenericControl(); dp.TagName = "select"; dp.Attributes.Add("multiple", "multiple"); dp.Attributes.Add("class", "form-control"); dp.ID = "channel_" + gmInfo.m_user; dp.ClientIDMode = ClientIDMode.Static; Dictionary <string, TdChannelInfo> data = TdChannel.getInstance().getAllData(); foreach (var item in data.Values) { HtmlGenericControl option = new HtmlGenericControl(); option.TagName = "option"; option.Attributes.Add("value", item.m_channelNo); option.InnerText = item.m_channelName; dp.Controls.Add(option); if (gmInfo.m_viewChannel.IndexOf(item.m_channelNo) >= 0) { option.Attributes.Add("selected", "selected"); } } return(dp); }
protected void Page_Load(object sender, EventArgs e) { RightMgr.getInstance().opCheck("operation", Session, Response); if (!IsPostBack) { GMUser user = (GMUser)Session["user"]; m_channel.Items.Add(new ListItem("全部平均", "")); if (user.m_type == "admin" || user.m_viewChannel == "all") { Dictionary <string, TdChannelInfo> data = TdChannel.getInstance().getAllData(); foreach (var item in data.Values) { m_channel.Items.Add(new ListItem(item.m_channelName, item.m_channelNo)); } } else { Dictionary <string, TdChannelInfo> data = TdChannel.getInstance().getAllData(); foreach (var item in data.Values) { if (user.m_viewChannel.IndexOf(item.m_channelNo) >= 0) { m_channel.Items.Add(new ListItem(item.m_channelName, item.m_channelNo)); } } } } }
public string getChannelName() { TdChannelInfo info = TdChannel.getInstance().getValue(m_channelId); if (info != null) { return(info.m_channelName); } return(m_channelId); }
protected void Page_Load(object sender, EventArgs e) { RightMgr.getInstance().opCheck(RightDef.OP_RECHARGE_POINT, Session, Response); if (!IsPostBack) { m_channel.Items.Add(new ListItem("全部", "")); Dictionary <string, TdChannelInfo> data = TdChannel.getInstance().getAllData(); foreach (var item in data.Values) { m_channel.Items.Add(new ListItem(item.m_channelName, item.m_channelNo)); } } }
public override void fillData(GMUser user, Table table) { TableRow tr = null; TableCell td = null; int i = 0; List <ResultLTVItem> qresult = (List <ResultLTVItem>)user.getQueryResult(QueryType.queryTypeLTV); foreach (var data in qresult) { TdChannelInfo info = TdChannel.getInstance().getValue(data.m_channel); if (info != null) { m_content[0] = info.m_channelName; } else { m_content[0] = data.m_channel; } m_content[1] = data.m_genTime; m_content[2] = data.m_regeditCount.ToString(); m_content[3] = data.get1DayAveRecharge(); m_content[4] = data.get3DayAveRecharge(); m_content[5] = data.get7DayAveRecharge(); m_content[6] = data.get14DayAveRecharge(); m_content[7] = data.get30DayAveRecharge(); m_content[8] = data.get60DayAveRecharge(); m_content[9] = data.get90DayAveRecharge(); tr = new TableRow(); table.Rows.Add(tr); if ((i & 1) == 0) { tr.CssClass = "alt"; } i++; for (int j = 0; j < s_head.Length; j++) { td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[j]; } } }
private void genTable(Table table, OpRes res, GMUser user) { TableRow tr = new TableRow(); TableCell td = null; ResultRechargePointStat qresult = (ResultRechargePointStat)user.getQueryResult(QueryType.queryTypeRechargePointStat); if (qresult.m_fields.Count == 0) { table.Rows.Add(tr); td = new TableCell(); tr.Cells.Add(td); td.Text = OpResMgr.getInstance().getResultString(res); return; } genFirstHead(table, qresult); genSecondHead(table, qresult); int i = 0, j = 0; for (i = 0; i < qresult.m_result.Count; i++) { m_content[0] = qresult.m_result[i].m_time.ToShortDateString(); // 该日期下的所有渠道 foreach (var cdata in qresult.m_result[i].m_dic) { tr = new TableRow(); table.Rows.Add(tr); TdChannelInfo ci = TdChannel.getInstance().getValue(cdata.Key.ToString()); if (ci != null) { m_content[1] = ci.m_channelName; // 渠道 } else { m_content[1] = "default"; } j = 2; foreach (var reason in qresult.m_fields) { ConsumeOneItem citem = cdata.Value.getValue(reason); if (citem != null) { m_content[j++] = citem.m_totalValue.ToString(); // +"/" + citem.m_totalCount.ToString(); m_content[j++] = citem.m_totalCount.ToString(); } else { m_content[j++] = ""; m_content[j++] = ""; } } for (j = 0; j < s_head.Length; j++) { td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[j]; } } } }
public void genTable(GMUser user, Table table, OpRes res) { 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, f = 0; for (; i < s_head.Length; i++) { td = new TableCell(); tr.Cells.Add(td); td.Text = s_head[i]; } i = 0; List <ResultActivationItem> qresult = (List <ResultActivationItem>)user.getQueryResult(QueryType.queryTypeTdActivation); foreach (var data in qresult) { f = 0; m_content[f++] = data.m_genTime.ToShortDateString(); TdChannelInfo info = TdChannel.getInstance().getValue(data.m_channel); if (info != null) { m_content[f++] = info.m_channelName; } else { m_content[f++] = data.m_channel; } m_content[f++] = data.m_regeditCount.ToString(); m_content[f++] = data.m_deviceActivationCount.ToString(); m_content[f++] = data.m_activeCount.ToString(); m_content[f++] = data.m_totalIncome.ToString(); m_content[f++] = data.m_rechargePersonNum.ToString(); m_content[f++] = data.m_rechargeCount.ToString(); m_content[f++] = data.m_wchatPublicNumIncome.ToString(); m_content[f++] = data.get2DayRemain(); m_content[f++] = data.get3DayRemain(); m_content[f++] = data.get7DayRemain(); m_content[f++] = data.get30DayRemain(); m_content[f++] = data.getARPU(); m_content[f++] = data.getARPPU(); m_content[f++] = data.getRechargeRate(); m_content[f++] = data.m_newAccIncome > -1 ? data.m_newAccIncome.ToString() : ""; m_content[f++] = data.getNewAccRechargeRate(); m_content[f++] = data.get2DayDevRemain(); m_content[f++] = data.get3DayDevRemain(); m_content[f++] = data.get7DayDevRemain(); m_content[f++] = data.get30DayDevRemain(); m_content[f++] = data.getAccNumberPerDev(); m_content[f++] = data.get2DayRemain(true); m_content[f++] = data.get3DayRemain(true); m_content[f++] = data.get7DayRemain(true); m_content[f++] = data.get30DayRemain(true); tr = new TableRow(); table.Rows.Add(tr); if ((i & 1) == 0) { tr.CssClass = "alt"; } i++; for (int j = 0; j < s_head.Length; j++) { td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[j]; } } }
protected void Page_Load(object sender, EventArgs e) { RightMgr.getInstance().opCheck(RightDef.SVR_RECHARGE_QUERY, Session, Response); m_res.InnerHtml = ""; if (IsPostBack) { m_gen.m_way = m_queryWay.SelectedIndex; } else { m_queryWay.Items.Add("通过玩家id查询"); m_queryWay.Items.Add("通过账号查询"); m_queryWay.Items.Add("通过订单号查询"); var allPlat = ResMgr.getInstance().m_plat; foreach (var d in allPlat) { if (d.Value.m_engName != "default") { m_platform.Items.Add(new ListItem(d.Value.m_chaName, d.Value.m_engName)); } } m_platform.SelectedIndex = 0; /* m_gameServer.Items.Add("全部"); * Dictionary<string, DbServerInfo> db = ResMgr.getInstance().getAllDb(); * foreach (DbServerInfo info in db.Values) * { * m_gameServer.Items.Add(new ListItem(info.m_serverName, info.m_serverId.ToString())); * }*/ m_rechargeResult.Items.Add("全部"); m_rechargeResult.Items.Add("成功"); m_rechargeResult.Items.Add("失败"); m_channel.Items.Add(new ListItem("全部", "")); Dictionary <string, TdChannelInfo> cd = TdChannel.getInstance().getAllData(); foreach (var item in cd.Values) { m_channel.Items.Add(new ListItem(item.m_channelName, item.m_channelNo)); } if (m_gen.parse(Request)) { m_queryWay.SelectedIndex = m_gen.m_way; m_param.Text = m_gen.m_param; m_time.Text = m_gen.m_time; for (int i = 0; i < m_platform.Items.Count; i++) { if (m_platform.Items[i].Value == m_gen.m_platKey) { m_platform.Items[i].Selected = true; break; } } m_rechargeResult.SelectedIndex = m_gen.m_result; m_range.Text = m_gen.m_range; for (int i = 0; i < m_channel.Items.Count; i++) { if (m_channel.Items[i].Value == m_gen.m_channelNo) { m_channel.Items[i].Selected = true; break; } } // m_gameServer.SelectedIndex = m_gen.m_serverIndex; onQueryRecharge(null, null); } } }