public DataTable GetDateTable() { DataTable table = new DataTable("Dates"); SqlCeDataAdapter adapter = PTDatabase.GetAdaperForDatesView(); adapter.Fill(table); return(table); }
public DataTable GetProcessInfoTableForDate(DateTime datetime) { DataTable table = new DataTable("ProcessInfos"); PTDate date = PTDatabase.GetDateForDateTime(datetime); SqlCeDataAdapter adapter = PTDatabase.GetAdaperForProcessInfosViewForDate(date); adapter.Fill(table); return(table); }
public static void HandleRecord(PTRecord record) { PTDate date = PTDatabase.GetDateForDateTime(record.datetime); if (!PTDatabase.UpdateProcessTime(record.name, date, record.time)) { PTDatabase.InsertProcessInfo(record.name, record.time, date); } }