예제 #1
0
        /// <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 }));
        }
예제 #2
0
        public JsonResult ChangeStatus(Guid id)
        {
            var result = _brandService.ChangeStatus(id);

            return(Json(new
            {
                status = result
            }));
        }
예제 #3
0
        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")); }
 }