Exemple #1
0
        public List <DepatureInfo> GetGoAheadDeparturesDetails(string token, string QRFID)
        {
            List <DepatureInfo> lstDepatureInfo = new List <DepatureInfo>();
            GoAheadGetReq       goAheadGetReq   = new GoAheadGetReq()
            {
                QRFID = QRFID
            };
            HandoverGetRes res = handoverProviders.GetGoAheadDeparturesDetails(goAheadGetReq, token).Result;

            if (res.Depatures != null && res.Depatures.Count > 0)
            {
                lstDepatureInfo = res.Depatures.Select(a => new DepatureInfo
                {
                    Confirmed_Date   = a.Confirmed_Date,
                    Confirmed_User   = a.Confirmed_User,
                    ConfirmMessage   = a.ConfirmMessage,
                    ConfirmStatus    = a.ConfirmStatus,
                    DepatureDate     = a.DepatureDate,
                    DepatureId       = a.DepatureId,
                    IsCreate         = a.IsCreate,
                    IsDeleted        = a.IsDeleted,
                    IsMaterialised   = a.IsMaterialised,
                    IsShowProcessing = false,
                    OpsBookingNumber = a.OpsBookingNumber
                }).ToList();
            }
            return(lstDepatureInfo);
        }
        public async Task <HandoverGetRes> GetGoAheadDeparturesDetails(GoAheadGetReq goAheadGetReq, string ticket)
        {
            HandoverGetRes response = new HandoverGetRes();

            response = await serviceProxy.PostData(_configuration.GetValue <string>("Handover:GetGoAheadDeparturesDetails"), goAheadGetReq, typeof(HandoverGetRes), ticket);

            return(response);
        }
Exemple #3
0
        public async Task <HandoverGetRes> GetGoAheadDeparturesDetails([FromBody] GoAheadGetReq request)
        {
            var response = new HandoverGetRes();

            try
            {
                if (!string.IsNullOrEmpty(request?.QRFID))
                {
                    response = await _handoverRepository.GetGoAheadDeparturesDetails(request);
                }
                else
                {
                    response.ResponseStatus.Status       = "Failure";
                    response.ResponseStatus.ErrorMessage = "QRF ID can not be Null/Zero.";
                }
            }
            catch (Exception ex)
            {
                response.ResponseStatus.Status       = "Failure";
                response.ResponseStatus.ErrorMessage = "An Error Occurs :- " + ex.Message;
            }

            return(response);
        }