예제 #1
0
        public void Create(Party party)
        {
            genericMgr.Create(party);

            #region 加权限
            Permission permission = new Permission();
            permission.Code = party.Code;
            permission.Description = party.Name;
            permission.PermissionCategory = party.GetType().Name;
            genericMgr.Create(permission);
            #endregion

            #region 加用户权限
            UserPermission up = new UserPermission();
            up.Permission = permission;
            up.User = SecurityContextHolder.Get();
            genericMgr.Create(up);
            #endregion
        }
 public void AddNewCustReport(string code)
 {
     CustReportMaster custReportMaster = genericMgr.FindById<CustReportMaster>(code);
     Permission accPermission = new Permission();
     accPermission.Code = code;
     accPermission.Description = "报表管理-信息-"+custReportMaster.Name;
     accPermission.PermissionCategory = "Menu_CustReport";
     accPermission.Sequence = custReportMaster.Seq;
     genericMgr.Create(accPermission);
 }