public async Task <IActionResult> Edit(int id, [Bind("Id,Bid,EstProdPlan,TotalCosttoDate,ActualMtl,EstimatedDesingCost,ActuLaborPro,EstLaborProdCost,ActuLaborDesingCost,EstLaborDesingCost,ProjectID")] ProductionStageReport productionStageReport) { if (id != productionStageReport.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(productionStageReport); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProductionStageReportExists(productionStageReport.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["ProjectID"] = new SelectList(_context.Projects, "ID", "Name", productionStageReport.ProjectID); return(View(productionStageReport)); }
public async Task <IActionResult> Create([Bind("Id,Bid,EstProdPlan,TotalCosttoDate,ActualMtl,EstimatedDesingCost,ActuLaborPro,EstLaborProdCost,ActuLaborDesingCost,EstLaborDesingCost,ProjectID")] ProductionStageReport productionStageReport) { if (ModelState.IsValid) { _context.Add(productionStageReport); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ProjectID"] = new SelectList(_context.Projects, "ID", "Name", productionStageReport.ProjectID); return(View(productionStageReport)); }
public async Task <IActionResult> Create([Bind("ID,Cost,EstCost,TotalCost,Mtl,EstMtl,LabourProdCost,EstLabourProdCost,DesignCost,EstDesignCost,ProjectID")] ProductionStageReport productionStageReport) { if (ModelState.IsValid) { _context.Add(productionStageReport); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ProjectID"] = new SelectList(_context.Projects, "ID", "Name", productionStageReport.ProjectID); return(View(productionStageReport)); }