コード例 #1
0
 public static T Requestion <T>(object request, string _UserName, string _Password, string _Address)
 {
     NetCom.ServerResponse response = NetCom.WebRequest(request, _UserName, _Password, _Address);
     if (response.IsErrorOccurred)
     {
         throw new Exception(response.ErrorInfo.ErrorMessage);
     }
     return(JsonConvert.DeserializeObject <T>(JsonConvert.SerializeObject(response.Response)));
 }
コード例 #2
0
 public static bool CanConnectToServer(string ip)
 {
     NetCom.ServerRequest request = new NetCom.ServerRequest();
     request.Request = new NetCom.ServerRequestSqlDateTime();
     try
     {
         NetCom.ServerResponse response = NetCom.WebRequest(request, ip);
         return(true);
     }
     catch
     {
         return(false);
     }
 }