Exemplo n.º 1
0
        private void UpdateClassRegions()
        {
            //Modified by Sateesh for Setting Scope and MTR Dates (PCF: ACQ 8.10) - 28/05/2009

            #region Region Dropdown initialization
            ddClassRegions.Items.Clear();
            using (HyperCatalog.Business.CultureList culturesList = HyperCatalog.Business.Culture.GetAll("CultureCode IN (SELECT DISTINCT FallbackCode FROM Cultures WHERE CultureTypeId= 2)"))
            {
                culturesList.Sort("Name");
                //ddClassRegions.Items.Add("<--Select a Region-->");
                foreach (HyperCatalog.Business.Culture c in culturesList)
                {
                    ddClassRegions.Items.Add(c.Code);
                }
            }
            ddClassRegions.SelectedIndex = 0;
            GetLanguagesByRegion(ddClassRegions.SelectedValue.ToString());
            #endregion
            //Modified by Sateesh for Setting Scope and MTR Dates (PCF: ACQ 8.10) - 28/05/2009
        }
Exemplo n.º 2
0
        private void UpdateTermRegions()
        {
            //Modified by Sateesh for Setting Scope and MTR Dates (PCF: ACQ 8.10) - 28/05/2009
            #region Region Dropdown initialization
            ddTermsRegions.Items.Clear();
            //ddTermsRegions.Items.Add("<--Select a Region-->");

            // Modified the cultureList filter as part of CR 5236
            //using (HyperCatalog.Business.CultureList culturesList = HyperCatalog.Business.Culture.GetAll("CultureCode IN (SELECT DISTINCT FallbackCode FROM Cultures(NOLOCK) WHERE CountryCode IN (SELECT CountryCode FROM Countries(NOLOCK) WHERE PLCDrivenTranslation = 0))"))
            using (HyperCatalog.Business.CultureList culturesList = HyperCatalog.Business.Culture.GetAll("CultureCode IN (SELECT DISTINCT FallbackCode FROM Cultures WHERE CultureTypeId= 2)"))
            {
                culturesList.Sort("Name");
                foreach (HyperCatalog.Business.Culture c in culturesList)
                {
                    ddTermsRegions.Items.Add(c.Code);
                }
            }
            ddTermsRegions.SelectedIndex = 0;
            GetLanguagesByRegion(ddTermsRegions.SelectedValue.ToString());
            #endregion
            //Modified by Sateesh for Setting Scope and MTR Dates (PCF: ACQ 8.10) - 28/05/2009
        }
Exemplo n.º 3
0
        private void UpdateDataEdit(string selTRScopeId)
        {
            cblLanguageScope.ClearSelection();
            TRScope trScope = null;

            if (selTRScopeId.Length > 0)
            {
                trScope = TRScope.GetByKey(Convert.ToInt32(selTRScopeId));
            }

            if (trScope == null)
            {
                lbTitle.Text                = "TR Scope: New";
                wneScopeId.Value            = "-1";
                PanelRegionDDL.Visible      = true;
                PanelRegionReadonly.Visible = false;
                PanelId.Visible             = false;

                //RPM_Sateesh
                using (HyperCatalog.Business.CultureList culturesList = HyperCatalog.Business.Culture.GetAll("CultureCode IN (SELECT DISTINCT FallbackCode FROM Cultures(NOLOCK) WHERE CountryCode IN (SELECT CountryCode FROM Countries(NOLOCK) WHERE PLCDrivenTranslation = 0))"))
                {
                    culturesList.Sort("Name");
                    ddRegions.Items.Add("<-- Select a Region -->");
                    foreach (HyperCatalog.Business.Culture c in culturesList)
                    {
                        ddRegions.Items.Add(c.Code);
                    }
                }
                //RPM_Sateesh

                UITools.HideToolBarButton(uwToolBarEdit, "Delete");
                UITools.HideToolBarSeparator(uwToolBarEdit, "DeleteSep");
            }
            else
            {
                lbTitle.Text                = "TR Scope: " + trScope.Name;
                wneScopeId.Value            = trScope.Id;
                PanelRegionDDL.Visible      = false;
                PanelRegionReadonly.Visible = true;
                wteRegionCode.Value         = trScope.RegionCode;
                txtName.Text                = trScope.Name;
                txtComment.Text             = trScope.Comment;
                PanelId.Visible             = true;
                //RPM_Sateesh
                //ddRegions.Text = trScope.Name;
                //RPM_Sateesh
                lbTRScopeId.Visible = true;
                wneScopeId.Visible  = true;
                wneScopeId.Enabled  = false;

                using (HyperCatalog.Business.LanguageList languageList = HyperCatalog.Business.Language.GetAll("LanguageCode NOT IN (Select LanguageCode FROM Cultures WHERE CultureTypeId = 0) AND LanguageCode IN (SELECT LanguageCode FROM Cultures(NOLOCK) WHERE FallbackCode ='" + trScope.RegionCode + "')"))
                {
                    languageList.Sort("Name");
                    cblLanguageScope.DataSource = languageList;
                    cblLanguageScope.DataBind();
                }

                foreach (HyperCatalog.Business.TRScopeLanguage cul in trScope.Languages)
                {
                    foreach (ListItem item in cblLanguageScope.Items)
                    {
                        if (item.Value == cul.LanguageCode)
                        {
                            item.Selected = true;
                        }
                    }
                }
            }
            panelEdit.Visible = true;
            panelGrid.Visible = false;
        }