private void HandleCommonPropertiesAttributes(ExcelManager em, object obj, Attribute att, PropertyInfo propInfo) { UseSheet useSheet = att as UseSheet; if (useSheet != null) { if (!String.IsNullOrEmpty(useSheet.SheetName)) { em.ActivateSheet(useSheet.SheetName); } else { string sheetName = Convert.ToString(propInfo.GetValue(obj, null)); em.ActivateSheet(sheetName); } } }
private void HandleCommonClassAttributes(ExcelManager em, object obj) { Type objType = obj.GetType(); // Check class attributes foreach (Attribute att in objType.GetCustomAttributes(true)) { // [DefaultSheet] DefaultSheet defaultSheet = att as DefaultSheet; if (defaultSheet != null) { em.ActivateSheet(defaultSheet.SheetName); } } }
private void HandleCommonPropertiesAttributes(ExcelManager em, object obj, Attribute att, PropertyInfo propInfo) { UseSheet useSheet = att as UseSheet; if (useSheet != null) { if (!String.IsNullOrEmpty(useSheet.SheetName)) { em.ActivateSheet(useSheet.SheetName); } else { string sheetName = Convert.ToString(propInfo.GetValue(obj, null)); em.ActivateSheet(sheetName); } } }
private void HandleCommonClassAttributes(ExcelManager em, object obj) { Type objType = obj.GetType(); // Check class attributes foreach (Attribute att in objType.GetCustomAttributes(true)) { // [DefaultSheet] DefaultSheet defaultSheet = att as DefaultSheet; if (defaultSheet != null) { em.ActivateSheet(defaultSheet.SheetName); } } }