public async Task <List <Ticket_CallLogDTO> > SingleListCallLog([FromBody] Ticket_CallLogFilterDTO Ticket_CallLogFilterDTO) { if (!ModelState.IsValid) { throw new BindException(ModelState); } CallLogFilter CallLogFilter = new CallLogFilter(); CallLogFilter.Skip = 0; CallLogFilter.Take = 20; CallLogFilter.OrderBy = CallLogOrder.Id; CallLogFilter.OrderType = OrderType.ASC; CallLogFilter.Selects = CallLogSelect.ALL; CallLogFilter.Id = Ticket_CallLogFilterDTO.Id; CallLogFilter.EntityReferenceId = Ticket_CallLogFilterDTO.EntityReferenceId; CallLogFilter.CallTypeId = Ticket_CallLogFilterDTO.CallTypeId; CallLogFilter.CallEmotionId = Ticket_CallLogFilterDTO.CallEmotionId; CallLogFilter.AppUserId = Ticket_CallLogFilterDTO.AppUserId; CallLogFilter.Title = Ticket_CallLogFilterDTO.Title; CallLogFilter.Content = Ticket_CallLogFilterDTO.Content; CallLogFilter.Phone = Ticket_CallLogFilterDTO.Phone; CallLogFilter.CallTime = Ticket_CallLogFilterDTO.CallTime; List <CallLog> CallLogs = await CallLogService.List(CallLogFilter); List <Ticket_CallLogDTO> Ticket_CallLogDTOs = CallLogs .Select(x => new Ticket_CallLogDTO(x)).ToList(); return(Ticket_CallLogDTOs); }
public async Task <ActionResult <List <Contact_CallLogDTO> > > ListCallLog([FromBody] Contact_CallLogFilterDTO Contact_CallLogFilterDTO) { if (UnAuthorization) { return(Forbid()); } if (!ModelState.IsValid) { throw new BindException(ModelState); } CallLogFilter CallLogFilter = ConvertFilterCallLog(Contact_CallLogFilterDTO); CallLogFilter = await CallLogService.ToFilter(CallLogFilter); List <CallLog> CallLogs = await CallLogService.List(CallLogFilter); List <Contact_CallLogDTO> Contact_CallLogDTOs = CallLogs .Select(c => new Contact_CallLogDTO(c)).ToList(); return(Contact_CallLogDTOs); }