public ActionResult Edit(Committee committee, string Command, HttpPostedFileBase File)
        {
            if (File != null)
            {
                var committeeFile = new CommitteeFile();
                committeeFile.CommitteeId = committee.CommitteeId;
                committeeFile.PostedFile  = File;
                serverFileRepository.InsertOrUpdate(committeeFile, CurrentUser);
                serverFileRepository.Save();

                ViewBag.PossibleChairs = ViewBagPossibleChairs(PossibleChairs);
                return(Edit(committee.CommitteeId));
            }

            return(EditOrCreate(committee, Command));
        }
        private ActionResult CreateOrEdit(CommitteePost post, CommitteeEvent evt, HttpPostedFileBase File)
        {
            if (File != null)
            {
                var postFile = new PostFile();
                postFile.PostId     = post.PostId;
                postFile.PostedFile = File;
                serverFileRepository.InsertOrUpdate(postFile, CurrentUser);
                serverFileRepository.Save();

                return(Edit(post.PostId));
            }

            // Couldn't get the Location.LocationId key to work correctly with the hidden
            // field so just remove it from validation.
            ModelState.Remove("Location.LocationId");
            if (ModelState.IsValid)
            {
                if (evt.Location == null)
                {
                    return(Save(post));
                }
                else
                {
                    if (evt.ViewEndDate > evt.EventDate)
                    {
                        evt.EndDate = evt.ViewEndDate;
                    }

                    return(Save(evt));
                }
            }
            else
            {
                if (evt.Location == null)
                {
                    return(View(post));
                }
                else
                {
                    return(View(evt));
                }
            }
        }