public JsonResult CreateOrEditBloqueo(AgendaBloqueosModel model) { if (model.ID > 0) { AgendaService.EditBloqueoAgenda(Mapper.Map <Agenda_Bloqueos>(model)); } else { model.Habilitado = true; AgendaService.AddBloqueoAgenda(Mapper.Map <Agenda_Bloqueos>(model)); } Response.StatusCode = (int)HttpStatusCode.OK; return(Json("OK", JsonRequestBehavior.AllowGet)); }