예제 #1
0
        public JsonResult DeleteDeal(int id)
        {
            try
            {
                _dealRepository.Delete(id);
            }
            catch (Exception ex)
            {
                return(Json(new {
                    valid = false,
                    Message = "Deal was not deleted : " + ex.Message,
                    redirect = "/Deal/AdminIndex"
                }));
            }

            return(Json(new {
                valid = true,
                Message = "Deal was deleted Succesfully",
                redirect = "/Deal/AdminIndex"
            }));
        }