Example #1
0
        public ActionResult Index(Notice model)
        {
            Notice viewModel = new Notice();

            if (ModelState.IsValid)
            {
                DateTime postingDate = DateTime.Now;
                if (meetingDateIsValid(postingDate, model.MeetingDate.Value))
                {
                    viewModel.InjectFrom(model);
                    viewModel.MeetingDateTime = viewModel.MeetingDate.Value + viewModel.MeetingTime.Value.TimeOfDay;
                    Success("Meeting date/time is valid.");
                }
                else
                {
                    Danger("The meeting date you have provided is not valid. NRS 241.020 requires that notices be posted not later than 9 a.m. of the third working day before the meeting is to be held, unless the public body is unable to do so because of technical problems relating to the operation or maintenance of this website.");
                }
            }
            return(View(viewModel));
        }