Kaynağa Gözat

添加新接口:插入新数据到reportData.db。

jianfeng1.wang 2 yıl önce
ebeveyn
işleme
87587247b9
1 değiştirilmiş dosya ile 14 ekleme ve 0 silme
  1. 14 0
      FactoryTool_CShare/Database/SQLiteHelper.cs

+ 14 - 0
FactoryTool_CShare/Database/SQLiteHelper.cs

@@ -870,5 +870,19 @@ namespace MOKA_Factory_Tools
             else
                 return false;
         }
+
+        public static bool AddReportOnlineData(SQLiteConnection connection, string url, string order, string content)
+        {
+            if (connection == null)
+                return false;
+
+            SQLiteCommand cmd = new SQLiteCommand();
+            cmd.Connection = connection;
+            cmd.CommandText = string.Format("insert into ReportData(order,url,content) values('{0}','{1}','{2}')", order, url, content);
+            int result = cmd.ExecuteNonQuery();
+            cmd.Dispose();
+
+            return result > 0 ? true : false;
+        }
     }
 }