private void ExecuteEvent(object sender, EventArgs e) { if (Validation()) { Account accountsBack = new Account(AccountID, "", ""); accountsBack.Auths = new List <Auth>(); accountsBack.Auths = MergeAuthList(_IAssignAuthInfoView.AssignAuthView.AccountsBackAuth, _IAssignAuthInfoView.DepartmentTreeView.AuthSource); try { _IAuthBll.SetAccountAuths(accountsBack.Auths, accountsBack, LoginUser); _IAssignAuthInfoView.AssignAuthView.ResultMessage = "您已成功分配权限"; } catch (Exception ex) { _IAssignAuthInfoView.AssignAuthView.ResultMessage = ex.Message; } } AssignAuthPresenter assignAuthPresenter = new AssignAuthPresenter(_IAssignAuthInfoView.AssignAuthView, LoginUser); assignAuthPresenter.Initialize(IsPostBack); }
public void InitView(bool isPostBack) { IsPostBack = isPostBack; AssignAuthPresenter assignAuthPresenter = new AssignAuthPresenter(_IAssignAuthInfoView.AssignAuthView, LoginUser); assignAuthPresenter.Initialize(IsPostBack); DepartmentTreePresenter departmentTreePresenter = new DepartmentTreePresenter(_IAssignAuthInfoView.DepartmentTreeView, "0"); departmentTreePresenter.InitDepartmentTree(); departmentTreePresenter.AttachViewEvent(); AttachViewEvent(); }
private void ShowView(string backAccountsIDAndAuthID1) { AssignAuthPresenter assignAuthPresenter = new AssignAuthPresenter(_IAssignAuthInfoView.AssignAuthView, LoginUser); assignAuthPresenter.Initialize(IsPostBack); _IAssignAuthInfoView.AssignAuthView.btnLinkClick += ShowView; string backAccountsIDAndAuthID = AccountID + "|" + backAccountsIDAndAuthID1; DepartmentTreePresenter departmentTreePresenter = new DepartmentTreePresenter(_IAssignAuthInfoView.DepartmentTreeView, backAccountsIDAndAuthID); departmentTreePresenter.InitDepartmentTree(); _IAssignAuthInfoView.AssignAuthDepartmentTreeVisible = true; }