本文整理汇总了C#中Route.setPositionID方法的典型用法代码示例。如果您正苦于以下问题:C# Route.setPositionID方法的具体用法?C# Route.setPositionID怎么用?C# Route.setPositionID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Route
的用法示例。
在下文中一共展示了Route.setPositionID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: filltableRoute
// Hier wird die Tabelle Route mit den nötigen Werten gefüllt.
// Es wurde nur am anfang benötigt um Änderungen bei jedem Start zu übernehmen
// Wird zurzeit nicht mehr genutzt
public void filltableRoute()
{
Debug.Log ("RoutePoints");
IDbConnection _connection = new SqliteConnection(_strDBName);
IDbCommand _command = _connection .CreateCommand();
string sql;
_connection.Open();
// Leeren der Tabelle
sql = " Delete From ROUTE";
_command.CommandText = sql;
_command.ExecuteNonQuery ();
_command.Dispose ();
_command = null;
_connection.Close ();
_connection.Dispose ();
_connection = null;
Route PointstoRoute = new Route ();
//First Route
PointstoRoute.setRoutenID ("1");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("1");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("2");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("1");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("3");this.addRoute (PointstoRoute);
//Second Route
PointstoRoute.setRoutenID ("2");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("2");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("4");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("2");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("5");this.addRoute (PointstoRoute);
//Third Route
PointstoRoute.setRoutenID ("3");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("3");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("6");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("3");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("7");this.addRoute (PointstoRoute);
//Fourth Route
PointstoRoute.setRoutenID ("4");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("4");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("8");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("4");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("9");this.addRoute (PointstoRoute);
//Fifth Route
PointstoRoute.setRoutenID ("5");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("5");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("8");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("5");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("10");this.addRoute (PointstoRoute);
//Six Route
PointstoRoute.setRoutenID ("6");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("6");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("11");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("6");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("12");this.addRoute (PointstoRoute);
//Seven Route
PointstoRoute.setRoutenID ("7");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("7");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("11");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("7");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("13");this.addRoute (PointstoRoute);
//eight Route
PointstoRoute.setRoutenID ("8");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("8");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("14");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("8");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("15");this.addRoute (PointstoRoute);
//nine Route
PointstoRoute.setRoutenID ("9");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("9");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("14");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("9");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("16");this.addRoute (PointstoRoute);
//ten Route
PointstoRoute.setRoutenID ("10");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("10");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("17");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("10");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("18");this.addRoute (PointstoRoute);
//eleven Route
PointstoRoute.setRoutenID ("11");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("11");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("17");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("11");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("19");this.addRoute (PointstoRoute);
//12 Route
PointstoRoute.setRoutenID ("12");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("12");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("20");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("12");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("21");this.addRoute (PointstoRoute);
//13 Route
PointstoRoute.setRoutenID ("13");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("13");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("20");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("13");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("22");this.addRoute (PointstoRoute);
//14 Route
PointstoRoute.setRoutenID ("14");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("14");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("23");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("14");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("24");this.addRoute (PointstoRoute);
//15 Route
PointstoRoute.setRoutenID ("15");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("15");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("23");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("15");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("25");this.addRoute (PointstoRoute);
//16 Route
PointstoRoute.setRoutenID ("16");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("16");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("26");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("16");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("27");this.addRoute (PointstoRoute);
//17 Route
PointstoRoute.setRoutenID ("17");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("17");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("26");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("17");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("28");this.addRoute (PointstoRoute);
//18 Route
PointstoRoute.setRoutenID ("18");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("18");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("29");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("18");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("30");this.addRoute (PointstoRoute);
//19 Route
PointstoRoute.setRoutenID ("19");PointstoRoute.setPositionID ("1");PointstoRoute.setKnotenID ("1");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("19");PointstoRoute.setPositionID ("2");PointstoRoute.setKnotenID ("29");this.addRoute (PointstoRoute);
PointstoRoute.setRoutenID ("19");PointstoRoute.setPositionID ("3");PointstoRoute.setKnotenID ("31");this.addRoute (PointstoRoute);
//.........这里部分代码省略.........
示例2: getRouteViaROUTEID
// Hier wird ein COntainer erzeugt der alle punkte der Ausgewechlten Routen beinhaltet.
// Die Ausgewählte Route wird per PArameter gegeben
// Rückgabe ist ein RoutenContainer
public RouteContainer getRouteViaROUTEID(String RouteID)
{
IDbConnection _connection = new SqliteConnection(_strDBName);
IDbCommand _command = _connection .CreateCommand();
string sql;
IDataReader _reader;
_connection .Open();
sql = "SELECT * FROM Route WHERE ROUTENID='"+RouteID+"' ";
_command.CommandText = sql;
_reader = _command.ExecuteReader();
RouteContainer container=new RouteContainer();
// Hier wird die Schleife so oft Durchlaufen bis alle Funde durchfahren worden sind.
while (_reader.Read()){
Route Routeelement=new Route();
Routeelement.setRoutenID(System.Convert.ToString(_reader["ROUTENID"]));
Routeelement.setPositionID(System.Convert.ToString(_reader["POSITION"]));
Routeelement.setKnotenID(System.Convert.ToString(_reader["PUNKTID"]));
container.addRoute(Routeelement);
}
_command.Dispose ();
_command = null;
_connection.Close ();
_connection.Dispose ();
_connection = null;
_reader.Close ();
_reader.Dispose ();
_reader = null;
return container;
}