public async Task <ActionResult <Location> > DeleteLocation(int id) { await _location.Delete(id); await _log.CreateLog(HttpContext, User.FindFirst("UserName").Value); return(NoContent()); }
public IActionResult Deletelocation(long Id) { if (Id.Equals(0)) { ViewBag.ErrorMessage = $"The location Resource with Id = { Id } could not be found"; return(View("NotFound")); } Location location = locationRepository.GetById(Id); if (location == null) { ViewBag.ErrorMessage = $"The location Resource with Id = { Id } could not be found"; return(View("NotFound")); } string location_title = location.Title; locationRepository.Delete(location); locationRepository.Save(); TempData["deleted"] = $"The Location { location_title }, was successfully deleted."; return(Json(new { success = true })); }
public async Task <IActionResult> DeleteConfirmed(int id) { await _location.Delete(id); return(RedirectToAction(nameof(Index))); }
public LocationBO Delete(long id) { return(_location.Delete(id)); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(string CODE, string PRODUCT_CODE, string WAREHOUSE_CODE) { return(dal.Delete(CODE, PRODUCT_CODE, WAREHOUSE_CODE)); }