test WriteJson
This commit is contained in:
parent
9ec488b15a
commit
61e2161b71
|
@ -48,11 +48,21 @@ namespace EHEC_Server
|
|||
|
||||
protected void Application_Start(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
WriteJson();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//add patients
|
||||
//using (EHEC_DBEntities ctx = new EHEC_DBEntities())
|
||||
//{
|
||||
|
||||
Random p = new Random();
|
||||
Random p = new Random();
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
Patient patient = new Patient
|
||||
|
|
|
@ -33,5 +33,7 @@ namespace EHEC_Server
|
|||
return dbAccess;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -10,12 +10,18 @@ namespace EHEC_Server
|
|||
{
|
||||
public void WriteJson()
|
||||
{
|
||||
var json = JsonConverter.Serialize(GetCompanyObject());
|
||||
System.IO.File.WriteAllText(@"C:\Users\Public\Documents\Company.json", json);
|
||||
ClusterPatient clusterp = new ClusterPatient();
|
||||
List<ClusterPatient> clusterPatientList = new List<ClusterPatient>();
|
||||
clusterPatientList = clusterp.GetClusterPatients();
|
||||
|
||||
var json = JsonConverter.Serialize(clusterPatientList);
|
||||
System.IO.File.WriteAllText(@"C:\Users\novski\Desktop\Company.json", json);
|
||||
}
|
||||
private List<ClusterPatient> GetClusterPatient()
|
||||
private List<ClusterPatient> GetCluster()
|
||||
{
|
||||
return new List<ClusterPatient>();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@ namespace EHEC_Server
|
|||
|
||||
public class ClusterPatient
|
||||
{
|
||||
public List<Patient> Patients;
|
||||
public List<ClusterPatient> ClusterPatients;
|
||||
public int Id;
|
||||
public string Name;
|
||||
public List<Patient> Patients { get; set; }
|
||||
public List<ClusterPatient> ClusterPatients { get; set; }
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public List<ClusterPatient> GetPatients()
|
||||
public List<ClusterPatient> GetClusterPatients()
|
||||
{
|
||||
Patients = Global.GlobalInstance.DbAccess.Patients.ToList();
|
||||
|
||||
|
|
Loading…
Reference in New Issue