38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace EHEC_Server
|
|
{
|
|
/// <summary>
|
|
/// This clas converts the object from db model to the needs of Json
|
|
/// conversion for Clusteranalysis.
|
|
/// </summary>
|
|
public class ClusterResult
|
|
{
|
|
public int Id { get; set; }
|
|
public string Name { get; set; }
|
|
public string Nodetype { get; set; }
|
|
|
|
public ClusterResult() { }
|
|
public List<ClusterResult> GetClusterResults()
|
|
{
|
|
Result result = new Result();
|
|
List<Result> results = new List<Result>();
|
|
results = result.GetAllResults();
|
|
List<ClusterResult> clusterResults = new List<ClusterResult>();
|
|
foreach (Result element in results)
|
|
{
|
|
ClusterResult clusterResult = new ClusterResult
|
|
{
|
|
Id = element.ResultId,
|
|
Nodetype = "result",
|
|
Name = element.Name
|
|
};
|
|
clusterResults.Add(clusterResult);
|
|
};
|
|
return clusterResults;
|
|
}
|
|
}
|
|
} |