public GetDcNumberForInvoiceResponseDto GetDcNumberForInvoice(GetInvoiceNumberRequestDto getInvoiceNumberRequestDto) { GetDcNumberForInvoiceResponseDto response = new GetDcNumberForInvoiceResponseDto(); try { response = rInvoiceProvider.GetDcNumberForInvoice(getInvoiceNumberRequestDto); response.ServiceResponseStatus = 1; } catch (SSException applicationException) { response = new GetDcNumberForInvoiceResponseDto { ServiceResponseStatus = 0, ErrorMessage = applicationException.Message, ErrorCode = applicationException.ExceptionCode }; } catch (Exception exception) { response = new GetDcNumberForInvoiceResponseDto { ServiceResponseStatus = 0, ErrorCode = ExceptionAttributes.ExceptionCodes.InternalServerError, ErrorMessage = exception.Message }; } return(response); }
public GetDcNumberForInvoiceResponseDto GetDcNumberForInvoice(GetInvoiceNumberRequestDto getInvoiceNumberRequestDto) { var response = new GetDcNumberForInvoiceResponseDto(); var model = invoiceRepository.GetDcNumberForInvoice(getInvoiceNumberRequestDto.VendorCode, getInvoiceNumberRequestDto.WoType); if (model != null) { response = DcNumberForInvoiceMapper((List <GetDcNumberForInvoiceModel>)model.GetDcNumberForInvoiceList, response); } return(response); }
private static GetDcNumberForInvoiceResponseDto DcNumberForInvoiceMapper(List <GetDcNumberForInvoiceModel> list, GetDcNumberForInvoiceResponseDto getDcNumberForInvoiceResponseDto) { Mapper.CreateMap <GetDcNumberForInvoiceModel, GetDcNumberForInvoiceList>(); getDcNumberForInvoiceResponseDto.GetDcNumberForInvoiceList = Mapper.Map <List <GetDcNumberForInvoiceModel>, List <GetDcNumberForInvoiceList> >(list); return(getDcNumberForInvoiceResponseDto); }