private void AddExcelColumnAttribute(PropertyInfo propInfo, int curIndex) { var attr = propInfo.GetCustomAttribute(typeof(ExcelColumn)) as ExcelColumn; if (attr != null) { ExcelIndex2PropertyIndex.Add(attr.Index, curIndex); } }
private void AddExcelColumnAttribute(PropertyInfo propInfo, int curIndex) { var attr = propInfo.GetCustomAttribute(typeof(ExcelColumn)) as ExcelColumn; if (attr != null) { if (attr.Index != null) { ExcelIndex2PropertyIndex.Add(attr.Index ?? 0, curIndex); } else if (!string.IsNullOrEmpty(attr.ColumnName)) { ExcelColumnName2PropertyIndex.Add(attr.ColumnName, curIndex); } } else { ExcelColumnName2PropertyIndex.Add(propInfo.Name, curIndex); } }