Exemple #1
0
        private void RegisterNewAward()
        {
            AwardForm form = new AwardForm();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                awards.Add(form.Title, form.Description);
                DisplayAwards();
            }
        }
Exemple #2
0
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                awards.Add(new Award(collection["Title"], collection["Description"]));

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                awards.Add(new Award(collection["Титул"], collection["Описание"]));

                return(RedirectToAction("Список"));
            }
            catch
            {
                return(View());
            }
        }