public ActionResult MspEveningEdit(MeetingMspEveningEdit meetingMspEveningEdit) { ModelState.Merge(meetingMspEveningEdit.Validate(Db)); if (ModelState.IsValid) { Meeting meeting = meetingMspEveningEdit.GetModel(UserId); bool success = MeetingCache.Update(Db, ref meeting); if (!success) { return RedirectToAccessDenied(); } return RedirectToAction("MspEveningIndex"); } PopulateMainLeaderId(UserId, meetingMspEveningEdit.MainLeaderId); PopulateSecondaryLeaderId(meetingMspEveningEdit.SecondaryLeaderId); PopulateSecondaryOrganizerId(meetingMspEveningEdit.MainLeaderId, meetingMspEveningEdit.SecondaryLeaderId, meetingMspEveningEdit.SecondaryOrganizerId); return View(meetingMspEveningEdit); }
public ActionResult MspEveningCreate(MeetingMspEveningEdit meetingMspEveningEdit) { ModelState.Merge(meetingMspEveningEdit.Validate(Db)); if (ModelState.IsValid) { MeetingCache.Insert(Db, MeetingType.MspEvening, UserId, meetingMspEveningEdit); return RedirectToAction("MspEveningIndex"); } PopulateMainLeaderId(meetingMspEveningEdit.OrganizerId.GetValueOrDefault(UserId)); PopulateSecondaryLeaderId(meetingMspEveningEdit.SecondaryLeaderId); return View(meetingMspEveningEdit); }