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

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

            int result = _configResposistory.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));
        }
Exemple #3
0
 public async Task <bool> Delete(long id)
 {
     return(await _configRepository.Delete <Configs>(id));
 }
Exemple #4
0
 public void DeleteForm(string keyValue)
 {
     service.Delete(t => t.F_Id == keyValue);
 }