public GetPartMasterResponseDto GetPartMaster(GetPartMasterRequestDto getPartMasterRequestDto) { GetPartMasterResponseDto getPartMasterResponseDto; try { getPartMasterResponseDto = rPartMasterProvider.GetPartMaster(getPartMasterRequestDto); getPartMasterResponseDto.ServiceResponseStatus = 1; } catch (SSException applicationException) { getPartMasterResponseDto = new GetPartMasterResponseDto { ServiceResponseStatus = 0, ErrorMessage = applicationException.Message, ErrorCode = applicationException.ExceptionCode }; } catch (Exception exception) { getPartMasterResponseDto = new GetPartMasterResponseDto { ServiceResponseStatus = 0, ErrorCode = ExceptionAttributes.ExceptionCodes.InternalServerError, ErrorMessage = exception.Message }; } return(getPartMasterResponseDto); }
public GetPartMasterResponseDto GetPartMaster(GetPartMasterRequestDto getPartMasterRequestDto) { var response = new GetPartMasterResponseDto(); var cModel = new GetPartMasterCM() { //PageIndex = getPartMasterRequestDto.PageIndex, //PageSize = getPartMasterRequestDto.PageSize, VendorCode = getPartMasterRequestDto.VendorCode }; var model = partMastersRepository.GetPartMaster(cModel); if (model != null && model.PartMasterList.Any()) { response = PartMasterMapper((List <PartMasterModel>)model.PartMasterList, response); response.RecordCount = model.RecordCount; } return(response); }