ExceptionDetail.aspx.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:3k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Collections;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Web;
- using System.Web.SessionState;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.HtmlControls;
- namespace OThinker.H3.Portal
- {
- /// <summary>
- /// 用于查看异常的详细信息
- /// </summary>
- public partial class ExceptionDetail : PortalPage
- {
- #region 参数
- private string ExceptionID
- {
- get
- {
- return this.Request.QueryString[Param_ExceptionID];
- }
- }
- #endregion
- protected void Page_Load(object sender, System.EventArgs e)
- {
- if(!this.IsPostBack)
- {
- // 验证是否具有管理员权限
- if (!this.UserValidator.ValidateAdministrator())
- {
- this.NotifyMessage(LackOfAuth);
- }
- }
- // SEMI ERROR,这段没有优化
- OThinker.H3.Exceptions.ExceptionLog log = OThinker.H3.Server.Engine.ExceptionManager.GetException(this.ExceptionID);
- if(log != null)
- {
- this.lblAction.Text = log.Action.ToString();
- this.lblBlocked.Text = log.Block.ToString();
- this.lblInstanceID.Text = log.InstanceId.ToString();
- this.lblExceptionID.Text = log.ExceptionID.ToString();
- this.lblExceptionMessage.Text = log.Message.Replace("rn", "<BR>");
- if(log.State == OThinker.H3.Exceptions.ExceptionState.Fixed)
- {
- this.lblFixed.Text = "已修复";;
- this.lblFixedTime.Text = log.FixedTime.ToString();
- this.btnFix.Enabled = false;
- this.lnkFix.Enabled = false;
- }
- else
- {
- this.lblFixed.Text = "未修复";;
- this.lblFixedTime.Text = null;
- this.btnFix.Enabled = true;
- this.lnkFix.Enabled = true;
- }
- this.lblWorkflowPackage.Text = log.WorkflowPackage;
- this.lblWorkflowName.Text = log.WorkflowName;
- this.lblWorkflowVersion.Text = log.WorkflowVersion.ToString();
- this.lblSourceName.Text = log.SourceName;
- this.lblSourceType.Text = log.SourceType.ToString();
- this.lblThrownTime.Text = log.ThrownTime.ToString();
- }
- }
- #region Web Form Designer generated code
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN: This call is required by the ASP.NET Web Form Designer.
- //
- InitializeComponent();
- base.OnInit(e);
- }
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.btnFix.Click += new System.Web.UI.ImageClickEventHandler(this.btnFix_Click);
- }
- #endregion
- protected void btnFix_Click(object sender, System.EventArgs e)
- {
- this.Fix();
- }
- protected void btnFix_Click(object sender, System.Web.UI.ImageClickEventArgs e)
- {
- this.Fix();
- }
- private void Fix()
- {
- this.lnkFix.Enabled = false;
- this.btnFix.Enabled = false;
- if (this.lblExceptionID.Text != null)
- {
- OThinker.H3.Server.Engine.ExceptionManager.FixException(this.lblExceptionID.Text);
- }
- }
- }
- }