예제 #1
0
        public string update()
        {
            StringBuilder sb = new StringBuilder();
            //TESTING!!!
            c_FileDataCollectionManager uh = new c_FileDataCollectionManager(_dbh);
            dataObject v = uh.getUpdate();

            foreach (c_DataUpdateObject c in v.GetAll())
            {
                Console.WriteLine($"-----{c.Name}-----");
                string columns = "";
                string values  = "";
                foreach (DictionaryEntry o in c.Get())
                {
                    if (o.Key.ToString() != "DATATYPE")
                    {
                        columns += $" `{o.Key}`, ";
                        values  += $" '{o.Value}', ";
                    }
                }
                columns = columns.Trim(ca);
                values  = values.Trim(ca);
                sb.Append($"INSERT OR REPLACE INTO  {c.Name} ({columns}) VALUES ({values});\r\n");
            }

            return(sb.ToString());
        }
예제 #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     p_Search.Hide();
     uh = new c_FileDataCollectionManager(_dbh);
 }