public GetUnitMasterResponseDto GetUnitMaster()
        {
            GetUnitMasterResponseDto response;

            try
            {
                response = reportGatePass.GetUnitMaster();
                response.ServiceResponseStatus = 1;
            }
            catch (SSException applicationException)
            {
                response = new GetUnitMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorMessage          = applicationException.Message,
                    ErrorCode             = applicationException.ExceptionCode
                };
            }
            catch (Exception exception)
            {
                response = new GetUnitMasterResponseDto
                {
                    ServiceResponseStatus = 0,
                    ErrorCode             = ExceptionAttributes.ExceptionCodes.InternalServerError,
                    ErrorMessage          = exception.Message
                };
            }

            return(response);
        }
        public GetUnitMasterResponseDto GetUnitMaster()
        {
            var response = new GetUnitMasterResponseDto();
            var model    = gatePassRepository.GetUnitMaster();

            if (model != null)
            {
                response = GPUnitMasterMapper((List <GetUnitMasterQMList>)model.GetUnitMasterQMList, response);
            }

            return(response);
        }
        private static GetUnitMasterResponseDto GPUnitMasterMapper(List <GetUnitMasterQMList> list, GetUnitMasterResponseDto response)
        {
            Mapper.CreateMap <GetUnitMasterQMList, UnitMasterList>();
            response.GetUnitMasterList =
                Mapper.Map <List <GetUnitMasterQMList>, List <UnitMasterList> >(list);

            return(response);
        }