public async Task <IActionResult> Edit(long id, [Bind("TaskMasterId,TaskMasterWaterMarkColumn,TaskMasterWaterMarkColumnType,TaskMasterWaterMarkDateTime,TaskMasterWaterMarkBigInt,TaskWaterMarkJson,ActiveYn,UpdatedOn")] TaskMasterWaterMark taskMasterWaterMark) { if (id != taskMasterWaterMark.TaskMasterId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(taskMasterWaterMark); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TaskMasterWaterMarkExists(taskMasterWaterMark.TaskMasterId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(IndexDataTable))); } ViewData["TaskMasterId"] = new SelectList(_context.TaskMaster.OrderBy(x => x.TaskMasterName), "TaskMasterId", "TaskMasterName", taskMasterWaterMark.TaskMasterId); return(View(taskMasterWaterMark)); }
// GET: TaskMasterWaterMark/Create public IActionResult Create() { ViewData["TaskMasterId"] = new SelectList(_context.TaskMaster.OrderBy(x => x.TaskMasterName), "TaskMasterId", "TaskMasterName"); TaskMasterWaterMark taskMasterWaterMark = new TaskMasterWaterMark(); taskMasterWaterMark.ActiveYn = true; return(View(taskMasterWaterMark)); }
public async Task <IActionResult> Create([Bind("TaskMasterId,TaskMasterWaterMarkColumn,TaskMasterWaterMarkColumnType,TaskMasterWaterMarkDateTime,TaskMasterWaterMarkBigInt,TaskWaterMarkJson,ActiveYn,UpdatedOn")] TaskMasterWaterMark taskMasterWaterMark) { if (ModelState.IsValid) { _context.Add(taskMasterWaterMark); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(IndexDataTable))); } ViewData["TaskMasterId"] = new SelectList(_context.TaskMaster.OrderBy(x => x.TaskMasterName), "TaskMasterId", "TaskMasterName", taskMasterWaterMark.TaskMasterId); return(View(taskMasterWaterMark)); }