private void AllocateParkingSlots(bool isCalledFromBarcodeScanner, string barcodeNo, bool isAlloc) { WebAPICaller myWebAPICaller = new WebAPICaller(); string selParking = IsolatedStorageSettings.ApplicationSettings[_SelParking].ToString(); if (!IsolatedStorageSettings.ApplicationSettings.Contains(_UserID)) IsolatedStorageSettings.ApplicationSettings[_UserID] = 12; string userId = IsolatedStorageSettings.ApplicationSettings[_UserID].ToString(); string urlParam = "userId=" + userId + "&parkingId=" + selParking + "&slotNo=" + barcodeNo + "&isAcquired=" + isAlloc.ToString(); myWebAPICaller.POST_urlParam("SlotMaster/PostParkUnPark", urlParam ); if (isCalledFromBarcodeScanner) { object slot = _SlotContainer.FindName(barcodeNo); if (slot == null) return; ((ParkingSlot)slot).Parked = isAlloc; } }
private void AllocateParkingSlots(bool isCalledFromBarcodeScanner, string barcodeNo, ParkingStatus parkStatus) { WebAPICaller myWebAPICaller = new WebAPICaller(); string selParking = IsolatedStorageSettings.ApplicationSettings[_SelParking].ToString(); string urlParam = "userId=" + UserID + "&parkingId=" + selParking + "&slotNo=" + barcodeNo + "&SlotStatus=" + ((int)parkStatus).ToString(); myWebAPICaller.POST_urlParam("SlotMaster/PostParkUnPark", urlParam ); if (isCalledFromBarcodeScanner) { object slot = _SlotContainer.FindName(barcodeNo); if (slot == null) return; ((ParkingSlot)slot).ParkStatus = parkStatus; } }