protected void Page_Load(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(_DBName))
        {
            DivQryCondition.Visible = false;
            DivQryResult.Visible    = false;
            labErrMsg.Visible       = true;
            labErrMsg.Text          = Util.getHtmlMessage(Util.HtmlMessageKind.ParaError, string.Format(SinoPac.WebExpress.Common.Properties.Resources.Msg_ParaNotFound1, "DBName"));
            return;
        }

        //限定特定資料表
        if (!string.IsNullOrEmpty(_LogTable))
        {
            DataLogTable.ucTextData   = _LogTable;
            DataLogTable.ucIsReadOnly = true;
        }

        //限定特定鍵值
        if (!string.IsNullOrEmpty(_LogKey))
        {
            DataLogKey.ucTextData   = _LogKey;
            DataLogKey.ucIsReadOnly = true;
        }

        if (_AllowPurgeYN.ToUpper() == "Y")
        {
            btnPurgeTable.Visible = true;
        }
        else
        {
            btnPurgeTable.Visible = false;
        }

        if (!IsPostBack)
        {
            btnPurgeTable.ToolTip       = "清除[AppDataLog]所有資料";
            btnPurgeTable.OnClientClick = "return confirm('確定清除[" + _DBName + "]資料庫內,[AppDataLog]資料表的所有資料?');";

            DataLogType.ucSourceDictionary = _Dic_AppDataLogType;
            DataLogType.Refresh();

            //若同時指定 _DBName,_LogTable,_LogKey,則會隱藏查詢條件區,直接顯示結果
            if (!string.IsNullOrEmpty(_DBName) && !string.IsNullOrEmpty(_LogTable) && !string.IsNullOrEmpty(_LogKey))
            {
                DivQryCondition.Visible = false;
                ShowQryResult();
            }
        }
    }
Beispiel #2
0
        private DataLogDTO GetAfterUpdateExceptionLog(LetterDTO message, Exception Exception, DataLogType logType)
        {
            var dataLog = new DataLogDTO();

            dataLog.LocationInfo   = "";
            dataLog.Duration       = 0;
            dataLog.MinorException = true;
            dataLog.MainType       = logType;
            dataLog.DatItem        = message.DataItem;
            dataLog.LetterItemLog.AfterUpdateException = Exception.Message;
            return(dataLog);
        }
Beispiel #3
0
        private DataLogDTO GetUpdateLetterDataLog(LetterDTO message, string exceptionMessage, DataLogType logType)
        {
            var dataLog = new DataLogDTO();

            dataLog.LocationInfo  = "";
            dataLog.Duration      = 0;
            dataLog.DatItem       = message.DataItem;
            dataLog.MainType      = logType;
            dataLog.RelatedItemID = message.ID;
            if (!string.IsNullOrEmpty(exceptionMessage))
            {
                dataLog.MajorException = true;
                dataLog.MajorFunctionExceptionMessage = exceptionMessage;
                //dataLog.ArchiveItemLog = new ArchiveItemLogDTO();
                //dataLog.ArchiveItemLog.Exception = exceptionMessage;
            }
            return(dataLog);
        }