Example #1
0
        protected void DoOverridePostData(object sender, MCS.Web.WebControls.PostProgressDoPostedDataEventArgs e)
        {
            // 先保存当前数据
            try
            {
                ProcessProgress pg = ProcessProgress.Current;
                pg.CurrentStep = pg.MaxStep = 1;
                pg.MinStep     = 0;
                var  aclMembers   = JSONSerializerExecute.Deserialize <SCAclMemberCollection>(e.Steps[0]);
                bool all          = e.Steps[1].Equals("all");
                bool inheritRight = e.Steps[2].Equals("inherit");
                var  obj          = DbUtil.GetEffectiveObject(e.ClientExtraPostedData, null);

                InnerDoSave(aclMembers, obj, inheritRight);

                AU.Operations.Facade.InstanceWithPermissions.ReplaceAclRecursively((ISCAclContainer)obj, all);

                pg.Output.WriteLine("完毕");
            }
            catch (Exception ex)
            {
                ProcessProgress.Current.Output.WriteLine(ex.ToString());
                ProcessProgress.Current.StatusText = "错误";
                ProcessProgress.Current.Response();
            }

            e.Result.CloseWindow = false;
            e.Result.ProcessLog  = ProcessProgress.Current.GetDefaultOutput();
        }
        protected void ProcessCaculating(object sender, MCS.Web.WebControls.PostProgressDoPostedDataEventArgs e)
        {
            SCConditionCalculator calc = new SCConditionCalculator();

            calc.GenerateUserAndContainerSnapshot(new[] { (PC.SCGroup)SchemaObjectAdapter.Instance.Load(this.calcProgress.Tag) });

            e.Result.DataChanged = true;
            e.Result.CloseWindow = false;
            e.Result.ProcessLog  = ProcessProgress.Current.GetDefaultOutput();
        }
Example #3
0
        protected void ProcessGlobalCaculating(object sender, MCS.Web.WebControls.PostProgressDoPostedDataEventArgs e)
        {
            Util.EnsureOperationSafe();

            AUConditionCalculator calc = new AUConditionCalculator(calcProgressAll.Tag);

            calc.GenerateAllItemAndContainerSnapshot();

            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();
        }