public ActionResult Create([Bind(Prefix = "DesignReview")] DesignReview designReview)
        {
            if (ModelState.IsValid)
            {
                DesignReview newDesignReview = new DesignReview();
                newDesignReview.Id                = Guid.NewGuid();
                newDesignReview.Title             = designReview.Title;
                newDesignReview.Description       = designReview.Description;
                newDesignReview.SelectedComment   = designReview.SelectedComment;
                newDesignReview.AdditionalComment = designReview.AdditionalComment;
                newDesignReview.AcceptedDate      = designReview.AcceptedDate;
                newDesignReview.IsActive          = designReview.IsActive;
                newDesignReview.ProjectId         = designReview.ProjectId;

                UOW.DesignReviews.Add(newDesignReview);
                UOW.Commit();
                designReview = newDesignReview;
            }
            DesignReviewVM vm = new DesignReviewVM
            {
                DesignReview = designReview,
                Projects     = UOW.Projects.GetAll()
            };

            return(View("Edit", vm));
        }
        public ActionResult Edit([Bind(Prefix = "DesignReview")] DesignReview designReview)
        {
            DesignReview dbDesignReview = UOW.DesignReviews.GetById(designReview.Id);

            if (dbDesignReview != null)
            {
                dbDesignReview.Title             = designReview.Title;
                dbDesignReview.Description       = designReview.Description;
                dbDesignReview.SelectedComment   = designReview.SelectedComment;
                dbDesignReview.AdditionalComment = designReview.AdditionalComment;
                dbDesignReview.AcceptedDate      = designReview.AcceptedDate;
                dbDesignReview.IsActive          = designReview.IsActive;
                dbDesignReview.ProjectId         = designReview.ProjectId;

                UOW.Commit();
                designReview = dbDesignReview;
            }

            DesignReviewVM vm = new DesignReviewVM
            {
                DesignReview = designReview,
                Projects     = UOW.Projects.GetAll()
            };

            return(View(vm));
        }
        public ActionResult Create()
        {
            DesignReviewVM vm = new DesignReviewVM
            {
                Projects = UOW.Projects.GetAll()
            };

            return(View("Edit", vm));
        }
        public ActionResult Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DesignReview designReview = UOW.DesignReviews.GetById(id);

            if (designReview == null)
            {
                return(HttpNotFound());
            }
            DesignReviewVM vm = new DesignReviewVM
            {
                DesignReview = designReview
            };

            return(View(vm));
        }
        public ActionResult Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DesignReview designReview = UOW.DesignReviews.GetById(id);

            if (designReview == null)
            {
                return(HttpNotFound());
            }
            DesignReviewVM vm = new DesignReviewVM
            {
                DesignReview = designReview,
                Projects     = UOW.Projects.GetAll()
            };

            System.Diagnostics.Debug.WriteLine(vm);
            return(View(vm));
        }