protected override void ExcuteSelf() { //using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required)) //{ foreach (EmployeeSalary employeeSalary in _EmployeeSalaryList) { //employeeSalary.EmployeeSalaryHistoryList[0].Description = _Description; employeeSalary.EmployeeSalaryHistoryList[0].SalaryDateTime = _SalaryTime; employeeSalary.EmployeeSalaryHistoryList[0].EmployeeSalaryStatus = EmployeeSalaryStatusEnum.AccountClosed; employeeSalary.EmployeeSalaryHistoryList[0].AccountsBackName = _BackAccountsName; _DalEmployeeSalary.UpdateEmployeeSalaryHistory(employeeSalary.Employee.Account.Id, employeeSalary.EmployeeSalaryHistoryList[0]); if (_IsSendEmail) { //发送邮件 var mail = new SendEmployeeSalaryToEmployee(employeeSalary.Employee.Account.Id, employeeSalary.EmployeeSalaryHistoryList[0], _DalEmployeeSalary); mail.Excute(); string sendresultname = mail.MailFailName; if (!string.IsNullOrEmpty(sendresultname)) { if (!string.IsNullOrEmpty(_NameMessge)) { _NameMessge += ","; } _NameMessge += sendresultname; } } } // ts.Complete(); //} }
protected override void ExcuteSelf() { try { _DalEmployeeSalary.UpdateEmployeeSalaryHistory(_EmployeeID, MakeEmployeeSalary()); } catch { BllUtility.ThrowException(BllExceptionConst._DbError); } }
protected override void ExcuteSelf() { using (var ts = new TransactionScope(TransactionScopeOption.Required)) { foreach (EmployeeSalary employeeSalary in _EmployeeSalaryList) { //employeeSalary.EmployeeSalaryHistoryList[0].Description = _Description; employeeSalary.EmployeeSalaryHistoryList[0].SalaryDateTime = _SalaryTime; employeeSalary.EmployeeSalaryHistoryList[0].EmployeeSalaryStatus = EmployeeSalaryStatusEnum.AccountReopened; employeeSalary.EmployeeSalaryHistoryList[0].AccountsBackName = _BackAccountsName; _DalEmployeeSalary.UpdateEmployeeSalaryHistory(employeeSalary.Employee.Account.Id, employeeSalary.EmployeeSalaryHistoryList[0]); } ts.Complete(); } }
/// <summary> /// 更新薪资 /// </summary> protected override void ExcuteSelf() { EmployeeSalaryHistory salary = MakeEmployeeSalary(); EmployeeSalaryID = _DalEmployeeSalary.UpdateEmployeeSalaryHistory(_EmployeeID, salary); }