[4592] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
[4694] | 3 | using System.Collections;
|
---|
[4592] | 4 | using System.Linq;
|
---|
| 5 | using System.Text;
|
---|
| 6 | using HeuristicLab.Services.Authentication.DataAccess;
|
---|
| 7 | using AM = HeuristicLab.Services.Authentication.AdminMethods.AdminMethods;
|
---|
| 8 |
|
---|
| 9 |
|
---|
| 10 | namespace HeuristicLab.Services.Authentication.AdminMethods {
|
---|
| 11 | class Program {
|
---|
| 12 | static void Main(string[] args) {
|
---|
| 13 |
|
---|
| 14 | //using (ClientManagmentDataContext dc = new ClientManagmentDataContext()) {
|
---|
| 15 | // if (dc.DatabaseExists()) {
|
---|
| 16 | // Console.WriteLine("DB exsits");
|
---|
| 17 | // dc.DeleteDatabase();
|
---|
| 18 | // Console.WriteLine("DB deleted");
|
---|
| 19 | // }
|
---|
| 20 | // Console.WriteLine("DB create");
|
---|
| 21 | // dc.CreateDatabase();
|
---|
| 22 | // Console.WriteLine("Finished");
|
---|
| 23 | //}
|
---|
| 24 |
|
---|
| 25 |
|
---|
[4694] | 26 | //IEnumerable<Object> clientData = AM.GetClient("client_3");
|
---|
| 27 | //foreach (Object o in clientData) {
|
---|
| 28 | // Console.WriteLine(o);
|
---|
| 29 | //}
|
---|
[4592] | 30 |
|
---|
[4694] | 31 | //Console.WriteLine("===========");
|
---|
[4592] | 32 |
|
---|
[4694] | 33 | //// delete
|
---|
| 34 | //Console.WriteLine(AM.DeleteResource("client_3"));
|
---|
| 35 | //Console.WriteLine(AM.DeleteResource("group_3"));
|
---|
| 36 | //Console.WriteLine(AM.DeleteResource("client_4"));
|
---|
| 37 | //Console.WriteLine(AM.DeleteResource("group_4"));
|
---|
[4592] | 38 |
|
---|
[4694] | 39 | //bool res;
|
---|
| 40 |
|
---|
| 41 | //// insert
|
---|
| 42 | //res = AM.InsertClient("client_3", "desc", "Client", "pt", 4, 4, "192.168.1.2", 2000, "WinXP");
|
---|
| 43 | //Console.WriteLine("client inserted: {0} ", res);
|
---|
| 44 | //res = AM.InsertGroup("group_3", "desc", "ResourceGroup");
|
---|
| 45 | //Console.WriteLine("group inserted: {0}", res);
|
---|
| 46 |
|
---|
| 47 | ////insert and update
|
---|
| 48 | //res = AM.InsertClient("client_4", "desc", "Client", "pt", 4, 4, "192.168.1.2", 2000, "WinXP");
|
---|
| 49 | //Console.WriteLine("client inserted: {0} ", res);
|
---|
| 50 | //res = AM.CreateGroup("group_1", "desc", "ResourceGroup");
|
---|
| 51 | //Console.WriteLine("group inserted: {0}", res);
|
---|
| 52 | //Console.WriteLine("updated: " + AM.UpdateClient("client_4", "desc_new2", "xxxx", "ptnew", 4, 4, "192.168.1.7", 3000, "WinXP"));
|
---|
| 53 |
|
---|
| 54 | //Console.ReadLine();
|
---|
| 55 |
|
---|
| 56 | //Hashtable ht = new Hashtable();
|
---|
| 57 | //ht[eClient.ResourceID] = "";
|
---|
| 58 | ////ht[eClient.ResourceIDGroup] = "";
|
---|
| 59 | //ht[eClient.Name] = "Group11";
|
---|
| 60 | //ht[eClient.Description] = "beschr3";
|
---|
| 61 | ////ht[eClient.ResourceType] = "Group";
|
---|
| 62 |
|
---|
| 63 | //AM.CreateGroup(ht);
|
---|
| 64 |
|
---|
[4592] | 65 | }
|
---|
| 66 | }
|
---|
| 67 | } |
---|