/// <summary> /// ÐÞ¸Ä /// </summary> public void ExecutEvent(object source, EventArgs e) { if (!new EmployeeValidater(_ItsView).Validation()) { return; } _ItsView.ResultMessage = string.Empty; Account account = new EmployeeDataCollector(_ItsView).AccountDataCollect(); account.Id = _ItsView.EmployeeID; try { if (!CompanyConfig.HasHrmisSystem) { BllInstance.AccountBllInstance.UpdateAccount(account, LoginUser); GoToListPage(); return; } using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required)) { BllInstance.AccountBllInstance.UpdateAccount(account, LoginUser); IEmployeeFacade hrmisEmployeeFacade = new EmployeeFacade(); Employee currEmployee = hrmisEmployeeFacade.GetEmployeeByAccountID(account.Id); if (currEmployee != null) { hrmisEmployeeFacade.UpdateEmployeeProxy(currEmployee, LoginUser); } else if (account.IsHRAccount) { hrmisEmployeeFacade.InitEmployeeProxy(account.Id, LoginUser); } ts.Complete(); } GoToListPage(); } catch (Exception ex) { _ItsView.ResultMessage = //" <img src='../../image/icon03.jpg' align='absmiddle'' /> <span class='fontred'>" + ex.Message;// +"</span>"; } }