private void GoForOTP()
 {
     WebAPICaller myWebAPICaller = new WebAPICaller();
     myWebAPICaller.JsonSerializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(string));
     myWebAPICaller.ActionOnReadCompleted = new DlgtActionOnReadCompleted(ActionOn_GetOTP);
     myWebAPICaller.GET("UserProfile/GetOTP?MobileNo=" + txtMobileNo.Text.Trim());
 }
 private void LoadParkingList()
 {
     WebAPICaller myWebAPICaller = new WebAPICaller();
     myWebAPICaller.JsonSerializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(SelectedListModel[]));
     myWebAPICaller.ActionOnReadCompleted = new DlgtActionOnReadCompleted(ActionOnReadCompleted);
     myWebAPICaller.GET("parkingmaster/GetParkings/");
 }
 private void LoadWalletTrans()
 {
     WebAPICaller myWebAPICaller = new WebAPICaller();
     myWebAPICaller.JsonSerializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(WalletTransModel[]));
     myWebAPICaller.ActionOnReadCompleted = new DlgtActionOnReadCompleted(ActionOnReadCompleted);
     myWebAPICaller.GET("WalletTrans/GetWalletTrans?userID=" + ParkingBase.UserID);
 }
コード例 #4
0
 public void LoadParkingSlots()
 {
     WebAPICaller myWebAPICaller = new WebAPICaller();
     myWebAPICaller.JsonSerializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(SlotModel[]));
     myWebAPICaller.ActionOnReadCompleted = new DlgtActionOnReadCompleted(ActionOn_LoadParkingSlots);
     string selParking = IsolatedStorageSettings.ApplicationSettings[_SelParking].ToString();
     myWebAPICaller.GET("SlotMaster/GetSlots" , "id=" + selParking);
 }
 private void SelectParkingAuto(string Latitude, string Longitude)
 {
     Latitude = "2"; Longitude = "5";
     WebAPICaller myWebAPICaller = new WebAPICaller();
     myWebAPICaller.JsonSerializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(SelectedListModel[]));
     myWebAPICaller.ActionOnReadCompleted = new DlgtActionOnReadCompleted(ActionOnReadCompleted_AutoSel);
     myWebAPICaller.GET("parkingmaster/GetSearchParkingMaster/", "Latitude=" + Latitude + "&Longitude=" + Longitude);
     //http://localhost:62073/api/parkingmaster/GetSearchParkingMaster?Latitude=1&Longitude=1
 }
        void ActionOnReadCompleted(object myList)
        {
            if (myList == null) return;
            WalletTransModel[] EntityList;
            EntityList = (WalletTransModel[])myList;
            //List<WalletTransModel> lst = new List<WalletTransModel>(myList);

            IList<WalletTransModel> lstSrc = EntityList;

            lstWalletTrans.ItemsSource = lstSrc;// new CollectionViewSource { Source = (CollectionViewSource)lstSrc };

            WebAPICaller myWebAPICaller = new WebAPICaller();
            myWebAPICaller.ActionOnReadCompleted = new DlgtActionOnReadCompleted(ActionOnReadCompleted_Amount);
            myWebAPICaller.JsonSerializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(int));
            myWebAPICaller.GET("UserProfile/GetWalletAmount?userID=" + ParkingBase.UserID);
        }
 private void LoadUserProfile()
 {
     if (ParkingBase.UserID  != null)
     {
         WebAPICaller myWebAPICaller = new WebAPICaller();
         myWebAPICaller.JsonSerializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(UserProfileModel));
         myWebAPICaller.ActionOnReadCompleted = new DlgtActionOnReadCompleted(ActionOn_LoadUserProfile);
         myWebAPICaller.GET("UserProfile/GetUserProfile/" + ParkingBase.UserID);
     }
     else
     {
         txtUserName.Text = "";
         txtAddress.Text = "";
         txtMobileNo.Text = "";
         txtVehclNo.Text = "";
         txtCity.Text = "";
         txtPincode.Text = "";
         txtEmailID.Text = "";
         return;
     }
 }
 private void LoadUserProfile()
 {
     string UserId;
     if (IsolatedStorageSettings.ApplicationSettings.Contains(_UserID ))
     {
         UserId = IsolatedStorageSettings.ApplicationSettings[_UserID].ToString();
         WebAPICaller myWebAPICaller = new WebAPICaller();
         myWebAPICaller.JsonSerializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(UserProfileModel));
         myWebAPICaller.ActionOnReadCompleted = new DlgtActionOnReadCompleted(ActionOn_LoadUserProfile);
         myWebAPICaller.GET("UserProfile/GetUserProfile/" + UserId);
     }
     else
     {
         txtUserName.Text = "";
         txtAddress.Text = "";
         txtMobileNo.Text = "";
         txtVehclNo.Text = "";
         txtCity.Text = "";
         txtPincode.Text = "";
         txtEmailID.Text = "";
         return;
     }
 }
コード例 #9
0
 private void LoadParkingSlots()
 {
     WebAPICaller myWebAPICaller = new WebAPICaller();
     myWebAPICaller.JsonSerializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(string[]));
     myWebAPICaller.ActionOnReadCompleted = new DlgtActionOnReadCompleted(ActionOn_LoadParkingSlots);
     myWebAPICaller.GET("ParkingSlot");
 }
コード例 #10
0
 private void ProcessAdvParking(ParkingSlot parkSlot)
 {
     if (parkSlot.ParkStatus == ParkingStatus.Parked)
     {
         MessageBox.Show("Parked Slots are not allowed for Advance Parking");
         return;
     }
     else
     {
         if (MessageBox.Show("Are you Confirmed", "Confirmation", MessageBoxButton.OKCancel) == MessageBoxResult.Cancel)
             return;
         else
         {
             if (parkSlot.ParkStatus == ParkingStatus.AdvParked)
             {
                 parkSlot.ParkStatus = ParkingStatus.Free;
                 AllocateParkingSlots(false, parkSlot.Name, parkSlot.ParkStatus);
             }
             else
             {
                 WebAPICaller myWebAPICaller = new WebAPICaller();
                 myWebAPICaller.ActionOnReadCompleted = new DlgtActionOnReadCompleted(ActionOnReadCompleted_BalAmount);
                 myWebAPICaller.JsonSerializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(int));
                 myWebAPICaller.GET("UserProfile/GetWalletAmount?userID=" + UserID);
                 _MyParkSlot = parkSlot;
             }
         }
     }
 }