Exemplo n.º 1
0
        /// <summary>
        /// 增、改K_SysUserGroup表

        /// </summary>
        /// <param name="tranType">操作类型,NEW=增,EDIT=改</param>
        /// <param name="AutModel"></param>
        /// <returns>返回大于0的数字操作正常,返回非数字表示操作错误,返回的是系统错误说明</returns>
        public string Save(string trantype, KingTop.Model.SysManage.UserGroup UserGroupModel)
        {
            return(dal.Save(trantype, UserGroupModel));

            //更新缓存 无法访问
            KingTop.Common.AppCache.Remove("UserGroupRoleCache");
            KingTop.BLL.SysManage.RightTool bllRight = new RightTool();
            bllRight.GetUserGroupRoleFromCache();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 设置或者删除K_SysActionPermit记录
        /// </summary>
        /// <param name="tranType">操作参数:DEL=删除,PUB=发布,TOP=置顶,NEW=置新,HOT=热,COMMEND=推荐</param>
        /// <param name="setValue">设置值</param>
        /// <param name="IDList">ID集合,多个用“,”分隔</param>
        /// <returns>返回大于0的数字操作正常,返回非数字表示操作错误,返回的是系统错误说明</returns>
        public string ActionPermitSet(string tranType, string setValue, string IDList)
        {
            string re;

            re = dal.ActionPermitSet(tranType, setValue, IDList);

            //更新缓存
            KingTop.Common.AppCache.Remove("ModuleActionCache");
            KingTop.BLL.SysManage.RightTool rtBll = new RightTool();
            rtBll.GetModuleActionFromCache();

            return(re);
        }
Exemplo n.º 3
0
        //从缓存中获取K_SysActionPermit表

        //public DataTable GetActionPermitFromCache()
        //{
        //    if (AppCache.IsExist("ActionPermitCache"))
        //    {
        //        return (DataTable)AppCache.Get("ActionPermitCache");
        //    }
        //    else
        //    {
        //        DataTable dt = GetList("Cache", Utils.getOneParams(""));
        //        AppCache.Add("ActionPermitCache", dt, "K_SysActionPermit");
        //        return dt;
        //    }
        //}

        #region 增、改K_SysActionPermit表

        /// <summary>
        /// 增、改K_SysActionPermit表

        /// </summary>
        /// <param name="tranType">操作类型,NEW=增,EDIT=改</param>
        /// <param name="AutModel"></param>
        /// <returns>返回大于0的数字操作正常,返回非数字表示操作错误,返回的是系统错误说明</returns>
        public string Save(string trantype, KingTop.Model.SysManage.ActionPermit ActionPermitModel)
        {
            string re;

            re = dal.Save(trantype, ActionPermitModel);

            //更新缓存
            KingTop.Common.AppCache.Remove("ModuleActionCache");
            KingTop.BLL.SysManage.RightTool rtBll = new RightTool();
            rtBll.GetModuleActionFromCache();

            return(re);
        }
Exemplo n.º 4
0
        private string SaveData(string strRoleCode, XmlNode objNodes)
        {
            //判断是否有权限

            if (IsHaveRightByOperCode("Right"))
            {
                strRoleCode = strRoleCode.Replace("'", "");
                KingTop.BLL.SysManage.RightTool objRight = new KingTop.BLL.SysManage.RightTool();
                objRight.LogUserPK = ViewState["RoleCode"].ToString();
                objRight.SaveData2(strRoleCode, objNodes);
                objRight = null;
                return("编辑角色权限成功!");
            }
            else
            {
                return("你没有修改角色权限的权限,请联系站点管理员!");
            }
        }
 private void CreateTree()
 {
     try
     {
         int TemplateID = Utils.ParseInt(this.txtTemplate.Value, 0);
         KingTop.BLL.SysManage.RightTool     objRight = new KingTop.BLL.SysManage.RightTool();
         System.Web.UI.WebControls.TableCell objCell  = new TableCell();
         System.Web.UI.WebControls.TableRow  objRow   = new TableRow();
         objRow              = objRight.CreateRow(ref this.tblMain);
         objCell             = objRight.CreateCell(ref objRow);
         objRight.TemplateID = TemplateID;
         objRight.SetTemplateRightList(TemplateID, "");
         objRight.CreateTree("", ref objCell, TemplateID);
         objRow.Controls.Add(objCell);
         tblMain.Controls.Add(objRow);
         objRight = null;
         return;
     }
     catch { }
 }
Exemplo n.º 6
0
 private void CreateTree()
 {
     try
     {
         string strRoleCode = this.txtRoleCode.Value;
         KingTop.BLL.SysManage.RightTool     objRight = new KingTop.BLL.SysManage.RightTool();
         System.Web.UI.WebControls.TableCell objCell  = new TableCell();
         System.Web.UI.WebControls.TableRow  objRow   = new TableRow();
         objRow             = objRight.CreateRow(ref this.tblMain);
         objCell            = objRight.CreateCell(ref objRow);
         objRight.RoleCode  = strRoleCode;
         objRight.LogUserPK = base.GetLoginAccountId();
         objRight.SiteID    = SiteID;
         objRight.SetModuleRightList2("");
         objRight.CreateTree("", ref objCell, "", null, GetLoginAccountId(), GetLoginUserGroupCode());
         objRow.Controls.Add(objCell);
         tblMain.Controls.Add(objRow);
         objRight = null;
         return;
     }
     catch { }
 }
Exemplo n.º 7
0
 public bool IsHaveRightByOperCode(string OperType)
 {
     KingTop.BLL.SysManage.RightTool RightToo = new KingTop.BLL.SysManage.RightTool();
     return(RightToo.IsHaveRightByOperCode(NodeID, OperType, GetLoginAccountId()));
     //return RightToo.IsHaveRightByOperCodeFromCache(NodeID, OperType, GetLoginAccountId());
 }
Exemplo n.º 8
0
 //权限判断 gavin by 2010-07-12
 public bool HasLeftMenuRights(string NodeCode)
 {
     KingTop.BLL.SysManage.RightTool RightToo = new KingTop.BLL.SysManage.RightTool();
     return(RightToo.HasLeftMenuRights(int.Parse(GetLoginAccountId()), GetLoginUserGroupCode(), NodeCode));
 }