Exemple #1
0
        public static bool SaveData(DataTable dt)
        {
            bool success = false;

            byte[] by = DataTableConvertBytes.ConvertDataTableToBytes(dt);
            DataTableConvertBytes.SaveToFile(by, filePath);
            return(success);
        }
Exemple #2
0
        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);
        }