Example #1
0
        /// <summary>
        /// Check processing
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private void Check(SaveDataModel inputObject)
        {
            // Local variable declaration
            var adminGroupRoleEntryDao = new AdminGroupRoleEntryDao();
            var mCodeCom = new MCodeCom();

            // Check role
            if (!PageHelper.AuthRole(Logics.RL_USERS))
            {
                throw new ExecuteException("E_MSG_00013");
            }

            // Exist group
            if (!adminGroupRoleEntryDao.IsExistGroup(inputObject.GroupCd))
            {
                throw new DataNotExistException("Nhóm");
            }

            // Check valid
            var dFlag = DataHelper.ToString(inputObject.DeleteFlag);

            if (!mCodeCom.IsExist(Logics.GROUP_DELETE_FLAG, dFlag, false))
            {
                throw new DataNotExistException("Dữ liệu");
            }
            if (adminGroupRoleEntryDao.IsExistGroupRole(inputObject.GroupCd, inputObject.RoleCd))
            {
                throw new DataExistException("Quyền");
            }
        }
Example #2
0
        /// <summary>
        /// Check processing
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private void Check(InitDataModel inputObject)
        {
            // Local variable declaration
            var adminGroupRoleEntryDao = new AdminGroupRoleEntryDao();

            // Check role
            if (!PageHelper.AuthRole(Logics.RL_USERS))
                throw new ExecuteException("E_MSG_00013");

            // Exist group
            if (!adminGroupRoleEntryDao.IsExistGroup(inputObject.GroupCd))
                throw new DataNotExistException("Nhóm");
        }
Example #3
0
        /// <summary>
        /// Check processing
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private void Check(InitDataModel inputObject)
        {
            // Local variable declaration
            var adminGroupRoleEntryDao = new AdminGroupRoleEntryDao();

            // Check role
            if (!PageHelper.AuthRole(Logics.RL_USERS))
            {
                throw new ExecuteException("E_MSG_00013");
            }

            // Exist group
            if (!adminGroupRoleEntryDao.IsExistGroup(inputObject.GroupCd))
            {
                throw new DataNotExistException("Nhóm");
            }
        }
Example #4
0
        /// <summary>
        /// Check processing
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private void Check(SaveDataModel inputObject)
        {
            // Local variable declaration
            var adminGroupRoleEntryDao = new AdminGroupRoleEntryDao();
            var mCodeCom = new MCodeCom();

            // Check role
            if (!PageHelper.AuthRole(Logics.RL_USERS))
                throw new ExecuteException("E_MSG_00013");

            // Exist group
            if (!adminGroupRoleEntryDao.IsExistGroup(inputObject.GroupCd))
                throw new DataNotExistException("Nhóm");

            // Check valid
            var dFlag = DataHelper.ToString(inputObject.DeleteFlag);

            if (!mCodeCom.IsExist(Logics.GROUP_DELETE_FLAG, dFlag, false))
                throw new DataNotExistException("Dữ liệu");
            if (adminGroupRoleEntryDao.IsExistGroupRole(inputObject.GroupCd, inputObject.RoleCd))
                throw new DataExistException("Quyền");
        }