Beispiel #1
0
        /// <summary>
        /// Function to dump expression (Key = vlbpl12VY0KA5IIiWBGINw) Expression:
        ///  GetMenuItem(Contacts).MenuItem.Caption
        /// </summary>
        /// <returns>Returns the value of the Expression</returns>
        public string expression_InlineExpression6()
        {
            ObjectKey oldCurrentESpaceKey = heContext.CurrentESpaceKey;

            try {
                heContext.CurrentESpaceKey = ssContactManager.Global.eSpaceKey;
                return(Functions.ssGetMenuItem(heContext, ENMenuItemEntity.GetRecordByKey(ObjectKey.Parse("bQMfrwAt5UaQWFeNE2K7bg")).ssId).ssENMenuItem.ssCaption);
            } finally {
                heContext.CurrentESpaceKey = oldCurrentESpaceKey;
            }
        }
Beispiel #2
0
        public string cnt_Container7_setInlineAttributes(object sender, System.EventArgs e)
        {
            ObjectKey oldCurrentESpaceKey = heContext.CurrentESpaceKey;

            try {
                heContext.CurrentESpaceKey    = ssContactManager.Global.eSpaceKey;
                ((WebControl)sender).CssClass = Functions.ActionMenu_GetStyle(heContext, (inParamActiveMenuItemId == ENMenuItemEntity.GetRecordByKey(ObjectKey.Parse("bQMfrwAt5UaQWFeNE2K7bg")).ssId), "Menu_TopMenu Menu_TopMenuActive", "Menu_TopMenu");
                if (!cnt_Container7_isVisible())
                {
                    string stylevalue = ((IAttributeAccessor)sender).GetAttribute("style");
                    {
                        string newstyledef;
                        string oldstyledef;
                        newstyledef = stylevalue + ((stylevalue != null && !stylevalue.TrimEnd().EndsWith(";")) ? ";": "") + "display:none";
                        oldstyledef = ((IAttributeAccessor)sender).GetAttribute("style");
                        if (oldstyledef != null)
                        {
                            if (!oldstyledef.TrimEnd().EndsWith(";"))
                            {
                                newstyledef = ";" + newstyledef;
                            }
                            if (!oldstyledef.EndsWith(newstyledef))
                            {
                                ((IAttributeAccessor)sender).SetAttribute("style", oldstyledef + newstyledef.ToString());
                            }
                            else
                            {
                                ((IAttributeAccessor)sender).SetAttribute("style", oldstyledef.ToString());
                            }
                        }
                        else
                        {
                            ((IAttributeAccessor)sender).SetAttribute("style", newstyledef.ToString());
                        }
                    }
                }
                else
                {
                    string stylevalue = ((IAttributeAccessor)sender).GetAttribute("style");
                    if (stylevalue != null)
                    {
                        ((IAttributeAccessor)sender).SetAttribute("style", stylevalue.Replace("display:none;", "").Replace("display:none", "").ToString());
                    }
                }
                return("");
            } finally {
                heContext.CurrentESpaceKey = oldCurrentESpaceKey;
            }
        }