public JsonResult Inactive(string sku) { var request = new ChangeSkuStatusRequest(); request.SupplierID = base.CurrentUser.SupplierID; request.Sku = sku; request.Status = 4; try { var flag = bll.ChangeSkuStatus(request); if (flag) { return(Json(new { Error = 0 })); } else { return(Json(new { Error = 1 })); } } catch (Exception ex) { LogHelper.Error(ex); return(Json(new { Error = 1 })); } }
public JsonResult Active(string sku) { int result = 0; var request = new ChangeSkuStatusRequest(); request.SupplierID = base.CurrentUser.SupplierID; request.Sku = sku; request.Status = 3; try { bool brandStatus = bll.CheckBrandStatus(sku); if (brandStatus) { var flag = bll.ChangeSkuStatus(request); if (flag) { result = 1; } } else { result = 2; } return(Json(new { Error = result })); } catch (Exception ex) { LogHelper.Error(ex); return(Json(new { Error = result })); } }