protected override void Validation() { //判断帐套参数是否为空 if (_AccountSet == null) { BllUtility.ThrowException(BllExceptionConst._EmployeeAccountSet_AccountSet_IsNull); } //判断数据库中装套是否存在 else if (_DalAccountSet.GetWholeAccountSetByPKID(_AccountSet.AccountSetID) == null) { BllUtility.ThrowException(BllExceptionConst._EmployeeAccountSet_AccountSet_NotExist); } //判断数据库中是否存在 EmployeeSalaryHistory history = _DalEmployeeSalary.GetEmployeeSalaryHistoryByPKID(_EmployeeSalaryID); if (history == null) { BllUtility.ThrowException(BllExceptionConst._Employee_Salary_NotExist); } //判断流程是否正在封帐阶段 else if (history.EmployeeSalaryStatus != EmployeeSalaryStatusEnum.AccountClosed) { BllUtility.ThrowException(BllExceptionConst._Employee_Salary_Not_Closed); } }
protected override void Validation() { //判断帐套参数是否为空 if (_AccountSet != null && _AccountSet.AccountSetID != 0) { //判断数据库中装套是否存在 if (_DalAccountSet.GetWholeAccountSetByPKID(_AccountSet.AccountSetID) == null) { BllUtility.ThrowException(BllExceptionConst._EmployeeAccountSet_AccountSet_NotExist); } } //判断数据库是否存在记录 EmployeeSalaryHistory history = _DalEmployeeSalary.GetEmployeeSalaryHistoryByPKID(_EmployeeSalaryID); if (history == null) { BllUtility.ThrowException(BllExceptionConst._Employee_Salary_NotExist); } else if (history.EmployeeSalaryStatus == EmployeeSalaryStatusEnum.AccountClosed) { BllUtility.ThrowException(BllExceptionConst._Employee_Salary_Closed); } }
/// <summary> /// 根据员工ID获取工资历史 /// </summary> /// <param name="pkid"></param> /// <returns></returns> public EmployeeSalaryHistory GetEmployeeSalaryHistoryByPKID(int pkid) { return(_DalEmployeeSalary.GetEmployeeSalaryHistoryByPKID(pkid)); }