29 lines
877 B
C#
29 lines
877 B
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using RestSharp;
|
|||
|
|
|
|||
|
|
namespace CommonEntity
|
|||
|
|
{
|
|||
|
|
public class NewDataSQL
|
|||
|
|
{
|
|||
|
|
//public static string BaseUrl = "http://localhost:5108/";
|
|||
|
|
public static string BaseUrl = "http://localhost:7000/";
|
|||
|
|
public static void GenericHOSTNUMBER(string HotelID,string Code)
|
|||
|
|
{
|
|||
|
|
//string str = Newtonsoft.Json.JsonConvert.SerializeObject("");
|
|||
|
|
var client1 = new RestClient(BaseUrl);
|
|||
|
|
var request1 = new RestRequest("api/Values/GenericHOSTNUMBER", Method.POST);
|
|||
|
|
|
|||
|
|
//注意方法是POST
|
|||
|
|
request1.AddParameter("HotelID", HotelID);
|
|||
|
|
request1.AddParameter("HotelCode", Code);
|
|||
|
|
//request1.AddParameter("payload", str);
|
|||
|
|
|
|||
|
|
|
|||
|
|
client1.ExecuteAsync(request1, (response) => { });
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|