Esempio n. 1
0
        public RedirectResult SubPageDelete()
        {
            string contents = this.Request.Form["subpagesbox"] ?? "";

            RoadFlow.Platform.AppLibrarySubPages appLibrarySubPages = new RoadFlow.Platform.AppLibrarySubPages();
            RoadFlow.Platform.AppLibraryButtons1 appLibraryButtons1 = new RoadFlow.Platform.AppLibraryButtons1();
            using (TransactionScope transactionScope = new TransactionScope())
            {
                string str1    = contents;
                char[] chArray = new char[1] {
                    ','
                };
                foreach (string str2 in str1.Split(chArray))
                {
                    if (str2.IsGuid())
                    {
                        appLibrarySubPages.Delete(str2.ToGuid());
                        appLibraryButtons1.DeleteByAppID(str2.ToGuid());
                    }
                }
                RoadFlow.Platform.Log.Add("删除了子页面", contents, RoadFlow.Platform.Log.Types.菜单权限, "", "", (RoadFlow.Data.Model.Users)null);
                transactionScope.Complete();
            }
            appLibrarySubPages.ClearCache();
            appLibraryButtons1.ClearCache();
            return(this.Redirect("SubPages" + this.Request.Url.Query));
        }
        public RedirectResult SubPageDelete()
        {
            string text = base.Request.Form["subpagesbox"] ?? "";

            RoadFlow.Platform.AppLibrarySubPages appLibrarySubPages = new RoadFlow.Platform.AppLibrarySubPages();
            RoadFlow.Platform.AppLibraryButtons1 appLibraryButtons  = new RoadFlow.Platform.AppLibraryButtons1();
            using (TransactionScope transactionScope = new TransactionScope())
            {
                string[] array = text.Split(',');
                foreach (string text2 in array)
                {
                    if (MyExtensions.IsGuid(text2))
                    {
                        appLibrarySubPages.Delete(MyExtensions.ToGuid(text2));
                        appLibraryButtons.DeleteByAppID(MyExtensions.ToGuid(text2));
                    }
                }
                RoadFlow.Platform.Log.Add("删除了子页面", text, RoadFlow.Platform.Log.Types.菜单权限);
                transactionScope.Complete();
            }
            appLibrarySubPages.ClearCache();
            appLibraryButtons.ClearCache();
            return(Redirect("SubPages" + base.Request.Url.Query));
        }