Exemple #1
0
        public ActionResult EditEnvironmentColors(FormCollection collection)
        {
            var colors = new Dictionary <string, string>();

            for (var i = 0; i < collection.Count; i++)
            {
                var key   = collection.GetKey(i);
                var value = collection.ToValueProvider().GetValue(key);
                colors.Add(key, value.AttemptedValue.Replace("#", ""));
            }

            _initiativeBusiness.UpdateEnvironmentColors(User.Identity.GetUserId(), colors);


            return(RedirectToAction("Index", "Manage"));
        }