public async Task <OpsProdRangePersTypeGetRes> GetPersonTypeByProductRange([FromBody] OpsProdRangePersTypeGetReq request)
        {
            var response = new OpsProdRangePersTypeGetRes();

            try
            {
                if (request != null)
                {
                    var result = await _opsRepository.GetPersonTypeByProductRange(request);

                    if (result != null)
                    {
                        response = result;
                    }
                    else
                    {
                        response.ResponseStatus.Status       = "Failure";
                        response.ResponseStatus.ErrorMessage = "An Error Occurred.";
                    }
                }
                else
                {
                    response.ResponseStatus.Status       = "Failure";
                    response.ResponseStatus.ErrorMessage = "OpsProdRangePersTypeGetReq details can not be null.";
                }
            }
            catch (Exception ex)
            {
                response.ResponseStatus.Status       = "Failure";
                response.ResponseStatus.ErrorMessage = "An error occurred " + ex.Message;
            }
            return(response);
        }
Example #2
0
        public async Task <OpsProdRangePersTypeGetRes> GetPersonTypeByProductRange(OpsProdRangePersTypeGetReq opsProdTypePositionGetReq, string ticket)
        {
            OpsProdRangePersTypeGetRes opsProductTypeGetRes = new OpsProdRangePersTypeGetRes();

            opsProductTypeGetRes = await serviceProxy.PostData(_configuration.GetValue <string>("ServiceOperations:GetPersonTypeByProductRange"), opsProdTypePositionGetReq, typeof(OpsProdRangePersTypeGetRes), ticket);

            return(opsProductTypeGetRes);
        }