-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBackEService.cs
38 lines (36 loc) · 1.29 KB
/
BackEService.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using BackEndService.ServiceCustomers;
using BackEndService.TemplateService;
using System;
using System.Diagnostics;
namespace BackEndService_
{
public class BackEService : IBackEService
{
public string GenerateTemplate(int creditNumber, string templateName)
{
try
{
CusServClient client = new CusServClient();
CustomerDC Cdc = client.getCustomer(creditNumber);
TemplateServiceClient client_ = new TemplateServiceClient();
TemplateDC Tdc = client_.getTemplate(templateName);
// name - creditnumber - summe - date => the order to generate the template
string temp = string.Format(Tdc.TextSample, Cdc.Name, Cdc.Creditnumber, Cdc.amount, Cdc.dueDate);
client.editCustomer(creditNumber, temp);
return temp;
}
catch (Exception exc )
{
Debug.WriteLine(exc.ToString());
return null;
}
}
public void GenerateSeedData()
{
CusServClient client = new CusServClient();
TemplateServiceClient client_ = new TemplateServiceClient();
client.GenerateSeedData();
client_.GenerateSeedData();
}
}
}