Beispiel #1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            this.lblCopyRightYear.Text  = Utilities.ApplicationSettings.CopyrightYear;
            this.lnkCompany.Text        = Utilities.ApplicationSettings.BrandingCompanyName;
            this.lnkCompany.NavigateUrl = Utilities.ApplicationSettings.BrandingCompanyURL;


            if (!IsPostBack && UserContext.UserData.UserType == UserType.SaltAdmin)
            {
                panLanguageAdmin.Visible = true;
                if (Request.Cookies["LanguagePreviewMode"] != null)
                {
                    ddlLanguagePreviewMode.SelectedValue = Convert.ToInt32(Request.Cookies["LanguagePreviewMode"].Value).ToString();
                }

                ddlLanguageList.DataSource = LangAPI.LanguageAdminList();
                ddlLanguageList.DataBind();

                if (Request.Cookies["currentCulture"] != null && ddlLanguageList.Items.FindByValue(Request.Cookies["currentCulture"].Value) != null)
                {
                    ddlLanguageList.SelectedValue = Request.Cookies["currentCulture"].Value;
                }
            }
        }
        private void Bind_LanguageDropDown()
        {
            ddlLanguageList.DataSource = LangAPI.LanguageAdminList();
            ddlLanguageList.DataBind();

            ddlLanguageList.SelectedValue = this.LangID.ToString();
            lnkInterface.Text             = ddlLanguageList.SelectedItem.Text + " Interfaces";
        }
        private void Bind_LanguageGrid()
        {
            grdLanguageList.DataSource = LangAPI.LanguageAdminList();
            grdLanguageList.DataBind();

            if (grdLanguageList.Items.Count == 0)
            {
                grdLanguageList.Visible = false;
            }
            else
            {
                grdLanguageList.Visible = true;
            }
        }