コード例 #1
0
 void getAvaiableSpots()
 {
     /*
      * HttpWebRequest serviceRequest = (HttpWebRequest)WebRequest.Create("http://localhost:8080/ParkingPalsServer/getStallNumber");
      * serviceRequest.Method = "GET";
      * serviceRequest.ContentLength = 0;
      * serviceRequest.ContentType = "text/html";
      * serviceRequest.Accept = "text/html";
      */
     try
     {
         /*
          * HttpWebResponse serviceResponse = (HttpWebResponse)serviceRequest.GetResponse();
          * String status = serviceResponse.StatusCode.ToString();
          * //String avaiableSpot = serviceResponse.GetResponseHeader("####");
          * labelGetAvaiableSpots.Text = "####";// avaiableSpot;
          */
         parkingDB.ParkingDBWSSoapClient obj = new parkingDB.ParkingDBWSSoapClient();
         labelGetAvaiableSpots.Text = obj.GetEmptySpots();
     }
     catch (Exception ex)
     {
         labelGetAvaiableSpots.Text = "Error: Could get Avaiable Spot count.";
     }
 }