private List <RoadFlow.Data.Model.DocumentDirectory> DataReaderToList(OracleDataReader dataReader)
        {
            List <RoadFlow.Data.Model.DocumentDirectory> documentDirectoryList = new List <RoadFlow.Data.Model.DocumentDirectory>();

            while (dataReader.Read())
            {
                RoadFlow.Data.Model.DocumentDirectory documentDirectory = new RoadFlow.Data.Model.DocumentDirectory();
                documentDirectory.ID       = dataReader.GetString(0).ToGuid();
                documentDirectory.ParentID = dataReader.GetString(1).ToGuid();
                documentDirectory.Name     = dataReader.GetString(2);
                if (!dataReader.IsDBNull(3))
                {
                    documentDirectory.ReadUsers = dataReader.GetString(3);
                }
                if (!dataReader.IsDBNull(4))
                {
                    documentDirectory.ManageUsers = dataReader.GetString(4);
                }
                if (!dataReader.IsDBNull(5))
                {
                    documentDirectory.PublishUsers = dataReader.GetString(5);
                }
                documentDirectory.Sort = dataReader.GetInt32(6);
                documentDirectoryList.Add(documentDirectory);
            }
            return(documentDirectoryList);
        }
Beispiel #2
0
        public List <RoadFlow.Data.Model.Users> GetManageUsers(Guid dirID)
        {
            object obj = Opation.Get(this.DocumentsDirectoryManageUsers + dirID.ToString("N"));

            if (obj is List <RoadFlow.Data.Model.Users> )
            {
                return((List <RoadFlow.Data.Model.Users>)obj);
            }
            RoadFlow.Data.Model.DocumentDirectory documentDirectory = this.Get(dirID);
            if (documentDirectory == null)
            {
                return(new List <RoadFlow.Data.Model.Users>());
            }
            if (!documentDirectory.ManageUsers.IsNullOrEmpty())
            {
                List <RoadFlow.Data.Model.Users> allUsers = new Organize().GetAllUsers(documentDirectory.ManageUsers);
                Opation.Set(this.DocumentsDirectoryManageUsers + dirID.ToString("N"), (object)allUsers);
                return(allUsers);
            }
            foreach (RoadFlow.Data.Model.DocumentDirectory allParent in this.GetAllParents(dirID, false))
            {
                if (!allParent.ManageUsers.IsNullOrEmpty())
                {
                    List <RoadFlow.Data.Model.Users> allUsers = new Organize().GetAllUsers(allParent.ManageUsers);
                    Opation.Set(this.DocumentsDirectoryManageUsers + dirID.ToString("N"), (object)allUsers);
                    return(allUsers);
                }
            }
            return(new List <RoadFlow.Data.Model.Users>());
        }
Beispiel #3
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;
         }
     }
 }
Beispiel #4
0
 public string GetName(Guid id)
 {
     RoadFlow.Data.Model.DocumentDirectory documentDirectory = this.Get(id);
     if (documentDirectory != null)
     {
         return(documentDirectory.Name);
     }
     return("");
 }
Beispiel #5
0
 private void addParent(List <RoadFlow.Data.Model.DocumentDirectory> list, Guid id)
 {
     if (id.IsEmptyGuid())
     {
         return;
     }
     RoadFlow.Data.Model.DocumentDirectory documentDirectory = this.Get(id);
     if (documentDirectory == null)
     {
         return;
     }
     list.Add(documentDirectory);
     this.addParent(list, documentDirectory.ParentID);
 }
Beispiel #6
0
        public List <RoadFlow.Data.Model.DocumentDirectory> GetAllChilds(Guid id, bool isMe = true)
        {
            List <RoadFlow.Data.Model.DocumentDirectory> list = new List <RoadFlow.Data.Model.DocumentDirectory>();

            RoadFlow.Data.Model.DocumentDirectory documentDirectory = this.Get(id);
            if (documentDirectory != null)
            {
                if (isMe)
                {
                    list.Add(documentDirectory);
                }
                this.addChilds(list, id);
            }
            return(list);
        }
Beispiel #7
0
        public List <RoadFlow.Data.Model.DocumentDirectory> GetAllParents(Guid id, bool isMe = false)
        {
            List <RoadFlow.Data.Model.DocumentDirectory> list = new List <RoadFlow.Data.Model.DocumentDirectory>();

            RoadFlow.Data.Model.DocumentDirectory documentDirectory = this.Get(id);
            if (documentDirectory == null)
            {
                return(list);
            }
            if (isMe)
            {
                list.Add(documentDirectory);
            }
            this.addParent(list, documentDirectory.ParentID);
            return(list);
        }
