예제 #1
0
        public void OnAddAccount(object param)
        {
            AccountInfo   acctInfo = new AccountInfo();
            AddAccountDlg dlg      = new AddAccountDlg(acctInfo);

            if (GetOwner != null)
            {
                dlg.Owner = GetOwner();
            }
            bool?ret = dlg.ShowDialog();

            if (ret.HasValue && ret.Value)
            {
                AccountMgr.Add(acctInfo);
            }
        }
예제 #2
0
        public bool RegisterUser([FromBody] Account account)
        {
            bool success = false;

            var userAccount = new Account
            {
                UserName = account.UserName,
                Password = account.Password
            };

            var accountMgr = new AccountMgr(userAccount, _cache);


            success = accountMgr.Add();


            return(success);
        }