// 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)); }
// 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)); }