Esempio n. 1
0
 /// <summary>
 /// 更新角色
 /// </summary>
 /// <param name="businessRoleDomain"></param>
 /// <returns></returns>
 public virtual bool UpdateBusinessRoleDomain(BusinessRoleDomain businessRoleDomain)
 {
     SecRoleEntity SecRoleEntity = new SecRoleEntity();
     SecRoleEntity = businessRoleDomain.SecRoleEntity;
     bool updateResult = Update(SecRoleEntity);
     return updateResult;
 }
Esempio n. 2
0
        public virtual SecRoleDomain CreateSecRoleDomain()
        {
            SecRoleEntity entity = new SecRoleEntity();
            entity.RoleId = Guid.NewGuid().ToString();

            return new SecRoleDomain(entity);
        }
Esempio n. 3
0
 /// <summary>
 /// 新增角色
 /// </summary>
 /// <param name="businessRoleDomain"></param>
 /// <returns></returns>
 public virtual bool InsertBusinessRoleDomain(BusinessRoleDomain businessRoleDomain)
 {
     SecRoleEntity SecRoleEntity = new SecRoleEntity();
     SecRoleEntity = businessRoleDomain.SecRoleEntity;
     bool insertResult = Insert(SecRoleEntity);
     return insertResult;
 }
Esempio n. 4
0
 /// <summary>
 /// 创建角色领域对象,初始化
 /// </summary>
 /// <returns></returns>
 public virtual BusinessRoleDomain CreateBusinessRoleDomain()
 {
     SecRoleEntity SecRoleEntity = new SecRoleEntity();
     SecRoleEntity.RoleId = Guid.NewGuid().ToString();
     SecRoleEntity.RoleName = string.Empty;
     SecRoleEntity.RoleType = string.Empty;
     SecRoleEntity.RoleCategory = 1;//角色种类,1表示业务角色
     SecRoleEntity.ParentId = string.Empty;
     SecRoleEntity.Remark = string.Empty;
     SecRoleEntity.LastModifiedBy = string.Empty;
     SecRoleEntity.LastModifiedTime = DateTime.Now;
     return new BusinessRoleDomain(SecRoleEntity);
 }
Esempio n. 5
0
 /// <summary>
 /// 创建领域对象
 /// </summary>
 /// <returns></returns>
 public virtual FunctionRoleDomain CreateFunctionRoleDomain()
 {
     SecRoleEntity roleEty = new SecRoleEntity();
     roleEty.RoleId = Guid.NewGuid().ToString();
     roleEty.RoleName = string.Empty;
     roleEty.RoleType = string.Empty;
     roleEty.RoleCategory = 0;
     roleEty.ParentId = string.Empty;
     roleEty.Remark = string.Empty;
     roleEty.LastModifiedBy = string.Empty;
     roleEty.LastModifiedTime = DateTime.Now;
     return new FunctionRoleDomain(roleEty);
 }
Esempio n. 6
0
        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="roleCityEntity"></param>
        public RoleDomain(SecRoleEntity SecRoleEntity)
            : base(SecRoleEntity)
        {

        }
Esempio n. 7
0
        ///// <summary>
        ///// 该角色拥有权限的菜单数据项
        ///// </summary>
        //private List<MenuDataItem> menuDataItem;
        //public List<MenuDataItem> MenuDataItem
        //{
        //    get 
        //    {
        //        if (menuDataItem == null)
        //        {
        //            menuDataItem = SystemService.FunctionRoleService.GetMenuDataItemByRoleId(SecRoleEntity.RoleId);
        //        }
        //        return menuDataItem;
        //    }
        //    set 
        //    {
        //        menuDataItem = value;
        //    }
        //}
        #endregion

        #region 方法

        /// <summary>
        ///   构造函数
        /// </summary>
        /// <param name="SecRoleEntity"></param>
        public FunctionRoleDomain(SecRoleEntity SecRoleEntity)
            : base(SecRoleEntity)
        {

        }
Esempio n. 8
0
 public virtual BusinessRoleDomain GetBusinessRoleDomainByRoleId(string roleId)
 {
     SecRoleEntity SecRoleEntity = new SecRoleEntity();
     SecRoleEntity = GetById<SecRoleEntity>(roleId);
     return new BusinessRoleDomain(SecRoleEntity);
 }
