public CityMapTypeDTO(CityMapType cityMapType) { Id = cityMapType.Id; Name = cityMapType.Name; OfficialName = cityMapType.OfficialName; FictionalName = cityMapType.FictionalName; }
public CityMapZone(int id, string name, string officialName, string fictionalName, CityMapType cityMapType) { Id = id; Name = name; OfficialName = officialName; FictionalName = fictionalName; CityMapType = cityMapType; }
public CityMap(int id, CityMapType cityMapType, CityMapZone cityMapZone, int xCoordinate, int yCoordinate, string name, int level) { Id = id; CityMapType = cityMapType; CityMapZone = cityMapZone; XCoordinate = xCoordinate; YCoordinate = yCoordinate; Name = name; Level = level; }
private CityMap GetCityMapFromDataRow(DataRow row) { // TODO: refactor CityMapType cityMapType = new CityMapType( Convert.ToInt32(row["CityMapTypeId"].ToString()), row["CityMapTypeName"].ToString(), row["CityMapTypeOfficialName"].ToString(), row["CityMapTypeFictionalName"].ToString() ); CityMapType zoneCityMapType = new CityMapType( Convert.ToInt32(row["ZoneMapTypeId"].ToString()), row["ZoneMapTypeName"].ToString(), row["ZoneMapTypeOfficialName"].ToString(), row["ZoneMapTypeFictionaleName"].ToString() ); CityMapZone cityMapZone = new CityMapZone( Convert.ToInt32(row["CityMapZoneId"].ToString()), row["CityMapZoneName"].ToString(), row["CityMapZoneOfficialName"].ToString(), row["CityMapZoneFictionalName"].ToString(), zoneCityMapType ); CityMap city = new CityMap( Convert.ToInt32(row["Id"].ToString()), cityMapType, cityMapZone, Convert.ToInt32(row["XCoordinate"].ToString()), Convert.ToInt32(row["YCoordinate"].ToString()), row["Name"].ToString(), Convert.ToInt32(row["Level"].ToString()) ); return(city); }