private static ICS_RefCode GetDataConfig() { string className, profilePath; string dataBaseType = ConfigurationManager.AppSettings["DataBaseType"] as string; switch (dataBaseType) { case "ORACLE": className = "SinoSZRefTableDC.OraRefTableFactory"; profilePath = "SinoSZRefTableDC"; return((ICS_RefCode)Assembly.Load(profilePath).CreateInstance(className)); case "SQLSERVER": className = "SinoSZRefTableDC.SqlRefTableFactory"; profilePath = "SinoSZRefTableDC"; return((ICS_RefCode)Assembly.Load(profilePath).CreateInstance(className)); case "REMOTING": IServiceFactory _serviceFactory = (IServiceFactory)RemotingClientSvc.GetAppSvrObj(typeof(IServiceFactory)); RemotingClientSvc.BindTicketToCallContext(SessionClass.CurrentTicket); ICS_RefCode _ret = _serviceFactory.GetInterFace("RefTableServerPlugin") as ICS_RefCode; return(_ret); } return(null); }
public static ICS_RefCode GetRefTableInterface() { string className, profilePath; string dataBaseType = ConfigurationManager.AppSettings["DataBaseType"] as string; switch (dataBaseType) { case "ORACLE": return(null); case "SQLSERVER": return(null); case "REMOTING": IServiceFactory _serviceFactory = (IServiceFactory)RemotingClientSvc.GetAppSvrObj(typeof(IServiceFactory)); RemotingClientSvc.BindTicketToCallContext(SessionClass.CurrentTicket); ICS_RefCode _ret = _serviceFactory.GetInterFace("RefTableServerPlugin") as ICS_RefCode; return(_ret); } return(null); }