예제 #1
0
        public bool DeleteAccount(AccountDto acc)
        {
            AccountPresenter accPresenter = new AccountPresenter();

            if (accPresenter.DeleteAccount(acc) != null)
            {
                AccountBindingList.Remove(acc);
                return(true);
            }
            return(false);
        }
예제 #2
0
        public bool AddAccount(AccountDto acc, UserDto user)
        {
            AccountPresenter accPresenter = new AccountPresenter();

            if (accPresenter.CreateAccount(acc, user) != null)
            {
                AccountBindingList.Add(acc);
                return(true);
            }
            return(false);
        }
예제 #3
0
        public bool ChangePassword(string prevPass, string newPass, string userName, AccountDto currentAccount)
        {
            AccountPresenter accPresenter = new AccountPresenter();
            var result = accPresenter.ChangePassword(userName, newPass, prevPass);

            if (result != null)
            {
                currentAccount.PassChangeDate = result.PassChangeDate;
                AccountBindingList.ResetBindings();
                return(true);
            }
            return(false);
        }
예제 #4
0
        public bool UpdateAccount(AccountDto acc)
        {
            AccountPresenter accPresenter = new AccountPresenter();

            if (accPresenter.UpdateAccount(acc) != null)
            {
                AccountBindingList.ResetBindings();

                acc.ApplicationDomainDtoList.RemoveAll(it => it.State == Framework.Common.CommonBase.DtoObjectState.Deleted);
                return(true);
            }
            return(false);
        }