Example #1
0
        public NameValueCollection Recovery(int publishmentSystemId, bool isDeleteChannels, bool isDeleteTemplates, bool isDeleteFiles, bool isZip, string path, bool isOverride, bool isUseTable, string userKeyPrefix, RequestBody body)
        {
            //返回“运行结果”和“错误信息”的字符串数组
            NameValueCollection retval;

            try
            {
                BackupUtility.RecoverySite(publishmentSystemId, isDeleteChannels, isDeleteTemplates, isDeleteFiles, isZip, PageUtils.UrlDecode(path), isOverride, isUseTable, body.AdministratorName);

                body.AddSiteLog(publishmentSystemId, "恢复备份数据", body.AdministratorName);

                retval = AjaxManager.GetWaitingTaskNameValueCollection("数据恢复成功!", string.Empty, string.Empty);

                //retval = new string[] { "数据恢复成功!", string.Empty, string.Empty };
            }
            catch (Exception ex)
            {
                //retval = new string[] { string.Empty, ex.Message, string.Empty };
                retval = AjaxManager.GetWaitingTaskNameValueCollection(string.Empty, ex.Message, string.Empty);
                LogUtils.AddErrorLog(ex);
            }

            return(retval);
        }