예제 #1
0
        public static NoteTypeInfo ToNoteTypeInfo(NoteType entityNoteType)
        {
            NoteTypeInfo noteType = new NoteTypeInfo();

            noteType.TypeID      = entityNoteType.ID;
            noteType.Description = entityNoteType.NoteTypeDescription;
            return(noteType);
        }
예제 #2
0
 public NoteTypeInfo[] GetAllNoteTypes()
 {
     assertConnected();
     try
     {
         string noteTypeListXml = wsClient.GetAllNoteTypes(accessToken());
         return(NoteTypeInfo.ParseNoteTypesXml(noteTypeListXml));
     }
     catch (Exception ex)
     {
         throw TranslateException(ex);
     }
 }
예제 #3
0
        public string GetAllNoteTypes(string accessToken)
        {
            logMethodInvocation();
            checkAccessToken(accessToken);
            try
            {
                using (CFIEntities db = new CFIEntities())
                {
                    var query =
                        from noteType in db.NoteTypes
                        select noteType;

                    NoteTypeInfo[] noteTypes = ConversionUtils.ToNoteTypeInfoArray(query.ToList <NoteType>());
                    return(NoteTypeInfo.BuildNoteTypesXml(noteTypes));
                }
            }
            catch (Exception ex)
            {
                logException(ex);
                return(null);
            }
        }