// GET: /Location/Delete/5 //public ActionResult Delete(int id = 0) //{ // Location location = objSourceMastersModel.GetJobLocationById(id); // if (location == null) // { // return HttpNotFound(); // } // return View(location); //} // POST: /Location/Delete/5 // [HttpPost, ActionName("Delete")] //[ValidateAntiForgeryToken] public ActionResult DeleteConfirmed(int id) { objSourceMastersModel.DeleteLocation(id); ViewBag.SuccessMsg = "You have successfully deleted Location."; return(View("Index", objSourceMastersModel.GetLocation())); }