Пример #1
0
        public ActionResult Settings(PersonSettings Settings)
        {
            if (Settings.ListLines > 100) Settings.ListLines = 100;
            if (Settings.ListLines < 10) Settings.ListLines = 10;

            Person CU = reposetory.GetPerson(Settings.PersonID);
            CU.ListLines = Settings.ListLines;
            CU.CurrentAssociation = Settings.CurrentAssociation;
            CU.EmailNewsLetter = Settings.EmailNewsLetter;
            CU.PrintNewslettet = Settings.PrintNewslettet;

            if (!reposetory.SavePerson(CU)) ModelState.AddModelError("", General.ErrorSave);

            return View(Settings);
        }
Пример #2
0
        public ActionResult Settings()
        {
            PersonSettings Settings = new PersonSettings
            {
                ListLines = CurrentProfile.ListLines,
                EmailNewsLetter = CurrentProfile.EmailNewsLetter,
                PrintNewslettet = CurrentProfile.PrintNewslettet,
                //Associations = CurrentProfile.Person.Associations == null ? null : CurrentProfile.Person.Associations.ToList()
            };

            return View(Settings);
        }