由网友(給我吧唧壹口.)分享简介:我试图做的WP8跟踪器的应用程序。我要保存使用SQLite数据库中的值。所有值R工作组(时间,距离和速度)。经过pressing停止按钮,我需要的值被张贴在表视图中使用SQLite作为ü可以在第二个屏幕上看到。什么好的建议或链接是AP preciated。感谢ü。I am trying to do a tracker...
我试图做的WP8跟踪器的应用程序。我要保存使用SQLite数据库中的值。所有值R工作组(时间,距离和速度)。经过pressing停止按钮,我需要的值被张贴在表视图中使用SQLite作为ü可以在第二个屏幕上看到。什么好的建议或链接是AP preciated。感谢ü。
I am trying to do a tracker application in wp8. I want to save the values in database using Sqlite. All the values r working (time, distance and pace). After pressing Stop button, I want the values to be posted in a table view using Sqlite as u can see in the second screen. Any good suggestions or links are appreciated. Thank u.
推荐答案
我假设你的表。
public class HistoryTable
{
public string date { get; set; }
public string time { get; set; }
public double pace { get; set; }
public double distance { get; set; }
}
使用此语句插入值。
Insert values using this statement.
string date = DateTime.Now.ToShortDateString();
string time = DateTime.Now.ToShortTimeString();
double pace = 16;
double distance = 4;
SQLiteConnection conn = new SQLiteConnection(System.IO.Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "Database.sqlite"));
conn.Execute("Insert into HistoryTable values(?,?,?,?)", date, time, pace, distance);
取数据如下声明,我假设你知道如何在的
相关推荐
最新文章