Esempio n. 9
0
 //public virtual List<BusinessRoleDomain> GetGetBusinessRoleDomainListByProjectID(string brandID)
 //{
 //    List<MstRoleBrandEntity> buss=new List<MstRoleBrandEntity>();
 //    List<BusinessRoleDomain> br=new List<BusinessRoleDomain>();
 //    buss = SelectByCondition<MstRoleBrandEntity>(BPSC.Common.Utils.QueryCondition.Create().Equals(MstRoleBrandTable.C_BRAND_ID, brandID));
 //    foreach (MstRoleBrandEntity rb in buss)
 //    {   SecRoleEntity rety=new SecRoleEntity();
 //        rety = SystemService.BusinessionRoleService.GetById<SecRoleEntity>(rb.RoleId);
 //        BusinessRoleDomain brd= new BusinessRoleDomain(rety);
 //        br.Add(brd);
 //    }
 //    return br;
 //} 
 /// <summary>
 /// 
 /// </summary>
 /// <param name="RoleIDList1"></param>
 /// <param name="RoleList2"></param>
 /// <returns></returns>
 public virtual BusinessRoleDomain GetBusinessRoleDomain(List<BusinessRoleDomain> RoleIDList1, List<BusinessRoleDomain> RoleList2)
 {
     bool brk = false;
  
     SecRoleEntity rety = new SecRoleEntity();
     foreach (BusinessRoleDomain roleID1 in RoleIDList1)
     {
         foreach (BusinessRoleDomain roleID2 in RoleList2)
         {
             if (roleID1.SecRoleEntity.RoleId == roleID2.SecRoleEntity.RoleId)
             {
                rety = GetById<SecRoleEntity>(roleID1.SecRoleEntity.RoleId );
                 brk = true;
                 break;
             }
         }
         if (brk)
         {
             break;
         }
     }
     if (brk)
     {
         return new BusinessRoleDomain(rety);
     }
     return null; 
 }
Esempio n. 10
0
       //protected virtual List<MstRoleCityEntity> GetBusinessRoleCityDomainByRoleId(string roleId)
       //{
       //    BPSC.Common.Utils.QueryCondition qCondition = BPSC.Common.Utils.QueryCondition.Create().Equals(MstRoleCityTable.C_ROLE_ID, roleId);
       //    return SelectByCondition<MstRoleCityEntity>(qCondition);
       //}

       //protected virtual List<MstRoleStoreEntity> GetBusinessRoleStoreDomainByRoleId(string roleId)
       //{
       //    BPSC.Common.Utils.QueryCondition qCondition = BPSC.Common.Utils.QueryCondition.Create().Equals(MstRoleStoreTable.C_ROLE_ID, roleId);
       //    return SelectByCondition<MstRoleStoreEntity>(qCondition);
       //}

       //protected virtual List<MstRoleBrandEntity> GetBusinessRoleBrandDomainByRoleId(string roleId)
       //{
       //    BPSC.Common.Utils.QueryCondition qCondition = BPSC.Common.Utils.QueryCondition.Create().Equals(MstRoleBrandTable.C_ROLE_ID, roleId);
       //    return SelectByCondition<MstRoleBrandEntity>(qCondition);
       //}

       //protected virtual List<MstRoleBannerEntity> GetBusinessRoleBannerDomainByRoleId(string roleId)
       //{
       //    BPSC.Common.Utils.QueryCondition qCondition = BPSC.Common.Utils.QueryCondition.Create().Equals(MstRoleBannerTable.C_ROLE_ID, roleId);
       //    return SelectByCondition<MstRoleBannerEntity>(qCondition);
       //}

       /// <summary>
       /// 根据roleName获取BusinessRoleDomain
       /// </summary>
       /// <param name="roleName"></param>
       /// <returns></returns>
       public virtual BusinessRoleDomain GetBusinessRoleDomainByRoleName(string roleName)
       {
           SecRoleEntity SecRoleEntity = new SecRoleEntity();
           SecRoleEntity.RoleName = roleName;
           SecRoleEntity = DataAccess.SelectSingle<SecRoleEntity>(SecRoleEntity);
           if (SecRoleEntity == null)
           {
               return null;
           }
           else
           {
              return new BusinessRoleDomain(SecRoleEntity);
           }
       }
Esempio n. 11
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="SecRoleEntity"></param>
 public BusinessRoleDomain(SecRoleEntity SecRoleEntity)
     : base(SecRoleEntity)
 { }
Esempio n. 12
0
 public SecRoleDomain(SecRoleEntity entity)
     : base(entity)
 {
     masterEntity = entity;
 }
Esempio n. 13
0
 public virtual void UpdateSecRoleEntity(SecRoleEntity entity, DataAccessBroker broker)
 {
     DataAccess.Update(entity, broker);
 }
Esempio n. 14
0
 public virtual void InsertSecRoleEntity(SecRoleEntity entity, DataAccessBroker broker)
 {
     DataAccess.Insert(entity, broker);
 }