public ActionResult CreateHouseWithWizard(HouseWizardVM model)
        {
            var houseId = wizardHelper.ManageWizard(model);

            db.SaveChanges();
            return(RedirectToAction("Details", "Households", new { id = houseId }));
        }
Esempio n. 2
0
        /// <summary>
        /// Pass 'House Wizard' View Model and create the house, budget, and account associated with the form
        /// </summary>
        /// <param name="model">HouseWizardVM</param>
        /// <returns>houseId</returns>
        public int ManageWizard(HouseWizardVM model)
        {
            var houseId = CreateHouseAndGetId(model.CreateHouse);

            CreateAccount(model.CreateAccount, houseId);
            CreateBudget(model.CreateBudget, houseId);
            return(houseId);
        }
        //GET: CreateHouseWithWizard
        public ActionResult CreateHouseWithWizard()
        {
            var accountVM = new CreateAccountVM
            {
                BAccountType = accountHelper.GetAccountTypeSelectList()
            };
            var wizard = new HouseWizardVM
            {
                CreateAccount = accountVM
            };

            return(View(wizard));
        }