public GetDcDetailsForInvoiceResponseDto GetDcDetailsForInvoice(string DcNumber) { GetDcDetailsForInvoiceResponseDto response = new GetDcDetailsForInvoiceResponseDto(); try { response = rInvoiceProvider.GetDcDetailsForInvoice(DcNumber); response.ServiceResponseStatus = 1; } catch (SSException applicationException) { response = new GetDcDetailsForInvoiceResponseDto { ServiceResponseStatus = 0, ErrorMessage = applicationException.Message, ErrorCode = applicationException.ExceptionCode }; } catch (Exception exception) { response = new GetDcDetailsForInvoiceResponseDto { ServiceResponseStatus = 0, ErrorCode = ExceptionAttributes.ExceptionCodes.InternalServerError, ErrorMessage = exception.Message }; } return(response); }
public GetDcDetailsForInvoiceResponseDto GetDcDetailsForInvoice(string DcNumber) { var response = new GetDcDetailsForInvoiceResponseDto(); var model = invoiceRepository.GetDcDetailsForInvoice(DcNumber); if (model != null) { response = DcDetailsForInvoiceMapper((List <GetDcDetailsForInvoiceModel>)model.GetDcDetailsForInvoiceModel, response); } return(response); }
private static GetDcDetailsForInvoiceResponseDto DcDetailsForInvoiceMapper(List <GetDcDetailsForInvoiceModel> list, GetDcDetailsForInvoiceResponseDto getDcDetailsForInvoiceResponseDto) { Mapper.CreateMap <GetDcDetailsForInvoiceModel, GetDcDetailsForInvoiceList>(); getDcDetailsForInvoiceResponseDto.GetDcDetailsForInvoiceList = Mapper.Map <List <GetDcDetailsForInvoiceModel>, List <GetDcDetailsForInvoiceList> >(list); return(getDcDetailsForInvoiceResponseDto); }