public IActionResult Delete(int ID)
        {
            string note   = AppGlobal.InitString;
            int    result = _productConfigResposistory.Delete(ID);

            if (result > 0)
            {
                note = AppGlobal.Success + " - " + AppGlobal.DeleteSuccess;
            }
            else
            {
                note = AppGlobal.Success + " - " + AppGlobal.DeleteFail;
            }
            return(Json(note));
        }
Esempio n. 2
0
        public ActionResult <string> Delete(int ID)
        {
            Result routeResult;

            int result = _productConfigResposistory.Delete(ID);

            if (result > 0)
            {
                routeResult = new Result()
                              .setResultType(ResultType.Success)
                              .setMessage(AppGlobal.DeleteSuccess);
            }
            else
            {
                routeResult = new Result()
                              .setResultType(ResultType.Error)
                              .setErrorType(ErrorType.DeleteError)
                              .setMessage(AppGlobal.DeleteFail);
            }

            return(ObjectToJson(routeResult));
        }