/// <summary> /// change status brand /// </summary> /// <param name="brand_Id"></param> /// <param name="status"></param> /// <returns></returns> public ActionResult ChangeStatusBrand(Guid brand_Id, bool status) { var brand = _brandService.GetById(brand_Id); _brandService.ChangeStatus(brand, status); return(RedirectToAction("DetailBrand", new { id = brand_Id })); }
public JsonResult ChangeStatus(Guid id) { var result = _brandService.ChangeStatus(id); return(Json(new { status = result })); }
public async Task <IActionResult> ChangeStatus(int id) { var result = await _brandService.ChangeStatus(id); if (!result.IsSuccess) { return(BadRequest(result)); } return(Ok(result)); }
/// <summary> /// change status brand /// </summary> /// <param name="brand_Id"></param> /// <param name="status"></param> /// <returns></returns> public ActionResult ChangeStatusBrand(Guid brand_Id, bool status) { try { var brand = _brandService.GetById(brand_Id); _brandService.ChangeStatus(brand, status); return(RedirectToAction("DetailBrand", new { id = brand_Id })); } catch { return(RedirectToAction("Erorr500", "HomdeAdmin")); } }