public async Task <IActionResult> Edit(int id, [Bind("MeasId,Label,PspTable,PspValCol,PspTimeCol,EntityCol,EntityVal,SqlStr,QueryParams,QueryParamVals")] PspMeasurement pspMeasurement) { if (id != pspMeasurement.MeasId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(pspMeasurement); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PspMeasurementExists(pspMeasurement.MeasId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(pspMeasurement)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,IsSuccessful,CheckProcessStartTime,CheckProcessEndTime,Remarks,LabelCheckId")] LabelCheckResult labelCheckResult) { if (id != labelCheckResult.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(labelCheckResult); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LabelCheckResultExists(labelCheckResult.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["LabelCheckId"] = new SelectList(_context.LabelChecks, "Id", "CheckType", labelCheckResult.LabelCheckId); return(View(labelCheckResult)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,CheckType,Num1,Num2,ConsiderStartTime,ConsiderEndTime,PspMeasurementId")] LabelCheck labelCheck) { if (id != labelCheck.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(labelCheck); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LabelCheckExists(labelCheck.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["PspMeasurementId"] = new SelectList(_context.PspDbMeasurements, "MeasId", "Label", labelCheck.PspMeasurementId); return(View(labelCheck)); }