Ejemplo n.º 1
0
        public JsonResult Delete(AccomodationTypeActionViewModel modal)
        {
            JsonResult Json   = new JsonResult();
            var        result = false;
            AccomodationTypesService objAccomodationTypesService = new AccomodationTypesService();


            var data = objAccomodationTypesService.GeAccomodationTypeById(modal.Id);

            //    data.Id = modal.Id;

            result = objAccomodationTypesService.DeleteAccomodationType(data);



            if (result)
            {
                Json.Data = new { Success = true };
            }
            else
            {
                Json.Data = new { Success = false, Message = "Unable to Delete" };
            }

            return(Json);
        }
Ejemplo n.º 2
0
        public JsonResult Delete(AccomodationTypeActionModel model)
        {
            JsonResult json             = new JsonResult();
            var        result           = false;
            var        accomodationType = accomodationTypesService.GetAccomodationTypeByID(model.ID);

            result = accomodationTypesService.DeleteAccomodationType(accomodationType);
            if (result)
            {
                json.Data = new { Success = true };
            }
            else
            {
                json.Data = new { Success = false, Message = "Unable to perform action on Accomodation Types." };
            }
            return(json);
        }
        public JsonResult  Delete(AccomodationTypeActionModels model)
        {
            JsonResult json             = new JsonResult();
            var        accomodationtype = typesService.GetAllAccomodationTypeById(model.ID);

            var result = typesService.DeleteAccomodationType(accomodationtype);

            if (result)
            {
                json.Data = new { success = true };
            }
            else
            {
                json.Data = new { success = false, message = "unable to perform Accomodation type" };
            }
            return(json);
        }