Beispiel #8
0
 public bool HasDisplay(RoadFlow.Data.Model.DocumentDirectory dir, Guid userID)
 {
     if (dir == null)
     {
         return(false);
     }
     if (this.HasManage(dir.ID, userID) || this.HasRead(dir.ID, userID) || this.HasPublish(dir.ID, userID))
     {
         return(true);
     }
     foreach (RoadFlow.Data.Model.DocumentDirectory allChild in this.GetAllChilds(dir.ID, true))
     {
         if (this.HasManage(allChild.ID, userID) || this.HasRead(allChild.ID, userID) || this.HasPublish(allChild.ID, userID))
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #9
0
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            string Name         = Request.Form["Name"];
            string ReadUsers    = Request.Form["ReadUsers"];
            string PublishUsers = Request.Form["PublishUsers"];
            string ManageUsers  = Request.Form["ManageUsers"];
            string Sort         = Request.Form["Sort"];

            bool   isAdd  = false;
            string oldxml = string.Empty;

            if (docDir == null)
            {
                isAdd           = true;
                docDir          = new RoadFlow.Data.Model.DocumentDirectory();
                docDir.ID       = Guid.NewGuid();
                docDir.ParentID = DirID.ToGuid();
            }
            else
            {
                oldxml = docDir.Serialize();
            }
            docDir.ManageUsers  = ManageUsers;
            docDir.Name         = Name.Trim1();
            docDir.PublishUsers = PublishUsers;
            docDir.ReadUsers    = ReadUsers;
            docDir.Sort         = Sort.ToInt();

            if (isAdd)
            {
                DocDir.Add(docDir);
                RoadFlow.Platform.Log.Add("添加了栏目", docDir.Serialize(), RoadFlow.Platform.Log.Types.文档中心);
            }
            else
            {
                DocDir.Update(docDir);
                RoadFlow.Platform.Log.Add("修改了栏目", docDir.Serialize(), RoadFlow.Platform.Log.Types.文档中心, oldxml, docDir.Serialize());
            }
            DocDir.ClearDirUsersCache(docDir.ID);
            DocDir.ClearCache();
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "ok", "parent.frames[0].reLoad('" + DirID + "');alert('保存成功!');window.location='List.aspx" + Request.Url.Query + "';", true);
        }
        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());
        }
        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));
        }
Beispiel #12
0
 public int Update(RoadFlow.Data.Model.DocumentDirectory model)
 {
     return(this.dataDocumentDirectory.Update(model));
 }
