public ActionResult Update(CEvent myEvent, HttpPostedFileBase image)
        {
            //have IEvent then determine whether or not event is recurring
            //add the times of the the event to the date
            myEvent.start = myEvent.EventDate + myEvent.StartTime;
            myEvent.end   = myEvent.EventDate + myEvent.EndTime;

            if (!ModelState.IsValid)
            {
                return(PartialView("_EventDialogue", myEvent));
            }
            else
            {
                //if (image != null)
                //{
                //photo.ImageMimeType = image.ContentType;
                //photo.PhotoFile = new byte[image.ContentLength];
                //image.InputStream.Read(photo.PhotoFile, 0, image.ContentLength);
                //}
                //
                CEvent original = context.FindEventById(myEvent.id);
                if (original != null)
                {
                    //context.Entry(original).CurrentValues.SetValues(myEvent);
                    context.Update(original, myEvent);
                    context.SaveChanges();
                }
                var redirectUrl = new UrlHelper(Request.RequestContext).Action("ManageEvents", "Home");
                return(Json(new { Url = redirectUrl }));
            }
        }