Пример #1
0
        public IActionResult TourEntities(TourEntitiesParam tourEntitiesParam)
        {
            string             UserName = ckUserEmailId;
            TourEntitiesSetRes response = new TourEntitiesSetRes()
            {
                TourEntities = tourEntitiesParam.TourEntities
            };

            try
            {
                var tourentities = tourEntitiesParam.TourEntities.Where(a => !string.IsNullOrEmpty(a.RoomTypeID)).ToList();

                TourEntitiesSetReq tourEntitiesSetReq = new TourEntitiesSetReq()
                {
                    UserName = UserName, TourEntities = tourentities, QRFID = tourEntitiesParam.QRFID, VoyagerUserID = ckLoginUser_Id
                };
                response = positionMapping.SetTourEntities(_configuration, token, tourEntitiesSetReq);
            }
            catch (Exception ex)
            {
                throw;
            }
            if (response != null && response.ResponseStatus.Status.ToLower() == "success" && response.TourEntities != null && response.TourEntities.Count > 0)
            {
                return(Json(new { PaxSlabs = response.TourEntities, TourEntity = response.TourEntities, QRFId = tourEntitiesParam.QRFID, ResponseStatus = response.ResponseStatus }));
            }
            else
            {
                return(Json(new { PaxSlabs = new PaxSlabs(), TourEntities = new TourEntities(), QRFId = tourEntitiesParam.QRFID, ResponseStatus = response.ResponseStatus }));
            }
        }