Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     DirID        = Request.QueryString["DirID"];
     currentDirID = Request.QueryString["currentDirID"];
     if (currentDirID.IsGuid())
     {
         docDir = DocDir.Get(currentDirID.ToGuid());
     }
     if (!IsPostBack)
     {
         if (docDir != null)
         {
             this.Name.Value         = docDir.Name;
             this.ReadUsers.Value    = docDir.ReadUsers;
             this.PublishUsers.Value = docDir.PublishUsers;
             this.ManageUsers.Value  = docDir.ManageUsers;
             this.Sort.Value         = docDir.Sort.ToString();
             DirID = docDir.ParentID.ToString();
         }
         else
         {
             this.Sort.Value = DocDir.GetMaxSort(DirID.ToGuid()).ToString();
             //this.PublishUsers.Value = "r_" + RoadFlow.Utility.Config.AdminRoleID;
             //this.ManageUsers.Value = "r_" + RoadFlow.Utility.Config.AdminRoleID;
         }
     }
 }
Пример #2
0
        public ActionResult DirDelete(FormCollection collection)
        {
            string str1 = this.Request.QueryString["DirID"];
            string str2 = this.Request.QueryString["currentDirID"];

            RoadFlow.Platform.DocumentDirectory   documentDirectory1 = new RoadFlow.Platform.DocumentDirectory();
            RoadFlow.Data.Model.DocumentDirectory documentDirectory2 = (RoadFlow.Data.Model.DocumentDirectory)null;
            if (str2.IsGuid())
            {
                documentDirectory2 = documentDirectory1.Get(str2.ToGuid());
            }
            if (documentDirectory2 == null)
            {
                // ISSUE: reference to a compiler-generated field
                if (DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__0 == null)
                {
                    // ISSUE: reference to a compiler-generated field
                    DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__0 = CallSite <Func <CallSite, object, string, object> > .Create(Binder.SetMember(CSharpBinderFlags.None, "script", typeof(DocumentsController), (IEnumerable <CSharpArgumentInfo>) new CSharpArgumentInfo[2]
                    {
                        CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string)null),
                        CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, (string)null)
                    }));
                }
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                object obj = DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__0.Target((CallSite)DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__0, this.ViewBag, "alert('栏目为空!');window.location='List" + this.Request.Url.Query + "';");
                return((ActionResult)this.View());
            }
            if (documentDirectory2.ParentID == Guid.Empty)
            {
                // ISSUE: reference to a compiler-generated field
                if (DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__1 == null)
                {
                    // ISSUE: reference to a compiler-generated field
                    DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__1 = CallSite <Func <CallSite, object, string, object> > .Create(Binder.SetMember(CSharpBinderFlags.None, "script", typeof(DocumentsController), (IEnumerable <CSharpArgumentInfo>) new CSharpArgumentInfo[2]
                    {
                        CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string)null),
                        CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType | CSharpArgumentInfoFlags.Constant, (string)null)
                    }));
                }
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                object obj = DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__1.Target((CallSite)DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__1, this.ViewBag, "alert('根栏目不能删除根栏目!');window.location=window.location;");
                return((ActionResult)this.View());
            }
            string allChildIdString = documentDirectory1.GetAllChildIdString(documentDirectory2.ID);

            RoadFlow.Platform.Documents documents = new RoadFlow.Platform.Documents();
            string str3 = allChildIdString;

            char[] chArray = new char[1] {
                ','
            };
            foreach (string str4 in str3.Split(chArray))
            {
                documentDirectory1.Delete(str4.ToGuid());
                documents.DeleteByDirectoryID(str4.ToGuid());
                documentDirectory1.ClearDirUsersCache(str4.ToGuid());
            }
            documentDirectory1.ClearCache();
            RoadFlow.Platform.Log.Add("删除的文档栏目及其所有下级栏目", allChildIdString, RoadFlow.Platform.Log.Types.文档中心, "", "", (RoadFlow.Data.Model.Users)null);
            // ISSUE: reference to a compiler-generated field
            if (DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__2 == null)
            {
                // ISSUE: reference to a compiler-generated field
                DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__2 = CallSite <Func <CallSite, object, string, object> > .Create(Binder.SetMember(CSharpBinderFlags.None, "script", typeof(DocumentsController), (IEnumerable <CSharpArgumentInfo>) new CSharpArgumentInfo[2]
                {
                    CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string)null),
                    CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, (string)null)
                }));
            }
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            object obj1 = DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__2.Target((CallSite)DocumentsController.\u003C\u003Eo__8.\u003C\u003Ep__2, this.ViewBag, "parent.frames[0].reLoad('" + (object)documentDirectory2.ParentID + "');alert('删除成功!');window.location='List" + this.Request.Url.Query + "';");

            return((ActionResult)this.View());
        }
