Exemplo n.º 1
0
        // GET: Promo
        public ActionResult Index(string controllerName)
        {
            PromoSettingsVM settingsVM = new PromoSettingsVM();

            settingsVM.SetDefault();

            return(View(settingsVM));
        }
Exemplo n.º 2
0
        public ActionResult Index(PromoSettingsVM settingsVM)
        {
            if (ModelState.IsValid)
            {
                settingsVM.Save();
            }
            else
            {
                ModelState.AddModelError("", "Error settings");
            }

            return(View(settingsVM));
        }