private void BindData()
        {
            LocaleStringResource localeStringResource = LocaleStringResourceManager.GetLocaleStringResourceByID(this.LocaleStringResourceID);

            if (localeStringResource != null)
            {
                Language language = LanguageManager.GetLanguageByID(localeStringResource.LanguageID);
                if (language != null)
                {
                    lblLanguage.Text = Server.HtmlEncode(language.Name);
                }
                else
                {
                    Response.Redirect("LocaleStringResources.aspx");
                }

                this.txtResourceName.Text  = localeStringResource.ResourceName;
                this.txtResourceValue.Text = localeStringResource.ResourceValue;
            }
            else
            {
                Language language = LanguageManager.GetLanguageByID(this.LanguageID);
                if (language != null)
                {
                    lblLanguage.Text = Server.HtmlEncode(language.Name);
                }
                else
                {
                    Response.Redirect("LocaleStringResources.aspx");
                }
            }
        }
Пример #2
0
        private void BindData()
        {
            LocaleStringResource localeStringResource = LocaleStringResourceManager.GetLocaleStringResourceByID(this.LocaleStringResourceID);

            if (localeStringResource != null)
            {
                Language language = LanguageManager.GetLanguageByID(localeStringResource.LanguageID);
                if (language != null)
                {
                    hlBackToResources.NavigateUrl = CommonHelper.GetStoreAdminLocation() + "LocaleStringResources.aspx?LanguageID=" + localeStringResource.LanguageID.ToString();
                }
            }
            else
            {
                Response.Redirect("LocaleStringResources.aspx");
            }
        }
        public LocaleStringResource SaveInfo()
        {
            LocaleStringResource localeStringResource = LocaleStringResourceManager.GetLocaleStringResourceByID(this.LocaleStringResourceID);

            if (localeStringResource != null)
            {
                localeStringResource = LocaleStringResourceManager.UpdateLocaleStringResource(localeStringResource.LocaleStringResourceID,
                                                                                              localeStringResource.LanguageID, txtResourceName.Text, txtResourceValue.Text);
            }
            else
            {
                localeStringResource = LocaleStringResourceManager.InsertLocaleStringResource(
                    this.LanguageID, txtResourceName.Text,
                    txtResourceValue.Text);
            }

            return(localeStringResource);
        }
Пример #4
0
 protected void DeleteButton_Click(object sender, EventArgs e)
 {
     try
     {
         LocaleStringResourceManager.DeleteLocaleStringResource(this.LocaleStringResourceID);
         LocaleStringResource localeStringResource = LocaleStringResourceManager.GetLocaleStringResourceByID(this.LocaleStringResourceID);
         if (localeStringResource != null)
         {
             Response.Redirect("LocaleStringResources.aspx?LanguageID=" + localeStringResource.LanguageID.ToString());
         }
         else
         {
             Response.Redirect("LocaleStringResources.aspx");
         }
     }
     catch (Exception exc)
     {
         ProcessException(exc);
     }
 }