public void genTableDetailResult(Table table, OpRes res, GMUser user, ParamWinLose param, string[] head) { 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; // 表头 for (i = 0; i < head.Length; i++) { td = new TableCell(); tr.Cells.Add(td); td.Text = s_head[i]; } URLParam uparam = new URLParam(); uparam.m_url = DefCC.ASPX_WIN_LOSE; uparam.m_text = "明细"; uparam.m_key = "acc"; uparam.m_className = "cLevelLink"; StatResultWinLose qresult = (StatResultWinLose)user.getStatResult(StatType.statTypeWinLose); m_sum.reset(); for (i = 0; i < qresult.m_detail.Count; i++) { tr = new TableRow(); table.Rows.Add(tr); if ((i & 1) == 0) { tr.CssClass = "alt"; } StatResultWinLoseItem item = qresult.m_detail[i]; uparam.m_value = item.m_acc; if (param.isDetailSubAgent()) { uparam.clearExParam(); uparam.addExParam("detail", param.m_detailType); uparam.addExParam("time", param.m_time.TrimStart(' ').TrimEnd(' ')); m_content[0] = Tool.genHyperlink(uparam); } else { m_content[0] = ""; } m_content[1] = StrName.s_accountType[item.m_accType]; // 级别,账号类型 m_content[2] = item.m_acc; // 账号 m_content[3] = ItemHelp.toStrByComma(ItemHelp.showMoneyValue(item.m_totalOutlay)); // 总押注 m_content[4] = ItemHelp.toStrByComma(ItemHelp.showMoneyValue(item.m_totalIncome)); // 总返还 m_content[5] = ItemHelp.toStrByComma(item.getWinLoseMoney()); // 总盈利 m_content[6] = ItemHelp.toStrByComma(ItemHelp.showMoneyValue(item.m_totalWashCount)); // 洗码量 if (param.isDetailSubAgent()) { m_content[7] = item.getWashRatio().ToString(); // 洗码比 m_content[8] = ItemHelp.toStrByComma(item.getWashCommission()); // 洗码佣金 m_content[9] = ItemHelp.toStrByComma(item.getTotalMoney()); // 总金额 m_content[10] = item.getAgentRatio().ToString(); // 代理占成 m_content[11] = ItemHelp.toStrByComma(item.getAgentHandInCompany()); // 代理交公司 m_content[12] = ItemHelp.toStrByComma(item.getOutlayHandInCompany()); // 交公司投注 m_content[13] = ItemHelp.toStrByComma(item.getWashCountHandInCompany()); // 交公司洗码量 m_content[14] = item.getCompanyProfitRatioStr(); // 公司获利比 } else { m_content[7] = item.getWashRatio().ToString(); // 洗码比 m_content[8] = ItemHelp.toStrByComma(item.getWashCommission()); // 洗码佣金 m_content[9] = ItemHelp.toStrByComma(item.getTotalMoney()); // 总金额 } for (int k = 0; k < head.Length; k++) { td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[k]; if (k == 14) { setColor(td, td.Text); } } m_sum.m_item.m_totalIncome += item.m_totalIncome; m_sum.m_item.m_totalOutlay += item.m_totalOutlay; m_sum.m_item.m_totalWashCount += item.m_totalWashCount; m_sum.m_washCommission += item.getWashCommission(); m_sum.m_totalMoney += item.getTotalMoney(); m_sum.m_agentHandInCompany += item.getAgentHandInCompany(); m_sum.m_outlayHandInCompany += item.getOutlayHandInCompany(); m_sum.m_washCountHandInCompany += item.getWashCountHandInCompany(); } addFootSum(table, param.isDetailSubAgent()); }
public void genTable(Table table, OpRes res, 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; } StatResultSeller qresult = (StatResultSeller)user.getStatResult(StatType.statTypeSellerStep); int i = 0, j = 0; // 表头 for (i = 0; i < s_head.Length; i++) { td = new TableCell(); tr.Cells.Add(td); td.Text = s_head[i]; } URLParam uParam = new URLParam(); uParam.m_key = "acc"; uParam.m_className = "cLevelLink"; uParam.m_url = "/appaspx/account/AccountStatSellerStep.aspx"; uParam.m_text = "查看下级"; StatResultSellerItem sum = new StatResultSellerItem(); for (i = 0; i < qresult.m_items.Count; i++) { StatResultSellerItem item = qresult.m_items[i]; tr = new TableRow(); if ((i & 1) == 0) { tr.CssClass = "alt"; } table.Rows.Add(tr); uParam.m_value = item.m_seller; uParam.clearExParam(); m_content[0] = item.m_seller; m_content[1] = item.m_addScore.ToString(); m_content[2] = item.m_addScoreCount.ToString(); m_content[3] = item.m_desScore.ToString(); m_content[4] = item.m_desScoreCount.ToString(); m_content[5] = (item.m_addScore - item.m_desScore).ToString(); sum.m_addScore += item.m_addScore; sum.m_desScore += item.m_desScore; sum.m_addScoreCount += item.m_addScoreCount; sum.m_desScoreCount += item.m_desScoreCount; if (item.m_addScore == 0 && item.m_desScore == 0) { m_content[6] = ""; } else { uParam.addExParam("time", item.m_time.TrimStart(' ').TrimEnd(' ')); m_content[6] = Tool.genHyperlink(uParam); } for (j = 0; j < s_head.Length; j++) { td = new TableCell(); tr.Cells.Add(td); td.Text = m_content[j]; } } genFoot(table, sum); }