Beispiel #13
0
 public int Add(RoadFlow.Data.Model.DocumentDirectory model)
 {
     return(this.dataDocumentDirectory.Add(model));
 }
        public int Update(RoadFlow.Data.Model.DocumentDirectory model)
        {
            string sql = "UPDATE DocumentDirectory SET \r\n\t\t\t\tParentID=:ParentID,Name=:Name,ReadUsers=:ReadUsers,ManageUsers=:ManageUsers,PublishUsers=:PublishUsers,Sort=:Sort\r\n\t\t\t\tWHERE ID=:ID";

            OracleParameter[] oracleParameterArray = new OracleParameter[7];
            int             index1           = 0;
            OracleParameter oracleParameter1 = new OracleParameter(":ParentID", OracleDbType.Varchar2);

            oracleParameter1.Value       = (object)model.ParentID;
            oracleParameterArray[index1] = oracleParameter1;
            int             index2           = 1;
            OracleParameter oracleParameter2 = new OracleParameter(":Name", OracleDbType.Varchar2);

            oracleParameter2.Value       = (object)model.Name;
            oracleParameterArray[index2] = oracleParameter2;
            int             index3 = 2;
            OracleParameter oracleParameter3;

            if (model.ReadUsers != null)
            {
                OracleParameter oracleParameter4 = new OracleParameter(":ReadUsers", OracleDbType.Varchar2);
                oracleParameter4.Value = (object)model.ReadUsers;
                oracleParameter3       = oracleParameter4;
            }
            else
            {
                oracleParameter3       = new OracleParameter(":ReadUsers", OracleDbType.Varchar2);
                oracleParameter3.Value = (object)DBNull.Value;
            }
            oracleParameterArray[index3] = oracleParameter3;
            int             index4 = 3;
            OracleParameter oracleParameter5;

            if (model.ManageUsers != null)
            {
                OracleParameter oracleParameter4 = new OracleParameter(":ManageUsers", OracleDbType.Varchar2);
                oracleParameter4.Value = (object)model.ManageUsers;
                oracleParameter5       = oracleParameter4;
            }
            else
            {
                oracleParameter5       = new OracleParameter(":ManageUsers", OracleDbType.Varchar2);
                oracleParameter5.Value = (object)DBNull.Value;
            }
            oracleParameterArray[index4] = oracleParameter5;
            int             index5 = 4;
            OracleParameter oracleParameter6;

            if (model.PublishUsers != null)
            {
                OracleParameter oracleParameter4 = new OracleParameter(":PublishUsers", OracleDbType.Varchar2);
                oracleParameter4.Value = (object)model.PublishUsers;
                oracleParameter6       = oracleParameter4;
            }
            else
            {
                oracleParameter6       = new OracleParameter(":PublishUsers", OracleDbType.Varchar2);
                oracleParameter6.Value = (object)DBNull.Value;
            }
            oracleParameterArray[index5] = oracleParameter6;
            int             index6           = 5;
            OracleParameter oracleParameter7 = new OracleParameter(":Sort", OracleDbType.Int32);

            oracleParameter7.Value       = (object)model.Sort;
            oracleParameterArray[index6] = oracleParameter7;
            int             index7           = 6;
            OracleParameter oracleParameter8 = new OracleParameter(":ID", OracleDbType.Varchar2);

            oracleParameter8.Value       = (object)model.ID;
            oracleParameterArray[index7] = oracleParameter8;
            OracleParameter[] parameter = oracleParameterArray;
            return(this.dbHelper.Execute(sql, parameter));
        }
