public async Task <IActionResult> Edit(int id, [Bind("ID,EstimatedBid,ActualDesingHours,EstimatedDesingHours,ActualDesingCost,EstimatedDesingCost,Hours,Remaining,ProjectID")] BidStageReport bidStageReport) { if (id != bidStageReport.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(bidStageReport); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BidStageReportExists(bidStageReport.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["ProjectID"] = new SelectList(_context.Projects, "ID", "Name", bidStageReport.ProjectID); return(View(bidStageReport)); }
public async Task <IActionResult> Create([Bind("ID,EstimatedBid,ActualDesingHours,EstimatedDesingHours,ActualDesingCost,EstimatedDesingCost,Hours,Remaining,ProjectID")] BidStageReport bidStageReport) { if (ModelState.IsValid) { _context.Add(bidStageReport); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ProjectID"] = new SelectList(_context.Projects, "ID", "Name", bidStageReport.ProjectID); return(View(bidStageReport)); }