コード例 #1
0
        // GET: Customer/Create
        public ActionResult Create()
        {
            var model = new CustomerModel();
            var accountTypeService = new AccountTypeService();

            model.AccountTypeSelectList = accountTypeService.GetSelectList();
            model.AccountDetails        = new Account();
            return(View(model));
        }
コード例 #2
0
        // GET: Account/Edit/5
        public ActionResult Edit(int id)
        {
            #region Account Type
            var accountTypeService = new AccountTypeService();
            #endregion

            #region Customer List
            var customerService = new CustomerService();

            #endregion

            var model = new AccountModel()
            {
                Account         = accountService.GetDetails(id),
                AccountTypeList = accountTypeService.GetSelectList(),
                CustomerList    = customerService.GetSelectList(),
            };

            return(View(model));
        }