using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace EHEC_Server
{
///
/// This clas converts the object from db model to the needs of Json
/// conversion for Clusteranalysis.
///
public class ClusterOrigin
{
public int Id { get; set; }
public string Name { get; set; }
public string Nodetype { get; set; }
public ClusterOrigin() { }
public List GetClusterOrigins()
{
Origin origin = new Origin();
List origins = new List();
origins = origin.GetAllOrigins();
List clusterOrigins = new List();
foreach (Origin element in origins)
{
ClusterOrigin clusterOrigin = new ClusterOrigin
{
Id = element.OriginId,
Nodetype = "origin",
Name = element.City
};
clusterOrigins.Add(clusterOrigin);
};
return clusterOrigins;
}
}
}