private void DeleteImportBL(int JobId) { int jobId = JobBLL.DeleteJob(JobId, _userId); LoadImportBL(); ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "<script>javascript:void alert('Job has been deleted successfully!');</script>", false); }
public async Task <ActionResult> DeleteConfirmed(int id) { Job job = await bll.GetJobById(id); await bll.DeleteJob(job); return(RedirectToAction("Index")); }
public async Task <IHttpActionResult> DeleteJob(int id) { Job job = await jobBLL.GetJobById(id); if (job == null) { return(NotFound()); } await jobBLL.DeleteJob(job); return(Ok(job)); }