Example #1
0
        public static int InsertTrainTable(string tableName, EEG_Para item)
        {
            Dictionary <string, string> pairs = new Dictionary <string, string>();

            pairs.Add("Date", DateTime.Now.ToString("yyyy/MM/dd"));
            pairs.Add("Time", DateTime.Now.ToString("HH:mm:ss"));
            pairs.Add("Delta", item.Delta.ToString());
            pairs.Add("Theta", item.Theta.ToString());
            pairs.Add("LowAlpha", item.LowAlpha.ToString());
            pairs.Add("HighAlpha", item.HighAlpha.ToString());
            pairs.Add("LowBeta", item.LowBeta.ToString());
            pairs.Add("HighBeta", item.HighBeta.ToString());
            pairs.Add("LowGamma", item.LowGamma.ToString());
            pairs.Add("MiddleGamma", item.MiddleGamma.ToString());
            pairs.Add("Attention", item.Attention.ToString());
            pairs.Add("Meditation", item.Meditation.ToString());
            return(SqliteHelper.ExecuteInsert(tableName, pairs));
        }
Example #2
0
 public static int AddNewTrain(Train train)
 {
     return(SqliteHelper.ExecuteInsert("TrainRecord", GetProperties(train)));
 }
Example #3
0
 /// <summary>
 /// 增加
 /// </summary>
 /// <param name="user"></param>
 /// <returns></returns>
 public static int AddNewUser(User user)
 {
     return(SqliteHelper.ExecuteInsert("UserInfo", GetProperties(user)));
 }