public JsonResult ComponentDelete()
        {
            string ctrlId = Request.Form[NamingCenter.PARAM_CTRL_ID];
            string pageId = Request.Form[NamingCenter.PARAM_PAGE_ID];

            ComponentHelper.DeleteComponent(pageId, ctrlId);
            return(Json(true));
        }
        public JsonResult DeleteTran(string To, string From, string DefinitionId)
        {
            if (To.IsNullOrEmpty() || From.IsNullOrEmpty() || DefinitionId.IsNullOrEmpty())
            {
                return(Json(false));
            }
            string id = TRAN_ID_FORMAT.FormatTo(From, To);

            ComponentHelper.DeleteComponent(DefinitionId, id);
            return(Json(true));
        }
        public JsonResult DeleteActivity(string id, string definitionId)
        {
            ComponentHelper.DeleteComponent(definitionId, id);
            var components = DBContext <ComponentEntity> .Instance.Where(o => o.PageId.Equals(definitionId, StringComparison.OrdinalIgnoreCase) && (o.Id.StartsWith(TRAN_ID_START.FormatTo(id), StringComparison.OrdinalIgnoreCase) || o.Id.EndsWith(TRAN_ID_END.FormatTo(id), StringComparison.OrdinalIgnoreCase)));

            foreach (var com in components)
            {
                ComponentHelper.DeleteComponent(com.PageId, com.Id);
            }
            return(Json(true));
        }