Beispiel #15
0
        public int Update(RoadFlow.Data.Model.DocumentDirectory model)
        {
            string sql = "UPDATE documentdirectory SET \r\n\t\t\t\tParentID=@ParentID,Name=@Name,ReadUsers=@ReadUsers,ManageUsers=@ManageUsers,PublishUsers=@PublishUsers,Sort=@Sort\r\n\t\t\t\tWHERE ID=@ID";

            MySqlParameter[] mySqlParameterArray = new MySqlParameter[7];
            int            index1          = 0;
            MySqlParameter mySqlParameter1 = new MySqlParameter("@ParentID", MySqlDbType.VarChar, 36);

            mySqlParameter1.Value       = (object)model.ParentID;
            mySqlParameterArray[index1] = mySqlParameter1;
            int            index2          = 1;
            MySqlParameter mySqlParameter2 = new MySqlParameter("@Name", MySqlDbType.Text, -1);

            mySqlParameter2.Value       = (object)model.Name;
            mySqlParameterArray[index2] = mySqlParameter2;
            int            index3 = 2;
            MySqlParameter mySqlParameter3;

            if (model.ReadUsers != null)
            {
                MySqlParameter mySqlParameter4 = new MySqlParameter("@ReadUsers", MySqlDbType.LongText, -1);
                mySqlParameter4.Value = (object)model.ReadUsers;
                mySqlParameter3       = mySqlParameter4;
            }
            else
            {
                mySqlParameter3       = new MySqlParameter("@ReadUsers", MySqlDbType.LongText, -1);
                mySqlParameter3.Value = (object)DBNull.Value;
            }
            mySqlParameterArray[index3] = mySqlParameter3;
            int            index4 = 3;
            MySqlParameter mySqlParameter5;

            if (model.ManageUsers != null)
            {
                MySqlParameter mySqlParameter4 = new MySqlParameter("@ManageUsers", MySqlDbType.LongText, -1);
                mySqlParameter4.Value = (object)model.ManageUsers;
                mySqlParameter5       = mySqlParameter4;
            }
            else
            {
                mySqlParameter5       = new MySqlParameter("@ManageUsers", MySqlDbType.LongText, -1);
                mySqlParameter5.Value = (object)DBNull.Value;
            }
            mySqlParameterArray[index4] = mySqlParameter5;
            int            index5 = 4;
            MySqlParameter mySqlParameter6;

            if (model.PublishUsers != null)
            {
                MySqlParameter mySqlParameter4 = new MySqlParameter("@PublishUsers", MySqlDbType.LongText, -1);
                mySqlParameter4.Value = (object)model.PublishUsers;
                mySqlParameter6       = mySqlParameter4;
            }
            else
            {
                mySqlParameter6       = new MySqlParameter("@PublishUsers", MySqlDbType.LongText, -1);
                mySqlParameter6.Value = (object)DBNull.Value;
            }
            mySqlParameterArray[index5] = mySqlParameter6;
            int            index6          = 5;
            MySqlParameter mySqlParameter7 = new MySqlParameter("@Sort", MySqlDbType.Int32, 11);

            mySqlParameter7.Value       = (object)model.Sort;
            mySqlParameterArray[index6] = mySqlParameter7;
            int            index7          = 6;
            MySqlParameter mySqlParameter8 = new MySqlParameter("@ID", MySqlDbType.VarChar, 36);

            mySqlParameter8.Value       = (object)model.ID;
            mySqlParameterArray[index7] = mySqlParameter8;
            MySqlParameter[] parameter = mySqlParameterArray;
            return(this.dbHelper.Execute(sql, parameter, false));
        }
        public int Update(RoadFlow.Data.Model.DocumentDirectory model)
        {
            string sql = "UPDATE DocumentDirectory SET \r\n\t\t\t\tParentID=@ParentID,Name=@Name,ReadUsers=@ReadUsers,ManageUsers=@ManageUsers,PublishUsers=@PublishUsers,Sort=@Sort\r\n\t\t\t\tWHERE ID=@ID";

            SqlParameter[] sqlParameterArray = new SqlParameter[7];
            int            index1            = 0;
            SqlParameter   sqlParameter1     = new SqlParameter("@ParentID", SqlDbType.UniqueIdentifier, -1);

            sqlParameter1.Value       = (object)model.ParentID;
            sqlParameterArray[index1] = sqlParameter1;
            int          index2        = 1;
            SqlParameter sqlParameter2 = new SqlParameter("@Name", SqlDbType.NVarChar, 1000);

            sqlParameter2.Value       = (object)model.Name;
            sqlParameterArray[index2] = sqlParameter2;
            int          index3 = 2;
            SqlParameter sqlParameter3;

            if (model.ReadUsers != null)
            {
                SqlParameter sqlParameter4 = new SqlParameter("@ReadUsers", SqlDbType.VarChar, -1);
                sqlParameter4.Value = (object)model.ReadUsers;
                sqlParameter3       = sqlParameter4;
            }
            else
            {
                sqlParameter3       = new SqlParameter("@ReadUsers", SqlDbType.VarChar, -1);
                sqlParameter3.Value = (object)DBNull.Value;
            }
            sqlParameterArray[index3] = sqlParameter3;
            int          index4 = 3;
            SqlParameter sqlParameter5;

            if (model.ManageUsers != null)
            {
                SqlParameter sqlParameter4 = new SqlParameter("@ManageUsers", SqlDbType.VarChar, -1);
                sqlParameter4.Value = (object)model.ManageUsers;
                sqlParameter5       = sqlParameter4;
            }
            else
            {
                sqlParameter5       = new SqlParameter("@ManageUsers", SqlDbType.VarChar, -1);
                sqlParameter5.Value = (object)DBNull.Value;
            }
            sqlParameterArray[index4] = sqlParameter5;
            int          index5 = 4;
            SqlParameter sqlParameter6;

            if (model.PublishUsers != null)
            {
                SqlParameter sqlParameter4 = new SqlParameter("@PublishUsers", SqlDbType.VarChar, -1);
                sqlParameter4.Value = (object)model.PublishUsers;
                sqlParameter6       = sqlParameter4;
            }
            else
            {
                sqlParameter6       = new SqlParameter("@PublishUsers", SqlDbType.VarChar, -1);
                sqlParameter6.Value = (object)DBNull.Value;
            }
            sqlParameterArray[index5] = sqlParameter6;
            int          index6        = 5;
            SqlParameter sqlParameter7 = new SqlParameter("@Sort", SqlDbType.Int, -1);

            sqlParameter7.Value       = (object)model.Sort;
            sqlParameterArray[index6] = sqlParameter7;
            int          index7        = 6;
            SqlParameter sqlParameter8 = new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1);

            sqlParameter8.Value       = (object)model.ID;
            sqlParameterArray[index7] = sqlParameter8;
            SqlParameter[] parameter = sqlParameterArray;
            return(this.dbHelper.Execute(sql, parameter, false));
        }