예제 #1
0
        private void UpdateTable1(bool initial)
        {
            var allData = new Dictionary <string, object>();

            if (!initial)
            {
                btnSearch.Enabled            = false;
                wbInvestorsInfo.DocumentText = "";
                var r = new Dictionary <string, object>();
                r["datepoint"] = dtpSearchDate.Value.AddDays(1).TruncToStart();
                var dlg = new BatchProcessMultipleServers();
                dlg.StartPosition = FormStartPosition.CenterParent;
                dlg.ALL_SEVERS.Add(async() => { return(await DataStatistic.DailyStatistic1(r)); });
                dlg.ALL_SEVERS.Add(async() => { return(await DataStatistic.DailyStatistic2(r)); });
                dlg.ALL_SEVERS.Add(async() => { return(await DataStatistic.DailyStatistic3(r)); });
                dlg.ALL_SEVERS.Add(async() => { return(await DataStatistic.DailyStatistic4(r)); });
                dlg.ALL_SEVERS.Add(async() => { return(await DataStatistic.DailyStatistic5(r)); });
                dlg.ShowDialog();

                foreach (var d in dlg.AllResult)
                {
                    if (d.IsOk)
                    {
                        Commons.DictionaryAddResult(allData, d);
                    }
                }
            }

            string info = "<p>人数单位:个,金额单位:元</p>";

            info += "<table border=1 cellspacing=0 align=center>";
            for (int row = 0; row < m_allData.Count; ++row)
            {
                info += string.Format("<tr><td {0} {1}><b>&nbsp;{3}</b></td><td {0} {2}>&nbsp;{4}</td> <td {0} {1}><b>&nbsp;{5}</b></td><td {0} {2}>&nbsp;{6}</td></tr>",
                                      "align=center valign=middle", "width=210", "width=110",
                                      m_allData[row].Item1, allData.GetOrDefault <string>(m_allData[row].Item2),
                                      m_allData[row].Item3, allData.GetOrDefault <string>(m_allData[row].Item4));
            }
            info += "</table>";

            info += string.Format(@"<p> </p>
                    <dl><dt>投资注册人数:</dt>
                    <dd>第一次投资时间在{0}的人数</dd></dl>
                    <dl><dt>新增注册人数:</dt>
                    <dd>注册时间在{0}的人数</dd></dl>
                    <dl><dt>提现人数:</dt>
                    <dd>在{0}曾经成功提现的人数(分为投资人和其他两类)</dd></dl>
                    <dl><dt>充值人数:</dt>
                    <dd>在{0}曾经成功充值的人数(分为投资人和其他两类)</dd></dl>
                    <dl><dt>投资人数:</dt>
                    <dd>在{0}曾经成功投资的人数</dd></dl>
                    <dl><dt>提现金额:</dt>
                    <dd>在{0}曾经成功提现的总金额(分为投资人和其他两类)</dd></dl>
                    <dl><dt>充值金额:</dt>
                    <dd>在{0}曾经成功充值的总金额(分为投资人和其他两类)</dd></dl>
                    <dl><dt>投资金额:</dt>
                    <dd>在{0}曾经成功投资的总金额</dd></dl>
                    <dl><dt>债权转让成交金额:</dt>
                    <dd>在{0}曾经成功转让的标价总额</dd></dl>
                    <dl><dt>借款余额:</dt>
                    <dd>新系统截止到统计日期结束的总放款-总还本</dd></dl>"
                                  , "指定日的00:00:00到指定日的23:59:59之间");

            wbInvestorsInfo.DocumentText = info;

            btnSearch.Enabled = true;
        }
예제 #2
0
        private void UpdateTable(bool initial)
        {
            var allData = new Dictionary <string, object>();

            if (!initial)
            {
                btnSearch.Enabled            = false;
                wbDataStatistic.DocumentText = "";

                var r   = new Dictionary <string, object>();
                var now = dtpSearchDate.Value;
                r["datepoint1"] = new DateTime(now.Year, now.Month, 1).AddDays(-1).TruncToEnd();
                r["datepoint2"] = new DateTime(now.Year, now.Month, 1).AddMonths(1).TruncToStart();
                var dlg = new BatchProcessMultipleServers();
                dlg.StartPosition = FormStartPosition.CenterParent;
                dlg.ALL_SEVERS.Add(async() => { return(await DataStatistic.MonthStatistic1(r)); });
                dlg.ALL_SEVERS.Add(async() => { return(await DataStatistic.MonthStatistic2(r)); });
                dlg.ALL_SEVERS.Add(async() => { return(await DataStatistic.MonthStatistic3(r)); });
                dlg.ALL_SEVERS.Add(async() => { return(await DataStatistic.MonthStatistic4(r)); });
                dlg.ALL_SEVERS.Add(async() => { return(await DataStatistic.MonthStatistic5(r)); });
                dlg.ShowDialog();

                foreach (var d in dlg.AllResult)
                {
                    if (d.IsOk)
                    {
                        Commons.DictionaryAddResult(allData, d);
                    }
                }
            }

            string info = "<p>人数单位:个,金额单位:元</p>";

            info += "<table border=1 cellspacing=0 align=center>";
            for (int row = 0; row < m_model.Count; ++row)
            {
                info += string.Format("<tr><td {0} {1}><b>&nbsp;{3}</b></td><td {0} {2}>&nbsp;{4}</td> <td {0} {1}><b>&nbsp;{5}</b></td><td {0} {2}>&nbsp;{6}</td></tr>",
                                      "align=center valign=middle", "width=220", "width=110",
                                      GetCellStr(m_model[row][0], allData), GetCellStr(m_model[row][1], allData),
                                      GetCellStr(m_model[row][2], allData), GetCellStr(m_model[row][3], allData));
            }
            info += "</table>";

            info += string.Format(@"<p> </p>
                                   <dl><dt>投资注册人数:</dt>
                                   <dd>第一次投资时间在{0}的人数</dd></dl>
                                   <dl><dt>新增注册人数:</dt>
                                   <dd>注册时间在{0}的人数</dd></dl>
                                   <dl><dt>提现人数:</dt>
                                   <dd>在{0}曾经成功提现的人数(分为投资人和其他两类)</dd></dl>
                                   <dl><dt>充值人数:</dt>
                                   <dd>在{0}曾经成功充值的人数(分为投资人和其他两类)</dd></dl>
                                   <dl><dt>投资人数:</dt>
                                   <dd>在{0}曾经成功投资的人数</dd></dl>
                                   <dl><dt>提现金额:</dt>
                                   <dd>在{0}曾经成功提现的总金额(分为投资人和其他两类)</dd></dl>
                                   <dl><dt>充值金额:</dt>
                                   <dd>在{0}曾经成功充值的总金额(分为投资人和其他两类)</dd></dl>
                                   <dl><dt>投资金额:</dt>
                                   <dd>在{0}曾经成功投资的总金额</dd></dl>
                                   <dl><dt>债权转让成交金额:</dt>
                                   <dd>在{0}曾经成功转让的标价总额</dd></dl>
                                   <dl><dt>借款余额:</dt>
                                   <dd>新系统截止到统计月结束的总放款-总还本</dd></dl>", "指定月");

            wbDataStatistic.DocumentText = info;


            btnSearch.Enabled = true;
        }