コード例 #1
0
ファイル: RefCodeManager.cs プロジェクト: aehyok/InputModel
        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);
        }
コード例 #2
0
        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);
        }