oop_II-6/EHEC_Server/EHEC_Server/cluster_dependencies/ClusterConverter.cs

40 lines
1.2 KiB
C#
Raw Normal View History

2018-07-17 19:51:33 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using EHEC_Server;
2018-07-21 17:16:56 +02:00
using System.Web.Script.Serialization;
2018-07-17 19:51:33 +02:00
namespace EHEC_Server
{
public class ClusterConverter
{
2018-07-21 17:16:56 +02:00
public string WriteJson()
2018-07-17 19:51:33 +02:00
{
2018-07-18 19:19:47 +02:00
ClusterPatient p = new ClusterPatient();
List<ClusterPatient> clusterPatientsList = new List<ClusterPatient>();
clusterPatientsList = p.GetClusterPatients();
2018-07-21 17:16:56 +02:00
ClusterResult r = new ClusterResult();
List<ClusterResult> clusterResultsList = new List<ClusterResult>();
clusterResultsList = r.GetClusterResults();
//var json = JsonConverter.Serialize(clusterPatientsList);
//string path = System.Reflection.Assembly.GetExecutingAssembly().Location;
//string fileName = Path.Combine(path, "ClusterData.json");
//System.IO.File.WriteAllText(fileName, json);
2018-07-18 19:19:47 +02:00
var json = JsonConverter.Serialize(clusterPatientsList);
2018-07-21 17:16:56 +02:00
System.IO.File.WriteAllText(@"C:\Users\Public\Documents\cluster.json", json);
return json;
2018-07-17 19:51:33 +02:00
}
2018-07-17 21:05:13 +02:00
private List<ClusterPatient> GetCluster()
2018-07-17 19:51:33 +02:00
{
return new List<ClusterPatient>();
2018-07-17 21:05:13 +02:00
2018-07-17 19:51:33 +02:00
}
}
}