private void genTableByDay(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.statTypeSellerAdmin);
            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];
            }

            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);

                m_content[0] = item.m_time;
                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();

                for (j = 0; j < s_head.Length; j++)
                {
                    td = new TableCell();
                    tr.Cells.Add(td);
                    td.Text = m_content[j];
                }
            }
        }
Esempio n. 2
0
    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);
    }