Exemplo n.º 1
0
        public async Task <ActionResult> PresentationTake(int?presentationID, int customerID, int contractorID)
        {
            if (presentationID == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Presentation presentation = await presentationRepository.FindByIdAsync(presentationID.Value);

            if (presentation == null)
            {
                return(HttpNotFound());
            }
            presentation.TakenForID = this.CurrentUserID;
            await presentationRepository.TakeToAudit(presentation);

            return(RedirectToAction("PresentationsIndex", "Requirements", new { requirementID = presentation.RequirementID, customerID = customerID, contractorID = contractorID }));
            //return RedirectToAction("Index");
        }