Пример #1
0
        public static AccountEditorForm FromFund(Fund fund, Account account = null)
        {
            var form = new AccountEditorForm();

            if (fund != null)
            {
                form.ParentFund   = fund;
                form.ParentFundId = fund.Id;
            }

            if (account != null)
            {
                form.Account    = account;
                form.AccountId  = account.Id;
                form.Name       = account.Name;
                form.BankNumber = account.BankNumber;
                form.Comments   = account.Comments;
            }

            return(form);
        }
Пример #2
0
 public AddOrEditAccountCommand(AccountEditorForm editor, ModelStateDictionary modelState)
 {
     this.Editor     = editor;
     this.ModelState = modelState;
 }