Пример #1
0
        public async Task <ActionResult <ApiResult> > Delete(string ids)
        {
            await _ActionService.Delete(ids);

            ApiResult resp = new ApiResult();

            resp.code = 0;
            return(resp);
        }
Пример #2
0
        public async Task <IActionResult> Delete(int id)
        {
            var result = await _actionService.Delete(id);

            if (!result.IsOk())
            {
                return(FromServiceResult(result));
            }

            return(NoContent());
        }
Пример #3
0
        public ActionResult Delete(int id)
        {
            var package = _actionService.GetSingleById(id);

            if (package == null)
            {
                return(HttpNotFound());
            }
            _actionService.Delete(package);
            _actionService.Save();
            return(Json(new { status = true }, JsonRequestBehavior.AllowGet));
        }
Пример #4
0
        public IActionResult Delete(int id)
        {
            var house = _houseService.GetById(id, User.Identity.GetId());

            if (house != null)
            {
                var actions = _actionService.GetByHouseId(house.Id);

                if (actions.Count == 1)
                {
                    _actionService.Delete(actions[0]);
                    _houseService.Delete(house);

                    return(View("DeleteSuccess"));
                }

                return(View("DeleteFail"));
            }

            return(NotFound());
        }
Пример #5
0
 public void Delete(int id)
 {
     _actionService.Delete(id);
 }
Пример #6
0
 public async Task Delete(string actionId, string Token)
 {
     await _actionService.Delete(actionId, Token);
 }