markus / ConvertService / ServiceBase / ConvertStatationTest / Program.cs @ 30d84e1a
이력 | 보기 | 이력해설 | 다운로드 (1.24 KB)
1 |
using Markus.Service.DataBase; |
---|---|
2 |
using System; |
3 |
using System.Collections.Generic; |
4 |
using System.Linq; |
5 |
using System.ServiceModel; |
6 |
using System.Text; |
7 |
using System.Threading.Tasks; |
8 |
|
9 |
namespace ConvertStatationTest |
10 |
{ |
11 |
class Program |
12 |
{ |
13 |
static void Main(string[] args) |
14 |
{ |
15 |
BasicHttpBinding myBinding = new BasicHttpBinding(); |
16 |
EndpointAddress myEndpoint = new EndpointAddress("http://localhost:9991/StationService"); |
17 |
|
18 |
StationService.StationServiceClient client = new StationService.StationServiceClient(myBinding, myEndpoint); |
19 |
using (Markus.Service.DataBase.Repositories.ConvertDocRepository repository = new Markus.Service.DataBase.Repositories.ConvertDocRepository(Properties.Settings.Default.ConnectionStr,DBMSType.MSSQL)) |
20 |
{ |
21 |
var items = repository.GetConvertDocAsync(4).GetAwaiter().GetResult().ToList(); |
22 |
|
23 |
for (int i = 0; i < items.Count(); i++) |
24 |
{ |
25 |
var item = items[i]; |
26 |
|
27 |
Random random = new Random(); |
28 |
var docid = random.Next(4000001, 4000100); |
29 |
client.ConvertMenualAdd(item.PROJECT_NO, item.DOCUMENT_URL, docid.ToString()); |
30 |
} |
31 |
} |
32 |
} |
33 |
} |
34 |
} |