public ActionResult Create()
        {
            EventViewModel evm = new EventViewModel();

            evm.PopulateDropDowns(this.eventTasks.GetAllEventVerifiedStatuses());
            return(View(evm));
        }
        public ActionResult Edit(int id)
        {
            Event e = this.eventTasks.GetEvent(id);

            if (e != null)
            {
                EventViewModel evm = new EventViewModel();
                Mapper.Map <Event, EventViewModel>(e, evm);
                evm.ViolationIds = string.Join(",", (from v in e.Violations select v.Id).ToList <int>());
                evm.LocationId   = e.Location.Id;
                evm.LocationText = e.Location.ToString();
                evm.JhroCaseIds  = string.Join(",", e.JhroCases.Select(x => x.Id.ToString()));
                evm.TagIds       = string.Join(",", (from t in e.Tags select t.Id).ToList <int>());
                evm.PopulateDropDowns(this.eventTasks.GetAllEventVerifiedStatuses());
                return(View(evm));
            }
            else
            {
                return(new HttpNotFoundResult());
            }
        }