//PRIVATE METHODS

        /* private CreateEmailBody()
         {
            

         }*/

        /////////MAIN PUBLIC EXPOSED METHODS



        //takes a type, creates an Event
        public Event CreateEmailEvent(EventType eventType/*EmailTypeToCreate*/)
        {
            var theEvent = new Event
            {



            };

            return theEvent;
        }
        //passes back a fully formed document
        public Event CreateDocumentEvent(EventType eventType, List<IEventCommand> commandsToRun)
        {
            //new it up and add the commands
            var theEvent = new Event
            {



            };

            return theEvent;
        }
        public ActionResult Create(EventType eventtype)
        {
            if (ModelState.IsValid)
            {
                db.EventTypes.Add(eventtype);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.EventSchemeTypeID = new SelectList(db.EventSchemeTypes, "EventSchemeTypeID", "EventSchemeTypeName", eventtype.EventSchemeTypeID);
            ViewBag.EventSubTypeID = new SelectList(db.EventSubTypes, "EventSubTypeID", "EventSubTypeName", eventtype.EventSubTypeID);
            return View(eventtype);
        }
        //NOT PROCESS TYPE SPECIFIC!!
        public Event CreateEvent(EventType type)
        {
              //set up standard filds
            Event eve = new Event
            {
                WhenCreated = DateTime.Now,
                EventTypeID =  type.EventTypeID,
            };


        
            return eve;

        }
 public ActionResult Edit(EventType eventtype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(eventtype).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.EventSchemeTypeID = new SelectList(db.EventSchemeTypes, "EventSchemeTypeID", "EventSchemeTypeName", eventtype.EventSchemeTypeID);
     ViewBag.EventSubTypeID = new SelectList(db.EventSubTypes, "EventSubTypeID", "EventSubTypeName", eventtype.EventSubTypeID);
     return View(eventtype);
 }