public IActionResult DeleteBomNode([FromBody] RequestMessage <BomNodeViewModel> reqMsg) { if (ModelState.IsValid) { using (IBomManagerService bomSrv = DIService.GetService <IBomManagerService>()) { var result = bomSrv.DeleteBomNode(reqMsg); return(Json(result, JsonService.SelfLoopJsonSettings)); } } return(BadRequest()); }
public IActionResult UpsertRootBomNode([FromBody] RequestMessage <BomNodeViewModel> reqMsg) { if (ModelState.IsValid) { using (IBomManagerService bomSrv = DIService.GetService <IBomManagerService>()) { var rpt = reqMsg.Playload.FirstOrDefault(); var result = bomSrv.UpsertRootBomNode(reqMsg); return(Json(result, JsonService.SelfLoopJsonSettings)); } } return(BadRequest()); }