public async Task <string> AddBbTbReturn([FromBody] ReturnVehicle returnVehicle) { if (ModelState.IsValid) { var headers = new Dictionary <string, string>(); var tokenGenerated = HttpContext.Session.GetHmacToken(); headers.Add("X-Hmac", tokenGenerated); headers.Add("X-PublicKey", HttpContext.Session.GetUserPublicKey()); string queryStr = _queryCreater.GetQueryStringFromObject(returnVehicle); var response = await HttpClientRequestFactory.Get("http://proxy.mansis.co.za:18443/SlimProxyBoot.php?" + queryStr, headers); var data = response.Content.ReadAsStringAsync().Result; return(data.ToString()); } else { throw new Exception("Model state is not valid"); } }
public void AddNewOrderToHistory() { ReturnVehicle.AddOrderToHistory(); }//add order to ordesr history
public List <RentCarRentedCar> GetRentedCarByLicNum([FromBody] CarParams paramsCar) { return(ReturnVehicle.GetRentedCarsByLisnumber(paramsCar.LicenceNumber)); }//search rented car by license numiber from reted cars list
public void UpdateRentedStatus([FromBody] RentCarNewVehiclesDB updateCar) { ReturnVehicle.UpdateRentedCarStatus(updateCar); }//set car status to "not avaliable" when car is rented
public IEnumerable <RentCarRentedCar> GetRentedCars() { return(ReturnVehicle.GetRentedCarslist()); }//Get rented cars list