public async Task <IActionResult> OnPostAsync(int?FPid) { if (!ModelState.IsValid) { return(Page()); } if (FPid == null) { return(NotFound()); } else { FPEdit.ForecastTimeUTC1 = FPEdit.StartingTimeUTC.AddHours((double)FPEdit.ForecastTime1); FPEdit.ForecastTimeUTC2 = FPEdit.StartingTimeUTC.AddHours((double)FPEdit.ForecastTime2); FPEdit.ForecastTimeUTC3 = FPEdit.StartingTimeUTC.AddHours((double)FPEdit.ForecastTime3); FPEdit.ForecastTimeUTC4 = FPEdit.StartingTimeUTC.AddHours((double)FPEdit.ForecastTime4); FPEdit.ForecastTimeUTC5 = FPEdit.StartingTimeUTC.AddHours((double)FPEdit.ForecastTime5); //------------------------------------------- // Change the VerFor and For associated with this ForPer??? //------------------------------------------- _context.Attach(FPEdit).State = EntityState.Modified; } await _context.SaveChangesAsync(); return(RedirectToPage("Scheduling")); }
public async Task <IActionResult> OnPostAsync(int?ForID) { if (!ModelState.IsValid) { return(Page()); } if (ForID == null) { return(NotFound()); } else { _context.Attach(CurrentForecast).State = EntityState.Modified; } await _context.SaveChangesAsync(); return(RedirectToPage("Forecasts")); }
public async Task <IActionResult> OnPostAsync(int?VFid) { if (!ModelState.IsValid) { return(Page()); } if (VFid == null) { return(NotFound()); } else { _context.Attach(VFEdit).State = EntityState.Modified; } await _context.SaveChangesAsync(); return(RedirectToPage("Verifications")); }