Esempio n. 1
0
        public ActionResult AddDeal(AddDealViewModel model)
        {
            if (ModelState.IsValid)
            {
                if (model.HasAllAreas)
                {
                    Deal.SaveDealAllAreas(model);
                }
                else
                {
                    Deal.SaveDeal(model);
                }

                return(RedirectToAction("DisplayDeals"));
            }
            var failmodel = Deal.FillDealModel();

            return(View(failmodel));
        }