Beispiel #1
0
        public VehicleDetailPage(ReservationView reservationView)
        {
            InitializeComponent();
            this.reservationView = reservationView;
            search = new ReservationConfigurationVehicleSearch();
            vehicleMobileRequest  = new GetReservationConfigurationMobileRequest();
            vehicleMobileResponse = null;
            search.ClientId       = Constants.ClientId;
            //search.LocationId = (int)reservationView.StartLocationId;
            //search.CheckInLocationId = (int)reservationView.EndLocationId;
            search.IsOnline = true;
            //search.StartDate = (DateTime)reservationView.StartDate;
            //search.EndDate = (DateTime)reservationView.EndDate;

            search.StartDate = DateTime.Now;
            search.EndDate   = DateTime.Now.AddDays(3);

            search.VehicleCategoryId = 0;
            search.VehicleMakeID     = 0;
            search.ModelId           = 0;
            search.NumberOfSeats     = 0;
            search.RentalPeriod      = 0;
            search.VehicleId         = 0;
            lblLocation.Text         = reservationView.StartLocationName;
            //startDateLabel.Text = ((DateTime)reservationView.StartDate).ToString("ddd,MM/dd/yyyy");
            //endDateLabel.Text = ((DateTime)reservationView.EndDate).ToString("ddd,MM/dd/yyyy");
            //startTimeLabel.Text = ((DateTime)reservationView.StartDate).ToString("hh:mm tt");
            //endTimeLabel.Text = ((DateTime)reservationView.EndDate).ToString("hh:mm tt");
            vehicletypeList = new List <string>();
            VehicleFilter   = new VehicleFilterSearch();


            vehicleMobileRequest.search = search;
        }
Beispiel #2
0
        public GetReservationConfigurationResponse getVehicleTypesMobileNew(GetReservationConfigurationMobileRequest vehicleMobileRequest, string token)
        {
            GetReservationConfigurationResponse result = null;

            try
            {
                using (var client = new HttpClient())
                {
                    client.BaseAddress = new Uri(ConstantData.ApiURL.ToString() + "ReservationConfigurationMobile/GetVehicleAndRateDetailsMobile");
                    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

                    var myContent   = JsonConvert.SerializeObject(vehicleMobileRequest);
                    var buffer      = Encoding.UTF8.GetBytes(myContent);
                    var byteContent = new ByteArrayContent(buffer);
                    byteContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");

                    var response = client.PostAsync(client.BaseAddress, byteContent).Result;
                    if (response.IsSuccessStatusCode)
                    {
                        var responseStream = response.Content.ReadAsStringAsync().Result;
                        result = JsonConvert.DeserializeObject <GetReservationConfigurationResponse>(responseStream);
                    }
                }
            }

            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public GetReservationConfigurationResponse getVehicleTypesMobileNew(GetReservationConfigurationMobileRequest vehicleMobileRequest, string token)
        {
            GetReservationConfigurationResponse vehicleTypeResults = null;

            try
            {
                vehicleTypeResults = vehicleService.getVehicleTypesMobileNew(vehicleMobileRequest, token);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(vehicleTypeResults);
        }
Beispiel #4
0
        private GetReservationConfigurationResponse getVehicleTypesMobileNew(GetReservationConfigurationMobileRequest vehicleMobileRequest, string token)
        {
            GetReservationConfigurationResponse vehicleTypeResults = null;
            VehicleController vehicle = new VehicleController();

            try
            {
                vehicleTypeResults = vehicle.getVehicleTypesMobileNew(vehicleMobileRequest, token);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(vehicleTypeResults);
        }
 public BookNow(ReservationView reservationView, VehicleViewByTypeForMobile selectedVehicle, List <int> locationIdList)
 {
     InitializeComponent();
     vehicleMobileRequest  = new GetReservationConfigurationMobileRequest();
     vehicleMobileResponse = null;
     search = new ReservationConfigurationVehicleSearch();
     //locationModels = null;
     locationResponse            = null;
     getStoreHoursMobileResponse = null;
     getStoreHoursMobileRequest  = new GetStoreHoursMobileRequest();
     reservationView             = new ReservationView();
     customerId           = 0;
     isBookable           = true;
     this.reservationView = reservationView;
     this.selectedVehicle = selectedVehicle;
     this.locationIdList  = locationIdList;
 }
Beispiel #6
0
        public ExtendPopup(ReservationViewModel reservationData)
        {
            InitializeComponent();
            _token = App.Current.Properties["currentToken"].ToString();
            this.reservationData            = reservationData;
            reservationView                 = new ReservationView();
            reservationView                 = reservationData.Reservationview;
            reservationView.RateDetailsList = reservationData.RateDetailsList;
            reservationView.MiscList2       = reservationData.MiscChargeList;
            reservationView.TaxList2        = reservationData.TaxList;
            extendedDate.MinimumDate        = ((DateTime)reservationView.EndDate).AddHours(24);
            extendedDate.Format             = "dddd, MMMM d, yyyy";
            extendedTime.Time               = new TimeSpan(((DateTime)reservationView.EndDate).Hour, ((DateTime)reservationView.EndDate).Minute, ((DateTime)reservationView.EndDate).Second);
            extendedTime.Format             = "hh mm tt";
            ReservationMobileRequest        = new UpdateReservationMobileRequest();
            response = null;


            search = new ReservationConfigurationVehicleSearch();
            vehicleMobileRequest     = new GetReservationConfigurationMobileRequest();
            vehicleMobileResponse    = null;
            search.ClientId          = Constants.ClientId;
            search.LocationId        = (int)reservationView.StartLocationId;
            search.CheckInLocationId = (int)reservationView.EndLocationId;
            search.IsOnline          = true;
            search.StartDate         = (DateTime)reservationView.StartDate;
            search.EndDate           = (DateTime)reservationView.EndDate;
            search.VehicleTypeId     = (int)reservationView.VehicleTypeID;
            search.VehicleCategoryId = 0;
            search.VehicleMakeID     = 0;
            search.ModelId           = 0;
            search.NumberOfSeats     = 0;
            search.RentalPeriod      = 0;
            search.VehicleId         = 0;

            vehicleMobileRequest.search = search;


            type = ReferenceType.Reservation;
            summaryMobileRequest    = new GetCalculateSummaryMobileRequest();
            summaryMobileResponsecs = null;
            paidAmmount             = (decimal)reservationData.ReservationTotal.AmountPaid;
        }
        public EditVehicleDetail(ReservationView reservationView, ReservationViewModel reservationData)
        {
            InitializeComponent();
            this.reservationView = reservationView;
            search = new ReservationConfigurationVehicleSearch();
            vehicleMobileRequest     = new GetReservationConfigurationMobileRequest();
            vehicleMobileResponse    = null;
            search.ClientId          = Constants.ClientId;
            search.LocationId        = (int)reservationView.StartLocationId;
            search.CheckInLocationId = (int)reservationView.EndLocationId;
            search.IsOnline          = true;
            search.StartDate         = (DateTime)reservationView.StartDate;
            search.EndDate           = (DateTime)reservationView.EndDate;
            search.VehicleCategoryId = 0;
            search.VehicleMakeID     = 0;
            search.ModelId           = 0;
            search.NumberOfSeats     = 0;
            search.RentalPeriod      = 0;
            search.VehicleId         = 0;

            vehicleMobileRequest.search = search;
            this.reservationData        = reservationData;
        }