/// <summary> /// 更新一条数据 /// </summary> public bool Update(Model.sites model) { string old_build_path = dal.GetBuildPath(model.id); if (string.IsNullOrEmpty(old_build_path)) { return(false); } if (dal.Update(model, old_build_path)) { if (old_build_path.ToLower() != model.build_path.ToLower()) { //更改频道分类对应的目录名称 FileHelper.MoveDirectory(sysConfig.webpath + DTKeys.DIRECTORY_REWRITE_ASPX + "/" + old_build_path, sysConfig.webpath + DTKeys.DIRECTORY_REWRITE_ASPX + "/" + model.build_path); FileHelper.MoveDirectory(sysConfig.webpath + DTKeys.DIRECTORY_REWRITE_HTML + "/" + old_build_path, sysConfig.webpath + DTKeys.DIRECTORY_REWRITE_HTML + "/" + model.build_path); } return(true); } return(false); }
/// <summary> /// 返回站点的生成目录名 /// </summary> public string GetBuildPath(int id) { return(dal.GetBuildPath(id)); }