public ActionResult Create(MeetingTitleTypeEdit meetingTitleTypeEdit) { if (ModelState.IsValid) { MeetingTitleType meetingTitleType = meetingTitleTypeEdit.GetModel(); MeetingTitleTypeCache.Insert(Db, meetingTitleType); return RedirectToAction("Index"); } PopulateMeetingType(meetingTitleTypeEdit.MeetingType); return View(meetingTitleTypeEdit); }
public ActionResult Edit(MeetingTitleTypeEdit meetingTitleTypeEdit) { if (ModelState.IsValid) { MeetingTitleType meetingTitleType = meetingTitleTypeEdit.GetModel(); bool success = MeetingTitleTypeCache.Update(Db, ref meetingTitleType); if (!success) { return RedirectToAccessDenied(); } return RedirectToAction("Index"); } PopulateMeetingType(meetingTitleTypeEdit.MeetingType); return View(meetingTitleTypeEdit); }
public static MeetingTitleTypeEdit GetModelView(MeetingTitleType meetingTitleType) { if (meetingTitleType == null) return null; var meetingTitleTypeEdit = new MeetingTitleTypeEdit(meetingTitleType); return meetingTitleTypeEdit; }