private static void importMerchantConfig() { try { //truncate table and import T_CybersourceGatewayMerchantConfig from epaymentsconfig List <string> tdcMerchant = new List <string>(); tdcMerchant = (from c in tdc.CybersourceGatewayMerchantConfigs select c.MerchantId).ToList(); var config = from CybersourceGatewayMerchantConfiguration mc in edc.CybersourceGatewayMerchantConfigurations where !(tdcMerchant.Contains(mc.MerchantId)) select mc; foreach (CybersourceGatewayMerchantConfiguration c in config) { CybersourceGatewayMerchantConfig cfg = new CybersourceGatewayMerchantConfig() { CybersourceGatewayMerchantConfigID = c.CybersourceGatewayMerchantConfigID , CybersourceGatewayProcessorID = c.CybersourceGatewayProcessorID , IgnoreCVResult = c.IgnoreCVResult , Level2or3Enabled = c.Level2or3Enabled , MerchantId = c.MerchantId , Password = c.Password , ProfileName = c.ProfileName , Username = c.Username }; tdc.CybersourceGatewayMerchantConfigs.InsertOnSubmit(cfg); } tdc.SubmitChanges(); } catch (Exception ex) { logger.LogException(LogLevel.Error, "Error occured " + ex.Message.ToString(), ex); } }
private static void importMerchantConfig() { try { //truncate table and import T_CybersourceGatewayMerchantConfig from epaymentsconfig List<string> tdcMerchant = new List<string>(); tdcMerchant = (from c in tdc.CybersourceGatewayMerchantConfigs select c.MerchantId).ToList(); var config = from CybersourceGatewayMerchantConfiguration mc in edc.CybersourceGatewayMerchantConfigurations where !(tdcMerchant.Contains(mc.MerchantId)) select mc; foreach (CybersourceGatewayMerchantConfiguration c in config) { CybersourceGatewayMerchantConfig cfg = new CybersourceGatewayMerchantConfig() { CybersourceGatewayMerchantConfigID = c.CybersourceGatewayMerchantConfigID , CybersourceGatewayProcessorID = c.CybersourceGatewayProcessorID , IgnoreCVResult = c.IgnoreCVResult , Level2or3Enabled = c.Level2or3Enabled , MerchantId = c.MerchantId , Password = c.Password , ProfileName = c.ProfileName , Username = c.Username }; tdc.CybersourceGatewayMerchantConfigs.InsertOnSubmit(cfg); } tdc.SubmitChanges(); } catch (Exception ex) { logger.LogException(LogLevel.Error, "Error occured " + ex.Message.ToString(), ex); } }
partial void DeleteCybersourceGatewayMerchantConfig(CybersourceGatewayMerchantConfig instance);
partial void InsertCybersourceGatewayMerchantConfig(CybersourceGatewayMerchantConfig instance);