Exemplo n.º 1
0
        public string getDataSource()
        {
            var path     = Server.MapPath("/backup/");
            var name     = DataBaseHelper.GetDbName();
            var autoName = name + "_backup";
            //每天自动备份命名:DBName+"_backup_"+"日期"
            ///过滤掉还原前的自动备份的文件(看不见就不会删除了),以防止万一还原错了,没法还原回还原前的状态
            var list = FileOperate.GetDirectoryFiles(path, "bak").Select(a => new { Name = a.Name, CreationTime = a.CreationTime })
                       .Where(a => (a.Name.StartsWith(Before_Restore) == false) && a.Name.StartsWith(autoName) == false)
                       .OrderByDescending(a => a.CreationTime).ToList();

            return(JsonHelp.ConvertToTablesJson(list));
        }
Exemplo n.º 2
0
 /// <summary>
 /// 加载数据列表
 /// </summary>
 /// <returns></returns>
 public string getDataSource()
 {
     return(JsonHelp.ConvertToTablesJson(DB.Sys_BasicData.getBasicDataByType(type)));
 }