Carrotware.CMS.Mvc.UI.Admin.Service.CMS.GetWidgetVersionText C# (CSharp) Метод

GetWidgetVersionText() приватный Метод

private GetWidgetVersionText ( string DBKey, string ThisPage ) : string
DBKey string
ThisPage string
Результат string
        public string GetWidgetVersionText(string DBKey, string ThisPage)
        {
            try {
                CurrentPageGuid = new Guid(ThisPage);
                LoadGuids();
                Guid guidWidget = new Guid(DBKey);

                Widget ww = null;

                try {
                    ww = (from w in cmsAdminWidget
                          where w.WidgetDataID == guidWidget
                          select w).FirstOrDefault();
                } catch (Exception ex) { }

                if (ww == null) {
                    ww = widgetHelper.GetWidgetVersion(guidWidget);
                }

                if (ww != null) {
                    if (String.IsNullOrEmpty(ww.ControlProperties)) {
                        return "No Data";
                    } else {
                        if (ww.ControlProperties.Length < 768) {
                            return ww.ControlProperties;
                        } else {
                            return ww.ControlProperties.Substring(0, 700) + "[.....]";
                        }
                    }
                }

                return "OK";
            } catch (Exception ex) {
                SiteData.WriteDebugException("webservice", ex);

                return "FAIL";
            }
        }