public ActionResult Create(EventCreateForm collection) { try { // TODO: Add insert logic here if (ModelState.IsValid) { EventService repo = new EventService(); Event e = repo.Insert(new Event( collection.Name, collection.Description, collection.City, collection.Street, collection.Number, collection.NumberBox, collection.ZipCode, collection.Country, collection.StartDate, collection.EndDate, collection.FullDay, (int)UserSession.CurrentUser.Id)); return(RedirectToAction("Index")); } return(View(collection)); } catch { return(View(collection)); } }
public MenuItemForm(string text, bool checkOnClick, EventCreateForm createForm, Form parentForm) { CreateMenuItem(text, checkOnClick); gCreateForm = createForm; gParentForm = parentForm; }