public async Task <List <Documents> > GetDocumentsViewAsync(int ref_id, int limit) { List <Documents> documents = new List <Documents>(); try { documents = await _NotesAndDoc.GenericGetDocAsync <Documents>(ref_id, note_type, limit); } catch (Exception ex) { var logger = _loggerFactory.CreateLogger("internal_error_log"); logger.LogInformation("Problem happened in selecting the data for purchaseorders Get documents with message" + ex.Message); } return(documents); }
public async Task <object> DetailsNotesAndDoc(int id) { dynamic vendorNoteAndDoc = new ExpandoObject(); try { vendorNoteAndDoc.note = await _NotesAndDoc.GenericNote <Notes>(id, note_type, 1); vendorNoteAndDoc.doc = await _NotesAndDoc.GenericGetDocAsync <Documents>(id, note_type, 1); } catch (Exception ex) { var logger = _loggerFactory.CreateLogger("internal_error_log"); logger.LogInformation("Problem happened in selecting the data for listpageviewAsync with message" + ex.Message); } return(vendorNoteAndDoc); }