Beispiel #1
0
        /// <summary>
        /// 新增后
        /// </summary>
        public override void AfterDynamicObjectInsert(dynamic fapDynamicData)
        {
            dynamic dynamicData = fapDynamicData;

            //同步其他系統,放入隊列
            this.DataSynchDynamicObject(dynamicData, RealtimeData.OPER_ADD);

            #region 新增的加到權限中
            try
            {
                if (_appDomain != null && _httpSession.AcSession != null && _httpSession.AcSession.OnlineUser != null)
                {
                    string roleid = _httpSession.AcSession.Role.Fid;

                    FapRoleDept model = new FapRoleDept()
                    {
                        DeptUid = dynamicData.Fid, RoleUid = roleid, Dr = 0, CreateBy = _httpSession.EmpUid, CreateName = _httpSession.EmpName, CreateDate = PublicUtils.CurrentDateTimeStr
                    };
                    _dbContext.Insert <FapRoleDept>(model, _dbSession);
                    _appDomain.OrgDeptSet.Refresh();
                    _appDomain.RoleDeptSet.Refresh();
                }
            }
            catch (Exception ex)
            {
                _logger.LogError($"表注入事件inserted{ex.Message}");
            }
            #endregion
        }
Beispiel #2
0
        public bool TryGetValue(string fid, out FapRoleDept roleColumn)
        {
            if (!_initialized)
            {
                Init();
            }
            var result = _allRoleDept.FirstOrDefault <FapRoleDept>(f => f.Fid == fid);

            if (result != null)
            {
                roleColumn = result;
                return(true);
            }
            roleColumn = null;
            return(false);
        }