public IActionResult Update(ProductConfig model) { string note = AppGlobal.InitString; model.Initialization(InitType.Update, RequestUserID); int result = _productConfigResposistory.Update(model.Id, model); if (result > 0) { note = AppGlobal.Success + " - " + AppGlobal.EditSuccess; } else { note = AppGlobal.Success + " - " + AppGlobal.EditFail; } return(Json(note)); }
public ActionResult <string> Update(ProductConfig model) { Result routeResult; model.Initialization(InitType.Update, RequestUserID); int result = _productConfigResposistory.Update(model.Id, model); if (result > 0) { routeResult = new Result() .setResultType(ResultType.Success) .setMessage(AppGlobal.EditSuccess); } else { routeResult = new Result() .setResultType(ResultType.Error) .setErrorType(ErrorType.EditError) .setMessage(AppGlobal.EditFail); } return(ObjectToJson(routeResult)); }