public SapAccess() { string serviceTypeConfig = ConfigurationManager.AppSettings["HrmsServiceType"]; EnumHelper.HrmsServiceType serviceType = (EnumHelper.HrmsServiceType)Convert.ToInt32(serviceTypeConfig); if (serviceType == EnumHelper.HrmsServiceType.Production) { _hrmsService = new HrmsProduction(); } else if (serviceType == EnumHelper.HrmsServiceType.Quality) { _hrmsService = new HrmsQuality(); } }
public SapAccess(IHrmsService hrmsService) { _hrmsService = hrmsService; }