public GetDcTypeResponseDto GetDCType() { GetDcTypeResponseDto response; try { response = rDeliveryChallanProvider.GetDCType(); response.ServiceResponseStatus = 1; } catch (SSException applicationException) { response = new GetDcTypeResponseDto { ServiceResponseStatus = 0, ErrorMessage = applicationException.Message, ErrorCode = applicationException.ExceptionCode }; } catch (Exception exception) { response = new GetDcTypeResponseDto { ServiceResponseStatus = 0, ErrorCode = ExceptionAttributes.ExceptionCodes.InternalServerError, ErrorMessage = exception.Message }; } return(response); }
private static GetDcTypeResponseDto DcTypeMapper(List <DcTypeModel> list, GetDcTypeResponseDto getDcTypeResponseDto) { Mapper.CreateMap <DcTypeModel, DcTypeList>(); getDcTypeResponseDto.DcTypeList = Mapper.Map <List <DcTypeModel>, List <DcTypeList> >(list); return(getDcTypeResponseDto); }
public GetDcTypeResponseDto GetDCType() { var response = new GetDcTypeResponseDto(); var model = deliveryChallanRepository.GetDcType(); if (model != null) { response = DcTypeMapper((List <DcTypeModel>)model.dcTypeModelList, response); } return(response); }