public IActionResult DeleteJob( [FromRoute, Required] string device, [FromRoute, Required] Guid id) { try { var deviceId = new DeviceId(device); var jobEntries = _jobModel.DeleteJob(deviceId, id); return(Json(jobEntries)); } catch (Exception e) { return(ResolveException(e)); } }
public ActionResult DeleteJob(Job job) { string message = ""; job.IsActive = "N"; if (objJobMod.DeleteJob(job) > 0) { message = "Job Deleted"; TempData["DeleteJob"] = 1; TempData["postJob"] = 0; } else { message = "Failed to delete job post"; TempData["DeleteJob"] = 0; TempData["postJob"] = 0; } return(Json(message, JsonRequestBehavior.AllowGet)); }