public void RecalculateAllConditions() { SCConditionCalculator calculator = new SCConditionCalculator(); SCCacheHelper.InvalidateAllCache(); calculator.GenerateAllUserAndContainerSnapshot(); }
protected void ProcessCaculating(object sender, MCS.Web.WebControls.PostProgressDoPostedDataEventArgs e) { SCConditionCalculator calc = new SCConditionCalculator(); calc.GenerateUserAndContainerSnapshot(new[] { (PC.SCRole)PC.Adapters.SchemaObjectAdapter.Instance.Load(this.calcProgress.Tag) }); SCCacheHelper.InvalidateAllCache(); e.Result.DataChanged = true; e.Result.CloseWindow = false; e.Result.ProcessLog = ProcessProgress.Current.GetDefaultOutput(); }
protected void ProcessGlobalCaculating(object sender, MCS.Web.WebControls.PostProgressDoPostedDataEventArgs e) { SCConditionCalculator calc = new SCConditionCalculator(); calc.GenerateAllUserAndContainerSnapshot(); SCCacheHelper.InvalidateAllCache(); e.Result.DataChanged = true; e.Result.CloseWindow = false; e.Result.ProcessLog = ProcessProgress.Current.GetDefaultOutput(); }
protected void Processing(object sender, MCS.Web.WebControls.PostProgressDoPostedDataEventArgs e) { ProcessProgress.Current.MinStep = 0; ProcessProgress.Current.MaxStep = ProcessProgress.Current.CurrentStep = 1; StepContext context = new StepContext(); try { string fromUnitID = (string)e.Steps[0]; string newName = (string)e.Steps[1]; string newCodeName = (string)e.Steps[2]; string toUnitID = (string)e.Steps[3]; bool copyRoleMembers = (bool)e.Steps[4]; bool copyScopeMembers = (bool)e.Steps[5]; bool copyScopeConditions = (bool)e.Steps[6]; var fromUnit = DbUtil.GetEffectiveObject <AU.AdminUnit>(fromUnitID); string schemaID = fromUnit.AUSchemaID; if (string.IsNullOrEmpty(schemaID)) { throw new AUObjectException("无法获取要复制单元的架构ID"); } var targetParent = toUnitID == schemaID ? null : DbUtil.GetEffectiveObject <AU.AdminUnit>(toUnitID); if (targetParent != null && fromUnit.AUSchemaID != targetParent.AUSchemaID) { throw new AU.AUObjectException("选择的目标父级单元与子级单元架构不同"); } DoCopyUnit(context, fromUnit, targetParent, newName, newCodeName, copyRoleMembers, copyScopeMembers, copyScopeConditions); } catch (AUObjectValidationException vex) { ProcessProgress.Current.Output.WriteLine(vex.Message); } catch (Exception ex) { ProcessProgress.Current.Output.WriteLine(ex.ToString()); } e.Result.ProcessLog = context.Logger.ToString(); ProcessProgress.Current.StatusText = "结束"; ProcessProgress.Current.Response(); SCCacheHelper.InvalidateAllCache(); e.Result.DataChanged = true; e.Result.CloseWindow = false; e.Result.ProcessLog = ProcessProgress.Current.GetDefaultOutput(); }
protected void ProcessCaculating(object sender, MCS.Web.WebControls.PostProgressDoPostedDataEventArgs e) { var scope = DbUtil.GetEffectiveObject <AU.AUAdminScope>(this.calcProgress.Tag); AUConditionCalculator calc = new AUConditionCalculator(scope.ScopeSchemaType); AU.AUCommon.DoDbAction(() => { calc.GenerateItemAndContainerSnapshot(new[] { scope }); }); SCCacheHelper.InvalidateAllCache(); e.Result.DataChanged = true; e.Result.CloseWindow = false; e.Result.ProcessLog = ProcessProgress.Current.GetDefaultOutput(); }
protected void btnClearServerCache_Click(object sender, EventArgs e) { SCCacheHelper.InvalidateAllCache(); }
public void RemoveAllCache() { SCCacheHelper.InvalidateAllCache(); }