示例#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));
     }
 }
示例#2
0
文件: cf2.cs 项目: labeuze/source
 public MenuItemForm(string text, bool checkOnClick, EventCreateForm createForm, Form parentForm)
 {
     CreateMenuItem(text, checkOnClick);
     gCreateForm = createForm;
     gParentForm = parentForm;
 }
示例#3
0
文件: cf2.cs 项目: 24/source_04
 public MenuItemForm(string text, bool checkOnClick, EventCreateForm createForm, Form parentForm)
 {
     CreateMenuItem(text, checkOnClick);
     gCreateForm = createForm;
     gParentForm = parentForm;
 }