public static SubModule GetSubModuleDetails(this enmSubModule e) { var type = e.GetType(); var name = Enum.GetName(type, e); var returnData = (SubModule)type.GetField(name).GetCustomAttributes(typeof(SubModule), false).FirstOrDefault(); returnData.Id = (int)e; return(returnData); }
public Document(enmSubModule EnmSubModule, enmDocumentType DocumentType, int DisplayOrder, string Name, string Description, string Icon, string ActionName) { this.DocumentType = DocumentType; this.DisplayOrder = DisplayOrder; this.Description = Description; this.Name = Name; this.Icon = Icon; this.ActionName = ActionName; this.EnmSubModule = EnmSubModule; }