//#===========================================================================//
//#
//# 类名称 : BoLoader
//# 机能概要 : 解耦
//# 作成者 : 王晓光
//# 做成日 : 2009/07/01
//# 版本 : 1.0.0.0
//# <变更履历>
//# 版本 日期 变更者 变更内容
//# -------------------------------------------------------------------------
//# 1.0.0.0 2009/07/01 王晓光 做成
//#
//#
//#===========================================================================//
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
namespace Systool.com.bases
{
class BoLoader
{
protected static readonly Hashtable HS=new Hashtable();
static BoLoader()
{
HS.Add("Systool.Fr_DBTInfo", "Systool.business.Bus_DBTInfo");
HS.Add("Systool.Fr_OKeyDefinition", "Systool.business.Bus_OKeyDefinition");
HS.Add("Systool.Fr_SysFuncDefinition", "Systool.business.Bus_SysFuncDefinition");
HS.Add("Systool.Fr_FDTableFieldSelect", "Systool.business.Bus_FDTableFieldSelect");
HS.Add("Systool.Fr_Main", "Systool.business.Bus_Main");
}
public static BaseBo getInstance(String key)
{
try
{
String boName = HS[key].ToString();
BaseBo boObj = (BaseBo)Activator.CreateInstance(Type.GetType(boName));
return boObj;
}
catch (Exception)
{
Exception ue = new Exception("Failed to instantiation of BO:" + HS[key]);
throw ue;
}
}
}
}