private static void removeDummySchedules() { mysql_serversTableAdapter server = new mysql_serversTableAdapter(); schedulesTableAdapter adapter = new schedulesTableAdapter(); for (int i = 0; i < 10; i++) { string scheduleName = SCHEDULE_BASE_NAME + i; adapter.DeleteByName(scheduleName); Console.WriteLine("Remove"); server.DeleteBYName(scheduleName); } }
private static void fillDummySchedules() { mysql_serversTableAdapter server = new mysql_serversTableAdapter(); for (int i = 0; i < 10; i++) { server.Insert(SCHEDULE_BASE_NAME + i, 3306, "127.0.0.1", "username", "pass", "database"); } schedulesTableAdapter adapter = new schedulesTableAdapter(); for (int i = 0; i < 10; i++) { string scheduleName = SCHEDULE_BASE_NAME + i; int rowid = (int)(long)server.GetIdByName(scheduleName); adapter.Insert((int)rowid, scheduleName, DateTime.Now.Date, 0, i, "database", "table1-table2-table3", i + 10, i + 10, i); Console.WriteLine("Insert"); } }