Esempio n. 1
0
 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));
     }
 }
Esempio n. 2
0
 public MenuItemForm(string text, bool checkOnClick, EventCreateForm createForm, Form parentForm)
 {
     CreateMenuItem(text, checkOnClick);
     gCreateForm = createForm;
     gParentForm = parentForm;
 }
Esempio n. 3
0
File: cf2.cs Progetto: 24/source_04
 public MenuItemForm(string text, bool checkOnClick, EventCreateForm createForm, Form parentForm)
 {
     CreateMenuItem(text, checkOnClick);
     gCreateForm = createForm;
     gParentForm = parentForm;
 }