public async Task <IActionResult> Edit(int id, [Bind("TaskTypeMappingId,TaskTypeId,MappingType,MappingName,SourceSystemType,SourceType,TargetSystemType,TargetType,TaskDatafactoryIr,TaskTypeJson,ActiveYn,TaskMasterJsonSchema,TaskInstanceJsonSchema")] TaskTypeMapping taskTypeMapping) { if (id != taskTypeMapping.TaskTypeMappingId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(taskTypeMapping); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TaskTypeMappingExists(taskTypeMapping.TaskTypeMappingId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(IndexDataTable))); } ViewData["TaskTypeId"] = new SelectList(_context.TaskType.OrderBy(x => x.TaskTypeName), "TaskTypeId", "TaskTypeName", taskTypeMapping.TaskTypeId); return(View(taskTypeMapping)); }
// GET: TaskTypeMapping/Create public IActionResult Create() { ViewData["TaskTypeId"] = new SelectList(_context.TaskType.OrderBy(x => x.TaskTypeName), "TaskTypeId", "TaskTypeName"); TaskTypeMapping taskTypeMapping = new TaskTypeMapping(); taskTypeMapping.ActiveYn = true; return(View(taskTypeMapping)); }
public async Task <IActionResult> Create([Bind("TaskTypeMappingId,TaskTypeId,MappingType,MappingName,SourceSystemType,SourceType,TargetSystemType,TargetType,TaskDatafactoryIr,TaskTypeJson,ActiveYn,TaskMasterJsonSchema,TaskInstanceJsonSchema")] TaskTypeMapping taskTypeMapping) { if (ModelState.IsValid) { _context.Add(taskTypeMapping); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(IndexDataTable))); } ViewData["TaskTypeId"] = new SelectList(_context.TaskType.OrderBy(x => x.TaskTypeName), "TaskTypeId", "TaskTypeName", taskTypeMapping.TaskTypeId); return(View(taskTypeMapping)); }