⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exloginforule.cs

📁 异常处理包,通用 异常处理包,通用 异常处理包,通用
💻 CS
字号:
using System;

using ZTE.PDM.PUB.DataAccess;

namespace ExManagement
{
	/// <summary>
	/// ExLogInfoRule,为DefaultLogHandler提供访问数据库的操作方法
	/// 在我的项目中这个类需要被部署到Remoting的服务器端,因此需要从System.MarshalByRefObject继承
	/// </summary>
	public class ExLogInfoRule : System.MarshalByRefObject
	{
		public ExLogInfoRule()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}

		/// <summary>
		/// 方法名称:GetLogInfoSequence
		/// 方法摘要:获取异常记录的序列号
		/// </summary>
		/// <returns></returns>
		public string GetLogInfoSequence()
		{
			string intSeq = "";
			PUB_LOG_PKG mLogInfoPkg = new PUB_LOG_PKG();  // 实例化数据访问层对象

			try
			{
				// 调用数据访问组件
				mLogInfoPkg.GETLOGINFOSEQUENCE(ref intSeq);
			}
			catch(Exception ex)
			{
				throw(ex);
			}
			return intSeq;
		}

		/// <summary>
		/// 方法名称:InsertLogInfo
		/// 方法摘要:往异常记录表中插入记录
		/// 作    者:夏应成
		/// </summary>
		public void InsertLogInfo(string serial_id, string strLayerName, string excType, string excMsg, string excPosition, string userID, params string [] strExtension)
		{
			PUB_LOG_PKG mLogInfoPkg = new PUB_LOG_PKG();  // 实例化数据访问层对象

			try
			{
				// 调用数据访问组件
				mLogInfoPkg.INSERLOGINFO(serial_id,excType,excMsg,excPosition,userID,strLayerName);

				if((strExtension != null) && (strExtension.Length != 0))
				{
					for(int i = 0; i < strExtension.Length; i++)
					{
						mLogInfoPkg.INSERPARAMLOGINFO(serial_id, strExtension[i].ToString());
					}
				}
			}
			catch(Exception ex)
			{
				throw(ex);
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -