private void _writeMatchedRecords(CompareOperatorEnum selectedCompareSign, DistanceFilterEnum selectedDistanceFilter) { var descriptionAttri = selectedDistanceFilter.GetType().GetField(selectedDistanceFilter.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), true).FirstOrDefault() as DescriptionAttribute; var description = descriptionAttri.Description; var records = _recordComparer.GetMatchedRecords(selectedCompareSign, description); var timestamp = DateTime.Now.ToString("_yyyyMMdd_HHmmss"); var writer = new GISRecordWriter(); foreach (var p in records) { string filename = _exportFileLocation + "\\Matched_" + selectedCompareSign.ToString() + description + "_" + p.Key + timestamp + ".csv"; writer.WriteCSVFileMatched(filename, p.Value, selectedCompareSign, description); } }
public void GetMatchedResults(MapViewModel mapVM, DistanceFilterEnum selectedDistanceFilter, CompareOperatorEnum selectedCompareSign) { int filter; var descriptionAttri = selectedDistanceFilter.GetType().GetField(selectedDistanceFilter.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), true).FirstOrDefault() as DescriptionAttribute; var description = descriptionAttri.Description; if (int.TryParse(description, out filter)) { if (selectedCompareSign == CompareOperatorEnum.GreaterThan) { _getMarkerGreaterThanFilter(mapVM, filter); } if (selectedCompareSign == CompareOperatorEnum.LessOrEqual) { _getMarkerLessOrEqThanFilter(mapVM, filter); } } }