Skip to content

Commit 0380052

Browse files
committed
Fixed an issue preventing Sales Manager from getting data using the API.
1 parent 0eb04c9 commit 0380052

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Sales Manager/Program.cs

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Net;
23
using System.Reflection;
34
using System.Runtime.InteropServices;
45
using System.Threading;
@@ -25,6 +26,12 @@ static void Main()
2526
{
2627
Application.EnableVisualStyles();
2728
Application.SetCompatibleTextRenderingDefault(false);
29+
try
30+
{
31+
ServicePointManager.SecurityProtocol |= (SecurityProtocolType)192 |
32+
(SecurityProtocolType)768 | (SecurityProtocolType)3072;
33+
}
34+
catch (NotSupportedException) { }
2835
Application.Run(new FormMain());
2936
mutex.ReleaseMutex();
3037
}

Sales Manager/Transaction.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.ComponentModel;
44
using System.ComponentModel.DataAnnotations;
5+
using System.Diagnostics;
56
using System.IO;
67
using System.Linq;
78
using System.Net;
@@ -136,8 +137,9 @@ public static bool GetSales(DateTime fromDate, DateTime toDate, Account account,
136137
}
137138
}
138139
}
139-
catch (WebException)
140+
catch (WebException exception)
140141
{
142+
Debug.WriteLine(exception);
141143
return false;
142144
}
143145
}

0 commit comments

Comments
 (0)