public GetVendorMasterListResponseDto GetVendorMasterList(Char CategoryCode = 'C') { GetVendorMasterListResponseDto response; try { response = rVendorMasterProvider.GetVendorMasterList(CategoryCode); response.ServiceResponseStatus = 1; } catch (SSException applicationException) { response = new GetVendorMasterListResponseDto { ServiceResponseStatus = 0, ErrorMessage = applicationException.Message, ErrorCode = applicationException.ExceptionCode }; } catch (Exception exception) { response = new GetVendorMasterListResponseDto { ServiceResponseStatus = 0, ErrorCode = ExceptionAttributes.ExceptionCodes.InternalServerError, ErrorMessage = exception.Message }; } return(response); }
public GetVendorMasterListResponseDto GetVendorMasterList(Char CategoryCode) { var response = new GetVendorMasterListResponseDto(); //var cModel = new GetVendorMasterListCM //{ // PageIndex = getVendorMasterListRequestDto.PageIndex, // PageSize = getVendorMasterListRequestDto.PageSize //}; var model = vendorMastersRepository.GetVendorMasterList(CategoryCode); if (model != null) { response = VendorMasterListMapper((List <VendorMasterList>)model.VendorMasterList, response); response.RecordCount = model.RecordCount; } return(response); }
private static GetVendorMasterListResponseDto VendorMasterListMapper(List <VendorMasterList> list, GetVendorMasterListResponseDto getVendorMasterListResponseDto) { Mapper.CreateMap <VendorMasterList, VendorMasterListForDropDown>(); getVendorMasterListResponseDto.VendorMasterList = Mapper.Map <List <VendorMasterList>, List <VendorMasterListForDropDown> >(list); return(getVendorMasterListResponseDto); }