Example #1
0
        protected void Transfer_OnClick(object sender, EventArgs e)
        {
            // IPropertyOwner target = ThisUser.FindBankAccount(BankAccount.SelectedValue);
            IPropertyOwner thisAccount = ThisUser.FindBankAccount(BankAccount.SelectedValue);

            try
            {
                IPropertyOwner target = ThisUser.FindBankAccount(TransferTarget.SelectedValue) ?? Module.User.FindUser(TransferTarget.SelectedValue) as IPropertyOwner;
                thisAccount.Transfer <IPropertyOwner>(target, float.Parse(TransferMoney.Text));
                UpdateView(false);
            }
            catch (Exception exception)
            {
                Response.Write("<script>alert('" + exception.Message + "')</script>");
            }
        }