public static bool SaveData(DataTable dt) { bool success = false; byte[] by = DataTableConvertBytes.ConvertDataTableToBytes(dt); DataTableConvertBytes.SaveToFile(by, filePath); return(success); }
public static DataTable GetData() { DataTable table = null; if (File.Exists(filePath)) { byte[] by = DataTableConvertBytes.GetBytesFromFile(filePath); table = DataTableConvertBytes.ConvertBytesToDataTable(by); } else { table = InitDataTable(); } return(table); }