public static NoteTypeInfo ToNoteTypeInfo(NoteType entityNoteType) { NoteTypeInfo noteType = new NoteTypeInfo(); noteType.TypeID = entityNoteType.ID; noteType.Description = entityNoteType.NoteTypeDescription; return(noteType); }
public NoteTypeInfo[] GetAllNoteTypes() { assertConnected(); try { string noteTypeListXml = wsClient.GetAllNoteTypes(accessToken()); return(NoteTypeInfo.ParseNoteTypesXml(noteTypeListXml)); } catch (Exception ex) { throw TranslateException(ex); } }
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); } }