Пример #1
0
        public void InitView(bool isPostBack)
        {
            IsPostBack = isPostBack;
            AssignHrmisAuthPresenter assignAuthPresenter = new AssignHrmisAuthPresenter(_IAssignAuthInfoView.AssignHrmisAuthView);

            assignAuthPresenter.InitPresenter(IsPostBack);
            DepartmentTreePresenter departmentTreePresenter = new DepartmentTreePresenter(_IAssignAuthInfoView.DepartmentTreeView, "0");

            departmentTreePresenter.InitDepartmentTree();
            departmentTreePresenter.AttachViewEvent();
            AttachViewEvent();
        }
Пример #2
0
        private void ShowView(string backAccountsIDAndAuthID)
        {
            backAccountsIDAndAuthID = AccountID + "|" + backAccountsIDAndAuthID;
            AssignHrmisAuthPresenter assignAuthPresenter = new AssignHrmisAuthPresenter(_IAssignAuthInfoView.AssignHrmisAuthView);

            assignAuthPresenter.InitPresenter(IsPostBack);
            _IAssignAuthInfoView.AssignHrmisAuthView.btnLinkClick += ShowView;

            DepartmentTreePresenter departmentTreePresenter = new DepartmentTreePresenter(_IAssignAuthInfoView.DepartmentTreeView, backAccountsIDAndAuthID);

            departmentTreePresenter.InitDepartmentTree();
            _IAssignAuthInfoView.AssignAuthDepartmentTreeVisible = true;
        }
Пример #3
0
        private void ExecuteEvent(object sender, EventArgs e)
        {
            if (Validation())
            {
                Account accountsBack = new Account(AccountID, "", "");
                accountsBack.Auths = new List <Auth>();
                accountsBack.Auths =
                    MergeAuthList(_IAssignAuthInfoView.AssignHrmisAuthView.AccountsBackAuth,
                                  _IAssignAuthInfoView.DepartmentTreeView.AuthSource);

                try
                {
                    _IAccountAuthFacade.SetAccountAuths(accountsBack.Auths, accountsBack, LoginUser);
                    _IAssignAuthInfoView.AssignHrmisAuthView.ResultMessage = "您已成功分配权限";
                }
                catch (Exception ex)
                {
                    _IAssignAuthInfoView.AssignHrmisAuthView.ResultMessage = ex.Message;
                }
            }
            AssignHrmisAuthPresenter assignAuthPresenter = new AssignHrmisAuthPresenter(_IAssignAuthInfoView.AssignHrmisAuthView);

            assignAuthPresenter.InitPresenter(IsPostBack);
        }