Beispiel #1
0
    protected override void OnPreRender(EventArgs e)
    {
        GetMinMaxDate();

        uint.TryParse(RBmenuList.SelectedValue, out menuv);
        if (menuv == 1)
        {
            SYSLOG_STATIONSTAT[] stastat = SysConsole.GetLogStationStat(nMinDate, nMaxDate);
            for (int i = 0; i < stastat.Length; i++)
            {
                szStationStatOut += "<tr>";
                if (string.IsNullOrEmpty(stastat[i].szStationSN))
                {
                    szStationStatOut += "<td>空</td>";
                }
                else
                {
                    szStationStatOut += "<td>" + stastat[i].szStationSN + "</td>";
                }
                szStationStatOut += "<td>" + stastat[i].dwOKCount + "</td>";
                szStationStatOut += "<td>" + stastat[i].dwErrorCount + "</td>";
                szStationStatOut += "<td>" + GetUseTime(stastat[i].dwTotalUseTime) + "</td>";
                szStationStatOut += "<td>" + GetMemoryStr(stastat[i].dwParamTotalSize) + "</td>";
                szStationStatOut += "<td>" + GetMemoryStr(stastat[i].dwResultTotalSize) + "</td>";
                szStationStatOut += "</tr>";
            }

            SYSLOG_CMDSTAT[] stat = SysConsole.GetLogCmdStat(nMinDate, nMaxDate, 1);
            for (int i = 0; i < stat.Length; i++)
            {
                szModuleStatOut += "<tr>";
                szModuleStatOut += "<td>" + GetModuleName(stat[i].dwCmdModule) + "</td>";
                szModuleStatOut += "<td>" + stat[i].dwOKCount + "</td>";
                szModuleStatOut += "<td>" + stat[i].dwErrorCount + "</td>";
                szModuleStatOut += "<td>" + GetUseTime(stat[i].dwTotalUseTime) + "</td>";
                szModuleStatOut += "<td>" + GetMemoryStr(stat[i].dwParamTotalSize) + "</td>";
                szModuleStatOut += "<td>" + GetMemoryStr(stat[i].dwResultTotalSize) + "</td>";
                szModuleStatOut += "<td>" + stat[i].dwStationCount + "</td>";
                szModuleStatOut += "</tr>";
            }

            SYSLOG_CMDSTAT[] cmdstat = SysConsole.GetLogCmdStat(nMinDate, nMaxDate, 0);
            for (int i = 0; i < cmdstat.Length; i++)
            {
                string szDefine;
                string szMemo;
                string szCmdName = GetCmdName(cmdstat[i].dwCmdModule, out szDefine, out szMemo);

                szCmdStatOut += "<tr>";
                szCmdStatOut += "<td>" + szCmdName + "</td>";
                szCmdStatOut += "<td>" + cmdstat[i].dwOKCount + "</td>";
                szCmdStatOut += "<td>" + cmdstat[i].dwErrorCount + "</td>";
                szCmdStatOut += "<td>" + GetUseTime(cmdstat[i].dwTotalUseTime) + "</td>";
                szCmdStatOut += "<td>" + GetUseTime(cmdstat[i].dwTotalUseTime / (cmdstat[i].dwOKCount + cmdstat[i].dwErrorCount)) + "</td>";
                szCmdStatOut += "<td>" + GetMemoryStr(cmdstat[i].dwParamTotalSize) + "</td>";
                szCmdStatOut += "<td>" + GetMemoryStr(cmdstat[i].dwResultTotalSize) + "</td>";
                szCmdStatOut += "<td>" + cmdstat[i].dwStationCount + "</td>";
                szCmdStatOut += "</tr>";
            }


            SessionData[] sdlist = SysConsole.GetSessionList();
            for (int i = 0; i < sdlist.Length; i++)
            {
                szSDListOut += "<tr>";
                szSDListOut += "<td>" + sdlist[i].szStationSN + "</td>";
                szSDListOut += "<td>" + sdlist[i].szSessionID + "</td>";
                szSDListOut += "<td>" + new DateTime(sdlist[i].tick).ToString() + "</td>";
                szSDListOut += "<td>" + sdlist[i].szUserName + "</td>";
                szSDListOut += "<td>" + sdlist[i].ip + "</td>";
                szSDListOut += "</tr>";
            }
        }
        else if (menuv == 2)
        {
            if (CheckBoxALL.Checked)
            {
                mode = 0;
            }
            else
            {
                mode = 1;
            }
            uint.TryParse(ListViewType.SelectedValue, out viewtype);
            uint.TryParse(FILTER_MODULE.SelectedValue, out filter);

            /*
             * if (filter == 1)
             * {
             *  filter = UniWebLib.PRModule.PUBEROOM_BASE;
             * }
             * else if (filter == 2)
             * {
             *  filter = UniWebLib.PRModule.STATION_BASE;
             * }
             * else if (filter == 3)
             * {
             *  filter = UniWebLib.PRModule.DEVICE_BASE;
             * }
             * else if (filter == 4)
             * {
             *  filter = UniWebLib.PRModule.ADMIN_BASE;
             * }
             * else if (filter == 5)
             * {
             *  filter = UniWebLib.PRModule.RCNAVI_BASE;
             * }
             * else if (filter == 6)
             * {
             *  filter = UniWebLib.PRModule.CONTROL_BASE;
             * }
             * else if (filter == 7)
             * {
             *  filter = UniWebLib.PRModule.USERULE_BASE;
             * }
             * else if (filter == 8)
             * {
             *  filter = UniWebLib.PRModule.ACCOUNT_BASE;
             * }
             * else if (filter == 9)
             * {
             *  filter = UniWebLib.PRModule.CARD_BASE;
             * }*/

            if (viewtype == 1)
            {
                OnPreRender_Icon();
            }
            else if (viewtype == 2)
            {
                OnPreRender_Table();
            }
        }
        else if (menuv == 3)
        {
            uint rs = 1;
            uint.TryParse(ListViewRS.SelectedValue, out rs);

            SYSLOG_URLSTAT[] urlstat = SysConsole.GetLogURLStat(nMinDate, nMaxDate, rs);
            for (int i = 0; i < urlstat.Length; i++)
            {
                szURLListOut += "<tr>";
                szURLListOut += "<td>" + urlstat[i].szURL + "</td>";
                szURLListOut += "<td>" + urlstat[i].dwCount + "</td>";
                szURLListOut += "<td>" + GetUseTime(urlstat[i].dwAvgUseTime) + "</td>";
                szURLListOut += "<td>" + urlstat[i].dwIndex + "</td>";
                szURLListOut += "<td>" + urlstat[i].szMemo + "</td>";
                szURLListOut += "</tr>";
            }
        }

        base.OnPreRender(e);
    }