public async Task <IActionResult> Edit(Guid id, [Bind("Id,period,higilevel,lowlevel,usercreate,CreateAt,UploadAt")] MstRsi mstRsi) { if (id != mstRsi.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(mstRsi); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MstRsiExists(mstRsi.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(mstRsi)); }
public async Task <IActionResult> Create([Bind("Id,period,higilevel,lowlevel,usercreate,CreateAt,UploadAt")] MstRsi mstRsi) { if (ModelState.IsValid) { mstRsi.Id = Guid.NewGuid(); _context.Add(mstRsi); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(mstRsi)); }