|
1 | 1 | using Syncfusion.DocIO.DLS; |
| 2 | +using System.Collections.Generic; |
2 | 3 | using System.Data; |
3 | 4 |
|
4 | 5 | namespace Apply_custom_formatting_mailmerge_fields |
@@ -69,18 +70,18 @@ private static void MergeFieldEvent(object sender, MergeFieldEventArgs args) |
69 | 70 | /// <param name="numberType">The boolean denotes current changes as Number format</param> |
70 | 71 | public static void UpdateMergeFieldResult(bool numberType) |
71 | 72 | { |
72 | | - Dictionary<WParagraph, List<KeyValuePair<int, string>>> tempDictonary; |
| 73 | + Dictionary<WParagraph, List<KeyValuePair<int, string>>> mergeFieldResults; |
73 | 74 | if (numberType) |
74 | | - tempDictonary = paratoModifyNumberFormat; |
| 75 | + mergeFieldResults = paratoModifyNumberFormat; |
75 | 76 | else |
76 | | - tempDictonary = paratoModifyDateFormat; |
| 77 | + mergeFieldResults = paratoModifyDateFormat; |
77 | 78 | // Iterate the outer dictionary entries |
78 | | - foreach (var dictionaryItem in tempDictonary) |
| 79 | + foreach (KeyValuePair<WParagraph, List<KeyValuePair<int, string>>> dictionaryItem in mergeFieldResults) |
79 | 80 | { |
80 | 81 | // Get the merge field result paragraph |
81 | 82 | WParagraph mergeFieldParagraph = dictionaryItem.Key; |
82 | 83 | // The list of (index, fieldValues) pairs for this paragraph. |
83 | | - var fieldList = dictionaryItem.Value; |
| 84 | + List<KeyValuePair<int, string>> fieldList = dictionaryItem.Value; |
84 | 85 | for (int i = 0; i <= fieldList.Count - 1; i++) |
85 | 86 | { |
86 | 87 | // Get the index and Field values ("Number" or "Date") |
|
0 commit comments