コード例 #1
0
ファイル: SaveLogic.cs プロジェクト: hieur8/web-mbec
        /// <summary>
        /// Check processing
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private void Check(SaveDataModel inputObject)
        {
            // Local variable declaration
            var adminUserEntryDao = new AdminUserEntryDao();

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

            // Check valid
            if (IsEdit && !adminUserEntryDao.IsExist(inputObject.UserCd))
                throw new DataNotExistException("Tài khoản");
        }
コード例 #2
0
ファイル: InitLogic.cs プロジェクト: hieur8/web-mbec
        /// <summary>
        /// Check processing
        /// </summary>
        /// <param name="inputObject">DataModel</param>
        /// <returns>DataModel</returns>
        private void Check(InitDataModel inputObject)
        {
            // Local variable declaration
            var adminUserEntryDao = new AdminUserEntryDao();

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

            // Check valid
            if (!IsAdd)
            {
                if (DataCheckHelper.IsNull(inputObject.UserCd))
                    throw new ExecuteException("E_MSG_DATA_00004", "Mã tài khoản");

                if (!adminUserEntryDao.IsExist(inputObject.UserCd))
                    throw new DataNotExistException("Tài khoản");
            }
        }