Ejemplo n.º 1
0
        public virtual SecRolePermissionDomain CreateSecRolePermissionDomain()
        {
            SecRolePermissionEntity entity = new SecRolePermissionEntity();
            entity.RoleId = Guid.NewGuid().ToString();

            return new SecRolePermissionDomain(entity);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="SecRolePermissionEntity">角色控件关联</param>
 public RolePermissionDomain(SecRolePermissionEntity SecRolePermissionEntity)
     : base(SecRolePermissionEntity)
 {
 }
Ejemplo n.º 3
0
 public SecRolePermissionDomain(SecRolePermissionEntity entity)
     : base(entity)
 {
     masterEntity = entity;
 }
Ejemplo n.º 4
0
 public virtual void UpdateSecRolePermissionEntity(SecRolePermissionEntity entity, DataAccessBroker broker)
 {
     DataAccess.Update(entity, broker);
 }
Ejemplo n.º 5
0
 public virtual void InsertSecRolePermissionEntity(SecRolePermissionEntity entity, DataAccessBroker broker)
 {
     DataAccess.Insert(entity, broker);
 }
Ejemplo n.º 6
0
        /// <summary>
        /// 保存角色控件权限
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            List<SecRolePermissionEntity> deleteList = new List<SecRolePermissionEntity>();
            List<SecRolePermissionEntity> insertList = new List<SecRolePermissionEntity>();
            for (int i = 0; i < dexGrid.Rows.Count; i++)
            {
                SecRolePermissionEntity r = new SecRolePermissionEntity();
                r.PermissionId = dexGrid.DataKeys[i].Values[SecRolePermissionTable.C_PERMISSION_ID].ToString();
                r.RoleId = RoleID;
                deleteList.Add(r);
            }

            foreach (string id in dexGrid.GetCheckedRows(0))
            {
                SecRolePermissionEntity r = new SecRolePermissionEntity();
                r.PermissionId = id;
                r.RoleId = RoleID;
                r.LastModifiedBy = CurrentUser.SecUserEntity.UserId;
                r.LastModifiedTime = DateTime.Now;
                insertList.Add(r);
            }
            if (SystemService.RolePermissionService.DeleteInsert<SecRolePermissionEntity>(deleteList, insertList))
            {
                base.AlertMessage(GetMessage("MESSAGE_SUCCESS"));
            }
            else
            {
                base.AlertMessage(GetMessage("MESSAGE_FAILURE"));
            }
        }