public ActionResult Save(ACTIVIDAD changedEvent, FormCollection actionValues)
        {
            String action_type = actionValues["!nativeeditor_status"];
            Int64 source_id = Int64.Parse(actionValues["id"]);
            Int64 target_id = source_id;

            MyEventsDataContext data = new MyEventsDataContext();
            try
            {
                switch (action_type)
                {
                    case "inserted":
                        data.ACTIVIDAD.InsertOnSubmit(changedEvent);
                        break;
                    case "deleted":
                        changedEvent = data.ACTIVIDAD.SingleOrDefault(ev => ev.idActividad == source_id);
                        data.ACTIVIDAD.DeleteOnSubmit(changedEvent);
                        break;
                    default: // "updated"
                        changedEvent = data.ACTIVIDAD.SingleOrDefault(ev => ev.idActividad == source_id);
                        UpdateModel(changedEvent);
                        break;
                }
                data.SubmitChanges();
                target_id = changedEvent.idActividad;
            }
            catch
            {
                action_type = "error";
            }

            return View(new ActividadActionResponseModel(action_type, source_id, target_id));
        }
 partial void UpdateACTIVIDAD(ACTIVIDAD instance);
 partial void DeleteACTIVIDAD(ACTIVIDAD instance);
 partial void InsertACTIVIDAD(ACTIVIDAD instance);