internal ExchangeRatesConfigApplyAdministrator(MergeAdministrator mergeAdministrator, ExchangeRatesConfigMergeForm mergeForm, ExchangeRatesConfigFacade vcFacLocal, ExchangeRatesConfigFacade vcFacRemote) { _mergeAdministrator = mergeAdministrator; _vcFacLocal = vcFacLocal; _vcLocal = _vcFacLocal.GetExchangeRatesConfig(); _vcFacRemote = vcFacRemote; _vcRemote = _vcFacRemote.GetExchangeRatesConfig(); _mergeForm = mergeForm; _mcExchangeRatesConfig = _mergeForm.GetMergeControlByName(EMPath.EM2_FILE_EXRATES); }
void ApplyRemovals(MergeControl mergeControl, DataTable localDataTable, string idColumnNameID1, string idColumnNameID2, bool local) { foreach (string ID in GetRelevantIDs(mergeControl, local, false)) { string country = ID.Substring(0, ID.IndexOf("_")); string validFor = ID.Substring(ID.IndexOf("_") + 1); string whereClause = idColumnNameID1 + " = '" + country + "' AND " + idColumnNameID2 + " = '" + validFor + "'"; DataRow dataRow = localDataTable.Select(whereClause).First(); dataRow.Delete(); } _vcFacLocal.GetExchangeRatesConfig().AcceptChanges(); }