-
Notifications
You must be signed in to change notification settings - Fork 0
/
Init_DB.cs
47 lines (41 loc) · 1.38 KB
/
Init_DB.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
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PSLibrary.Debug;
namespace Liber
{
public static class Init_DB
{
public static void CheckandCreate()
{
if (dbgestor.author.getAuthorByID("0000000") == null)
{
li_author author = new li_author();
author.ID_author = "0000000";
author.firstname = "";
author.lastname = "";
dbgestor.author.addAuthor(author);
Debug.AddInformative("Added null author to the database");
}
if (dbgestor.author.getAuthorByID("9999999") == null)
{
li_author author = new li_author();
author.ID_author = "9999999";
author.firstname = "Anonymous";
author.lastname = "";
dbgestor.author.addAuthor(author);
Debug.AddInformative("Added anonymous author to the database");
}
if (dbgestor.saga.getSagaByID("0000000") == null)
{
li_saga saga = new li_saga();
saga.ID_saga = "0000000";
saga.name = "";
saga.typep = "none";
dbgestor.saga.addSaga(saga);
Debug.AddInformative("Added empty saga to the database");
}
}
}
}