public bool SetCategory(DocumentCategoryEnum category)
 {
     if (!Category.Equals(category))
     {
         _entity.DocCategoryId = (int)category;
         Category = category;
         return(true);
     }
     return(false);
 }
Пример #2
0
        public static DocumentCategory ToType(DocumentCategoryEnum enumValue)
        {
            switch (enumValue)
            {
            case DocumentCategoryEnum.ManualsAndGuidance:
                return(ManualsAndGuidance);

            case DocumentCategoryEnum.MeetingAgendas:
                return(MeetingAgendas);

            case DocumentCategoryEnum.MeetingNotes:
                return(MeetingNotes);

            case DocumentCategoryEnum.Monitoring:
                return(Monitoring);

            case DocumentCategoryEnum.Other:
                return(Other);

            case DocumentCategoryEnum.PoliciesAndPlans:
                return(PoliciesAndPlans);

            case DocumentCategoryEnum.Presentations:
                return(Presentations);

            case DocumentCategoryEnum.ProgramInformation:
                return(ProgramInformation);

            case DocumentCategoryEnum.ProgramManagement:
                return(ProgramManagement);

            case DocumentCategoryEnum.ProgressReport:
                return(ProgressReport);

            case DocumentCategoryEnum.RequestForProposals:
                return(RequestForProposals);

            default:
                throw new ArgumentException(string.Format("Unable to map Enum: {0}", enumValue));
            }
        }
Пример #3
0
 public DocumentCategory(DocumentCategoryEnum documentCategory)
 {
     _documentCategory = documentCategory;
 }