// GET: LineParts/Edit/5 public async Task <ActionResult> Edit(decimal?id) { //LINE_ID is doc_nbr with line_nbr if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VUMM_HH_CALLS_LINES dto = await _conntext.VUMM_HH_CALLS_LINES.FindAsync(id); //FindAsync(id); if (dto == null) { return(HttpNotFound()); } LineViewModel vm = new LineViewModel(); vm = _linesMapper.Map <LineViewModel>(dto); return(View(vm)); }
// GET: LineParts/Delete/5 public async Task <ActionResult> Delete(decimal?id) { //LINE_ID is doc_nbr with line_nbr if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VUMM_HH_CALLS_LINES dto = await _conntext.VUMM_HH_CALLS_LINES.FindAsync(id); //FindAsync(id); if (dto == null) { return(HttpNotFound()); } else { await _conntext.ExecuteStoreProcedureAsync("mm_hh.mm_hh_delete_lft", dto.DOC_NBR, dto.LINE_NBR); return(RedirectToAction("Index", new { id = dto.DOC_NBR })); } //LineViewModel vm = new LineViewModel(); //vm = _linesMapper.Map<LineViewModel>(dto); //return View(vm); }