Пример #3
0
        public ActionResult DirAdd(FormCollection collection)
        {
            string str1 = this.Request.QueryString["DirID"];
            string str2 = this.Request.QueryString["currentDirID"];

            RoadFlow.Platform.DocumentDirectory   documentDirectory = new RoadFlow.Platform.DocumentDirectory();
            RoadFlow.Data.Model.DocumentDirectory model             = (RoadFlow.Data.Model.DocumentDirectory)null;
            if (str2.IsGuid())
            {
                model = documentDirectory.Get(str2.ToGuid());
            }
            if (collection != null)
            {
                string str3   = this.Request.Form["Name"];
                string str4   = this.Request.Form["ReadUsers"];
                string str5   = this.Request.Form["PublishUsers"];
                string str6   = this.Request.Form["ManageUsers"];
                string str7   = this.Request.Form["Sort"];
                bool   flag   = false;
                string oldXML = string.Empty;
                if (model == null)
                {
                    flag           = true;
                    model          = new RoadFlow.Data.Model.DocumentDirectory();
                    model.ID       = Guid.NewGuid();
                    model.ParentID = str1.ToGuid();
                }
                else
                {
                    oldXML = model.Serialize();
                }
                model.ManageUsers  = str6;
                model.Name         = str3.Trim1();
                model.PublishUsers = str5;
                model.ReadUsers    = str4;
                model.Sort         = str7.ToInt();
                if (flag)
                {
                    documentDirectory.Add(model);
                    RoadFlow.Platform.Log.Add("添加了栏目", model.Serialize(), RoadFlow.Platform.Log.Types.文档中心, "", "", (RoadFlow.Data.Model.Users)null);
                }
                else
                {
                    documentDirectory.Update(model);
                    RoadFlow.Platform.Log.Add("修改了栏目", model.Serialize(), RoadFlow.Platform.Log.Types.文档中心, oldXML, model.Serialize(), (RoadFlow.Data.Model.Users)null);
                }
                documentDirectory.ClearDirUsersCache(model.ID);
                documentDirectory.ClearCache();
                // ISSUE: reference to a compiler-generated field
                if (DocumentsController.\u003C\u003Eo__7.\u003C\u003Ep__0 == null)
                {
                    // ISSUE: reference to a compiler-generated field
                    DocumentsController.\u003C\u003Eo__7.\u003C\u003Ep__0 = CallSite <Func <CallSite, object, string, object> > .Create(Binder.SetMember(CSharpBinderFlags.None, "script", typeof(DocumentsController), (IEnumerable <CSharpArgumentInfo>) new CSharpArgumentInfo[2]
                    {
                        CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, (string)null),
                        CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.UseCompileTimeType, (string)null)
                    }));
                }
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                object obj = DocumentsController.\u003C\u003Eo__7.\u003C\u003Ep__0.Target((CallSite)DocumentsController.\u003C\u003Eo__7.\u003C\u003Ep__0, this.ViewBag, "parent.frames[0].reLoad('" + (object)model.ParentID + "');alert('保存成功!');window.location='List" + this.Request.Url.Query + "';");
            }
            if (model == null)
            {
                model          = new RoadFlow.Data.Model.DocumentDirectory();
                model.Sort     = documentDirectory.GetMaxSort(str1.ToGuid());
                model.ParentID = str1.ToGuid();
            }
            return((ActionResult)this.View((object)model));
        }