コード例 #1
0
        public async Task <OperationHeaderInfo> GetOperationHeaderDetails([FromBody] OpsHeaderGetReq request)
        {
            var response = new OperationHeaderInfo();

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

                    if (result != null)
                    {
                        response = result;
                    }
                    else
                    {
                        response.ResponseStatus.Status       = "Failure";
                        response.ResponseStatus.ErrorMessage = "Ann Error Occurs.";
                    }
                }
                else
                {
                    response.ResponseStatus.Status       = "Failure";
                    response.ResponseStatus.ErrorMessage = "Booking details can not be null.";
                }
            }
            catch (Exception ex)
            {
                response.ResponseStatus.Status       = "Failure";
                response.ResponseStatus.ErrorMessage = "An error occurs " + ex.Message;
            }
            return(response);
        }
コード例 #2
0
        public async Task <OperationHeaderInfo> GetOperationHeaderDetails(OpsHeaderGetReq opsHeaderGetReq, string ticket)
        {
            OperationHeaderInfo operationHeaderInfo = new OperationHeaderInfo();

            operationHeaderInfo = await serviceProxy.PostData(_configuration.GetValue <string>("ServiceOperations:GetOperationHeaderDetails"), opsHeaderGetReq, typeof(OperationHeaderInfo), ticket);

            return(operationHeaderInfo);
        }