public async Task <IActionResult> Edit(int id, [Bind("CustomerInfoChartId,CustomerDayOfWeek,PickUpConfirm,CustomerPickUpCharge")] CustomerInfoChart customerInfoChart) { if (id != customerInfoChart.CustomerInfoChartId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(customerInfoChart); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CustomerInfoChartExists(customerInfoChart.CustomerInfoChartId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(customerInfoChart)); }
public async Task <IActionResult> Create([Bind("CustomerInfoChartId,CustomerDayOfWeek,PickUpConfirm,CustomerPickUpCharge")] CustomerInfoChart customerInfoChart) { if (ModelState.IsValid) { _context.Add(customerInfoChart); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customerInfoChart)); }