コード例 #1
0
        /// <summary>
        /// 刪除員工身分
        /// </summary>
        public bool DeleteEmployeeRoleData(RoleParams param)
        {
            bool result = false;

            using (EmployeeAuthorityDataAccess empAuthDao = new EmployeeAuthorityDataAccess())
            {
                result   = empAuthDao.DeleteEmployeeRoleData(param.RoleId);
                dbErrMsg = empAuthDao.GetErrMsg();

                if (!result && empAuthDao.GetSqlErrNumber() == 50000 && empAuthDao.GetSqlErrState() == 2)
                {
                    param.IsThereAccountsOfRole = true;
                }
            }

            return(result);
        }