コード例 #1
0
        private string GetLabelText()
        {
            string text = GetI18nText("lblStageInfoPrd");

            try
            {
                string importUrl = SrvParameterCache
                                   .GetParameterAsString(SrvParameterCache.WEB_URL_DEFAULT);
                if (!StringStatic.IsEmptyOrNullValue(importUrl))
                {
                    importUrl = importUrl.ToLower();

                    if (IsTestInstance(importUrl))
                    {
                        text = GetI18nText("lblStageInfoTest");
                    }
                    else if (IsQaInstance(importUrl))
                    {
                        text = GetI18nText("lblStageInfoQs");
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
            }
            return(text);
        }
コード例 #2
0
        public Label GetLblStageInfo()
        {
            if (lblStageInfo == null)
            {
                lblStageInfo = new Label();

                string text = _("lblStageInfoPrd");
                try
                {
                    string importUrl = SrvParameterCache
                                       .GetParameterAsString(SrvParameterCache.WEB_URL_DEFAULT);
                    if (!StringStatic.IsEmptyOrNullValue(importUrl))
                    {
                        importUrl = importUrl.ToLower();

                        //Test-Instanz
                        if (importUrl.Contains("grglmrpft") ||
                            importUrl.Contains("sysmrpt") ||
                            importUrl.Contains("gru23b12") ||
                            importUrl.Contains("gru23b13"))
                        {
                            // Test
                            text = _("lblStageInfoTest");
                        }
                        // QS-Instanz
                        else if (importUrl.Contains("grglmrpfqs") ||
                                 importUrl.Contains("gru23c12") ||
                                 importUrl.Contains("sysglmqs") ||
                                 importUrl.Contains("sysgmrpf-qs"))
                        {
                            // QS
                            text = _("lblStageInfoQs");
                        }
                        // PRD-Instanz (oder neue, bzw. noch nicht bekannte
                        // Instanz)
                        else
                        {
                            // Produktiv nur anzeigen, wenn es nicht die
                            // PRD-Instanz ist
                            lblStageInfo.Visible = false;
                        }
                    }
                }
                catch (Exception e)
                {
                    lblStageInfo.Visible = false;
                    Console.WriteLine(e.Message);
                    Console.WriteLine(e.StackTrace);
                }

                lblStageInfo.Text = text;
            }
            return(lblStageInfo);
        }
コード例 #3
0
        private string SanatizedServerUrl()
        {
            string url = SrvParameterCache
                         .GetParameterAsString(SrvParameterCache.WEB_URL_DEFAULT);

            if (url == null)
            {
                url = string.Empty;
            }

            return(url.ToLower());
        }
コード例 #4
0
        public bool GetVisibility()
        {
            bool visibility = true;

            string importUrl = SrvParameterCache
                               .GetParameterAsString(SrvParameterCache.WEB_URL_DEFAULT);

            if (!StringStatic.IsEmptyOrNullValue(importUrl))
            {
                importUrl = importUrl.ToLower();
                if (classifier.IsProductionInstance(importUrl))
                {
                    visibility = false;
                }
            }
            return(visibility);
        }
コード例 #5
0
        public Label GetLblStageInfo()
        {
            if (stageInfoLabel == null)
            {
                stageInfoLabel = new Label();

                string text = GetI18nText("lblStageInfoPrd");
                try
                {
                    string importUrl = SrvParameterCache
                                       .GetParameterAsString(SrvParameterCache.WEB_URL_DEFAULT);
                    if (!StringStatic.IsEmptyOrNullValue(importUrl))
                    {
                        importUrl = importUrl.ToLower();

                        if (IsTestInstance(importUrl))
                        {
                            text = GetI18nText("lblStageInfoTest");
                        }
                        else if (IsQaInstance(importUrl))
                        {
                            text = GetI18nText("lblStageInfoQs");
                        }
                        // PRD-Instanz (oder neue, bzw. noch nicht bekannte
                        // Instanz)
                        else
                        {
                            stageInfoLabel.Visible = false;
                        }
                    }
                }
                catch (Exception e)
                {
                    stageInfoLabel.Visible = false;
                    Console.WriteLine(e.Message);
                    Console.WriteLine(e.StackTrace);
                }

                stageInfoLabel.Text = text;
            }
            return(stageInfoLabel);
        }
コード例 #6
0
        public string GetText()
        {
            string text      = Translator.Translate("lblStageInfoPrd");
            string importUrl = SrvParameterCache
                               .GetParameterAsString(SrvParameterCache.WEB_URL_DEFAULT);

            if (!StringStatic.IsEmptyOrNullValue(importUrl))
            {
                importUrl = importUrl.ToLower();

                if (classifier.IsTestInstance(importUrl))
                {
                    text = Translator.Translate("lblStageInfoTest");
                }
                else if (classifier.IsQaInstance(importUrl))
                {
                    text = Translator.Translate("lblStageInfoQs");
                }
            }

            return(text);
        }